Changes between Version 1 and Version 2 of linux/display


Ignore:
Timestamp:
10/05/2018 03:54:29 PM (6 years ago)
Author:
Tim Harvey
Comment:

update /sys/class/drm examples to show scenarios with multiple drm devices

Legend:

Unmodified
Added
Removed
Modified
  • linux/display

    v1 v2  
    11[[PageOutline]]
    22
    3 = Goals =
     3= Goals
    44The 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).
    55
    6 = Direct Rendering Manager (DRM) =
     6= Direct Rendering Manager (DRM)
    77DRM 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.
    88
    9 For example, to retrieve a list of display devices found on your system which were registered by DRM (Gateworks GW540x):
     9For example, to retrieve info about the DRM devices found on your system (Gateworks GW540x Linux 4.18):
    1010{{{#!bash
    11 root@OpenWrt:~# ls /sys/class/drm
    12 card0           card0-HDMI-A-1  card0-LVDS-1    controlD64      version
     11root@bionic-armhf:~# ls /sys/class/drm
     12card0  card1  card1-HDMI-A-1  card1-LVDS-1  renderD128  version
     13# show
    1314}}}
     15 * card0 is from etnaviv the GPU driver (if enabled)
     16 * card1 is from the IPU display driver
    1417
    15 == Kernel Mode Settings (KMS) ==
     18
     19== Kernel Mode Settings (KMS)
    1620KMS is part of DRM, but solely focuses on configuring display modes (i.e. screen resolution, refresh rate etc).
    1721
    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:
     22When 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:
    1923{{{#!bash
    20 root@OpenWrt:~# cat /sys/class/drm/card0-HDMI-A-1/modes
    21 1680x1050
     24root@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:
     261920x1080
    22271280x1024
    23 1280x1024
     281440x900
     291280x800
    24301152x864
    25311024x768
     
    3036640x480
    3137720x400
     38/sys/class/drm/card1-LVDS-1/modes:
    3239}}}
     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
    3342
    3443Mode 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]}}}