Screen Parameter Adjustment

On the Linux platform, you can use modetest to adjust the screen's hue, saturation, contrast and brightness and other properties.

The DRM drivers of LIBDRM and kernel are required to support atomic property.

  • LIBDRM:
    331017ae06a modetest: Add option to enable atomic capabilities
  • Kernel:
    • For DSI:
      3fdcc6dc0779 drm/verisilicon: dsi: add support legacy api to set property
    • For DP:
      0de45ac60e93 drm/verisilicon: dp: add support legacy api to set property
    • For LVDS:
      ad0afccfcd79 drm/verisilicon: lvds: add support legacy api to set property
    • For RGB:
      1210fcf23a85 drm/verisilicon: rgb: add support legacy api to set property

Use modetest and modetest -w option: -w <obj_id>:<prop_name>: to set related properties.

The following code block provides an example of setting the color hue of an HDMI screen:
modetest -M 
Connectors:
id    encoder   status     name      size (mm)    modes   encoders
116     0       connected  HDMI-A-1  0x0             1       115
  modes:
        index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
  props:
...

You will get the response that the HDMI screen connector ID is 116.

The following code block provides an example of setting the hue value of the HDMI screen to 60 from the default hue value of 50, and the adjustable range is 0-100.
modetest -M StarFive -a -w 116:hue:60

In the same approach, you can set the hue, saturation, contrast, and brightness of other screens just replacing the comments.