[PATCH xf86-video-amdgpu 0/7] Enabling Color Management - Round 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Leo (Sunpeng) Li" <sunpeng.li@xxxxxxx>

This ended up being different enough from v2 to warrant a new patchset. Per
Michel's suggestions, there have been various optimizations and cleanups.
Here's what's changed:

* Cache DRM color management property IDs at pre-init,
    * instead of querying DRM each time we need to modify color properties.

* Remove drmmode_update_cm_props().
    * Update color properties in drmmode_output_get_property() instead.
    * This also makes old calls to update_cm_props redundant.

* Get rid of fake CRTCs.
    * Previously, we were allocating a fake CRTC to configure color props on
      outputs that don't have a CRTC.
    * Instead, rr_configure_and_change_cm_property() can be easily modified to
      accept NULL CRTCs.

* Drop patches to persist color properties across DPMS events.
    * Kernel driver should be patched instead:
      https://lists.freedesktop.org/archives/amd-gfx/2018-May/022744.html
    * Color props including legacy gamma now persist across crtc dpms.
    * Non-legacy props now persist across output dpms and hotplug, as long
      as the same CRTC remains attached to that output.

And some smaller improvements:

* Change CTM to be 32-bit format instead of 16-bit.
    * This requires clients to ensure that each 32-bit element is padded to be
      long-sized, since libXrandr parses 32-bit format as long-typed.

* Optimized color management init during CRTC init.
    * Query DRM once for the list of properties, instead of twice.


The test/demo application is also updated to reflect that 32-bit CTM change:
https://cgit.freedesktop.org/~hwentland/color-demo-app

Leo (Sunpeng) Li (7):
  Cache color property IDs during pre-init
  Initialize color properties on CRTC during CRTC init
  Configure color properties when creating output resources
  Update color properties on output_get_property
  Enable setting of color properties via RandR
  Compose non-legacy with legacy regamma LUT
  Also compose LUT when setting legacy gamma

 src/drmmode_display.c | 739 +++++++++++++++++++++++++++++++++++++++++++++++++-
 src/drmmode_display.h |  27 ++
 2 files changed, 763 insertions(+), 3 deletions(-)

-- 
2.7.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux