Changes between Initial Version and Version 1 of linux/display

10/31/2017 09:06:57 PM (5 years ago)
Tim Harvey

restored from 10/14/2017 cache


  • linux/display

    v1 v1  
     3= Goals =
     4The 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).
     6= Direct Rendering Manager (DRM) =
     7DRM 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.
     9For example, to retrieve a list of display devices found on your system which were registered by DRM (Gateworks GW540x):
     11root@OpenWrt:~# ls /sys/class/drm
     12card0           card0-HDMI-A-1  card0-LVDS-1    controlD64      version
     15== Kernel Mode Settings (KMS) ==
     16KMS is part of DRM, but solely focuses on configuring display modes (i.e. screen resolution, refresh rate etc).
     18When 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:
     20root@OpenWrt:~# cat /sys/class/drm/card0-HDMI-A-1/modes
     34Mode 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]}}}
     36Note the following variables (see also [ modedb.txt]):
     37 * {{{<conn>}}}: Connector
     38 * {{{<xres> x <yres>}}}: Resolution
     39 * {{{M}}}: Display timings will be calculated using VESA(TM) Coordinated Video Timings instead of a lookup table (Please see [ modedb.txt] for more details)
     40 * {{{R}}}: Do "Reduce Blanking" calculation for digital displays
     41 * {{{-<bpp>}}}: color depth
     42 * {{{i}}}: Calculate timings for an interlaced Mode
     43 * {{{m}}}: Add margins to the calculation (1.8% of xres rounded down to 8 pixels and 1.8% of yres)
     44 * {{{e}}}: Output Forced On
     45 * {{{D}}}: Output Forced On and use Digital Outputs
     46 * {{{d}}}: Output Forced Off
     49 * Disable both the LVDS and HDMI outputs on a Gateworks GW540x:
     51setenv video 'video=LVDS-1:d video=HDMI-A-1:d'
     54Then, when booted:
     56root@OpenWrt:/# dmesg | grep -E "LVDS-1|HDMI-A-1"
     57[    0.000000] Kernel command line: console=ttymxc1,115200 ubi0:ubi ubi.mtd=2 rootfstype=squashfs,ubifs video=LVDS-1:d video=HDMI-A-1:d
     58[   12.181930] [drm] forcing HDMI-A-1 connector OFF
     59[   12.196641] [drm] forcing LVDS-1 connector OFF
     61 * Set HDMI output to 800x600 @ 60Hz refresh rate and disable LVDS:
     63setenv video 'video=LVDS-1:d video=HDMI-A-1:800x600@60'
     67== Limitations ==
     68Using the upstream kernel currently has some limitations on the imx platform. For example, the driver is limited to the number of display outputs it can do. That means if both LVDS and HDMI were connected, both resolutions would be scaled to the display with the lower resolution. Both outputs are also mirror's of each other and cannot be run independently. However, using the 'downstream' vendor kernel that we provide on our Yocto BSPs do have features that allow for independently controlled displays, even allowing for an 'overlay' buffer for the first two displays.
     70To see more on the downstream vendor kernel provided in Yocto, please see [wiki:Yocto/Video_Out here].
     72== References ==
     73 * ​
     74 * ​
     75 * ​