Changes between Version 1 and Version 2 of linux/display
- Timestamp:
- 10/05/2018 03:54:29 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
linux/display
v1 v2 1 1 [[PageOutline]] 2 2 3 = Goals =3 = Goals 4 4 The purpose of this page is to help educate about display output on upstream Linux (not to be confused with the 'downstream' vendor kernel provided in Yocto). 5 5 6 = Direct Rendering Manager (DRM) =6 = Direct Rendering Manager (DRM) 7 7 DRM is the driver subsystem in the kernel that is able to communicate with video drivers, such as the Freescale I.MX6 processors. Through {{{ioctl()}}} calls, multiple userspace programs can draw to a display at any given time as DRM will manage these requests. DRM is also able to interface with the graphics processor (GPU) in order to hardware accelerate these requests. This is separate from {{{framebuffer}}} in that it only allowed raw writes to a display. DRM exposes some information via sysfs in the {{{/sys/class/drm}}} directory. 8 8 9 For example, to retrieve a list of display devices found on your system which were registered by DRM (Gateworks GW540x):9 For example, to retrieve info about the DRM devices found on your system (Gateworks GW540x Linux 4.18): 10 10 {{{#!bash 11 root@OpenWrt:~# ls /sys/class/drm 12 card0 card0-HDMI-A-1 card0-LVDS-1 controlD64 version 11 root@bionic-armhf:~# ls /sys/class/drm 12 card0 card1 card1-HDMI-A-1 card1-LVDS-1 renderD128 version 13 # show 13 14 }}} 15 * card0 is from etnaviv the GPU driver (if enabled) 16 * card1 is from the IPU display driver 14 17 15 == Kernel Mode Settings (KMS) == 18 19 == Kernel Mode Settings (KMS) 16 20 KMS is part of DRM, but solely focuses on configuring display modes (i.e. screen resolution, refresh rate etc). 17 21 18 When booting your kernel, mode settings are read by what appears in the kernel command line, else defaults are chosen. DRM exports some modes available for a given display:22 When booting your kernel, mode settings are read by what appears in the kernel command line, else defaults are chosen. DRM exports the available modes for a given display in the DRM 'modes' file: 19 23 {{{#!bash 20 root@OpenWrt:~# cat /sys/class/drm/card0-HDMI-A-1/modes 21 1680x1050 24 root@bionic-armhf:~# for i in $(ls -1 /sys/class/drm/*/modes); do echo "$i:"; cat $i; done 25 /sys/class/drm/card1-HDMI-A-1/modes: 26 1920x1080 22 27 1280x1024 23 1280x1024 28 1440x900 29 1280x800 24 30 1152x864 25 31 1024x768 … … 30 36 640x480 31 37 720x400 38 /sys/class/drm/card1-LVDS-1/modes: 32 39 }}} 40 - the above shows that the HDMI is connected to a 1080p capable monitor with several resolutions available and that the board also has an LVDS connector but it is disabled 41 33 42 34 43 Mode settings can be passed to the kernel via the {{{video=}}} parameter from within U-Boot. The format of this is as follows: {{{video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]}}}