What is kernel's KMS(kernel mode setting) API?
Asked Answered
R

2

11

What is kernel's KMS(kernel mode setting) API?

Rabkin answered 14/7, 2009 at 2:20 Comment(0)
R
7

ModeSetting does refer to the graphic stack. It is the process of setting up the clocks and scanout buffers, initialize the chips, lighting up the displays and so on.

The kernel subsystem responsible for this is the DRM subsystem. It has a userspace library that is developed in lock-step with the kernel part and allows i.e. Xorg access to the userland facing part of the interface (normally called ABI). The hardware-facing side of the kernel interface is usually referred to as the API.

Specifically you can use the 'xrandr' binary to instruct XOrg via the randr-protocol to instruct the kernel to change the mode. That binary is installed alongside the X server and also gives you some information about the graphics card and the current mode.

The DRM ModeSetting API is IOCTL based and the following site gives an technical overview: http://dri.freedesktop.org/wiki/DrmModesetting

Also the documentation in the current linux-3.7 releases is quite improved. To check that out, you have to fetch the latest kernel sources, and then, in the kernel sourcetree do

$ make htmldocs

and then look at the generated file Documentation/DocBook/drm/index.html .

Hth

Razzia answered 31/10, 2012 at 23:20 Comment(0)
I
5

Mode setting is usually related to Graphics setup.

A reference article dated April 19, 2008 notes,

kernel mode-setting involves moving the mode-setting code for video adapters from the user-space X server drivers into the Linux kernel. This may seem like an uninteresting topic for end-users, but having the mode-setting done in the kernel allows for a cleaner and richer boot process, improved suspend and resume support, and more reliable VT switching (along with other advantages). Kernel mode-setting isn't yet in the mainline Linux kernel nor is the API for it frozen, but Fedora 9 shipping next month will be the first major distribution carrying this initial support. In this article we're looking more closely at kernel mode-setting with the Intel X.Org driver as well as showing videos of kernel-based mode-setting in action.

Here is a Fedora wiki KernelModesetting page.

Illuminate answered 14/7, 2009 at 2:34 Comment(2)
The design of the kernel's KMS API is still in flux....Is we should design API to adopt the KMS?Farce
It's starting to settle down now but there may be more changes ahead as additional chipsets convert to KMS. The best way to mitigate the risks would be to work in the open on the relevant mailing lists so you can get a heads up if APIs are about to change radically.Smilax

© 2022 - 2024 — McMap. All rights reserved.