drm-*

Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities

Start DRM (Direct Rendering Manager) for graphics hardware in the DRM family

Syntax:

drm-rpi4     [-aeilpstuv] [-d debug_mask] [-f video_string]
             [-o option_value_pair] [-u user_info]
drm-virtio   [-aeilpstuv] [-d debug_mask] [-f video_string]
             [-o option_value_pair] [-u user_info]
drm-vmwgfx   [-aeilpstuv] [-d debug_mask] [-f video_string]
             [-o option_value_pair] [-u user_info]
    

Runs on:

QNX OS

Options:

-a
List all available options for modules (full format) and then exit. These are the options that you can use to specify the -o option of drm-*.
-d debug_mask
Enable DRM debug messages according to the value specified by debug_mask. Specify which DRM debug messages you want to enable based on the following masks:
  • 0x01: DRM_UT_CORE messages
  • 0x02: DRM_UT_DRIVER messages
  • 0x04: DRM_UT_KMS messages
  • 0x08: DRM_UT_PRIME messages
  • 0x10: DRM_UT_ATOMIC messages
  • 0x20: DRM_UT_INFO messages
  • 0x80: DRM_UT_TRACE messages
  • 0xFF: All messages
-e
Enable the linux debugfs interface.
-f video_string
Set video format as specified in video_string. This is the analog of the linux kernel option: video=[video_string]. Specify video_string by using the following format:

connector:XxY[M][R][-bpp][@refresh_rate][i][m][eDd]

where:
  • connector is the type of connection to the display (e.g., DVI-I-1, eDP-1)
  • X is width (in pixels) of the display resolution
  • Y is height (in pixels) of the display resolution
  • M is the option that you can specify to compute a CVT mode
  • R is an option that you can specify to reduce blanking
  • bpp is the number of bits per pixel to use to indicate color depth
  • refresh_rate is rate of refresh of the display
  • i is the option that you can specify to compute with interlaced (non-CVT) mode
  • m is the option that you can specify to use margins
  • e is the option that you can specify to enable output
  • D is the option that you can specify to force digital output to be enabled if the display output connector (e.g., DVI-I connector) has dual (analog/digital) interfaces
  • d is the option that you can specify to disable output
-i
Starts the DRM server to support target environments and list the modules' options (short format) with their corresponding value. If you're specifying options with the -o option, then it must precede the -i in the command line. For example, to start drm-* to support virtual target environments in VMWare:
 
# drm-vmwgfx -o enable_fbdev=1 -i

Linux kernel modules settings:
    dp_aux_i2c_transfer_size: 16
    dp_aux_i2c_speed_khz: 10
    debug: 0
    edid_fixup: 6
    edid_firmware: 
    poll: Y
    timestamp_precision_usec: 20
    vblankoffdelay: 5000
    assume_16bpp: 0
    restrict_dma_mask: 0
    force_coherent: 0
    restrict_iommu: 0
    force_dma_api: 0
    enable_fbdev: 1         
                
-l
List all available options for modules (short format) and then exit. These are the options that you can use to specify the -o option of drm-vmwgfx.
-o option_value_pair
Set the options that are specified in option_value_pair. Use the -a or -l options of drm-* to obtain a list of available options you can specify here. Specify option_value_pair by using the following format:

option=value

where option is from the list you retrieve from the -a or -l options and option is the value you want to set this option to. For example, you can run drm-vmwgfx with the -a option:
# drm-vmwgfx -a
...
enable_ppgtt     int  Override PPGTT usage...
enable_hangcheck bool Periodically check GPU activity for detecting hangs...
panel_use_ssc    int  Use Spread Spectrum Clock with panels [LVDS/eDP] (default: auto from VBT)
...
                

then you can run drm-vmwgfx and specify some options such as the following:

# drm-vmwgfx -o enable_ppgtt=-1 -o enable_hangcheck=0 -o panel_use_scc=1
                
Note:
When you set the DRM_CMDLINE environment variable on your target, the options and values that you specify in DRM_CMDLINE will be used when drm-* is invoked by screen.

Set DRM_CMDLINE to the command-line -o option. For example:

# export DRM_CMDLINE="-o enable_ppgtt=-1 -o enable_hangcheck=0 -o panel_use_scc=1"
                    
-p
Output messages via fprintf()
-s
Output messages via slogf()
-t
Output messages via trace_slogf()
-u user_info
Switch to the specified user after initialization where user_info can take one of the following forms:
uid:gid,sgid1,sgid2,sgid3,...
All IDs must be numbers. The UID and GID are separated by a colon. The GID can be followed by a comma-separated list of supplementary group IDs. GID and supplementary GIDs are optional.
username,sgid1,sgid2,sgid3,...
The username must be a valid username defined in /etc/passwd; otherwise, the function errors out with EINVAL. The supplementary GIDs are optional and must be a comma-separated list of numbers. The GID is looked up in /etc/passwd. The supplementary GIDs returned are a union of supplementary GIDs (located in /etc/group for the given username) and the GIDs parsed from user_info.

If -u is specified, ownership of /dev/drm/card0 and /dev/drm/renderD128 is set to that user.

-v
Display version information and then exit.

Description:

The drm-* utility starts DRM (Direct Rendering Manager) for graphics hardware in the DRM family. Below is a list of DRM server utilities that some Screen board support packages contain. If you cannot find a DRM server utility, contact QNX support.
  • drm-rpi4, DRM server for the Raspberry Pi 4
  • drm-virtio, DRM server for graphics hardware in a virtualized environment
  • drm-vmwgfx, DRM server for graphics hardware to support virtual target environments in VMware

If not already running, screen will start a DRM server before its initialization.

If the DRM server is started by screen, screen will modify the DRM server to operate as a general user. This is done after screen runs the drop_privileges command. If screen is started with the -u option, the DRM server inherits the user and ownership of the control files /dev/drm/card0 and /dev/drm/renderD128.

If the DRM server is started on its own, you can provide the -u to specify the user. Ownership does not automatically transition to the specified user; the system integrator needs to issue the drop_privileges command.

See the Security policies chapter of this guide for more information.

Note:

Default operations require screen, the DRM server, and all graphics applications operate within the same user group. You can remove this requirement by modifying the access control list (ACL) for both the /dev/drm/card0 and /dev/drm/renderD128 files to extend the R/W access to processes that are not in the same group as the DRM server. See setfacl for more information.

If you need to manually start drm-*, then on your target do the following:

  1. Run drm-* with your specified options from a shell.
  2. Start screen.
Page updated: