linux_dsm_epyc7002/drivers/gpu/drm/amd/display/amdgpu_dm
Nicholas Kazlauskas 7cd4b70091 drm/amd/display: Rework CRTC color management
[Why]
To prepare for the upcoming DRM plane color management properties
we need to correct a lot of wrong behavior and assumptions made for
CRTC color management.

The documentation added by this commit in amdgpu_dm_color explains
how the HW color pipeline works and its limitations with the DRM
interface.

The current implementation does the following wrong:
- Implicit sRGB DGM when no CRTC DGM is set
- Implicit sRGB RGM when no CRTC RGM is set
- No way to specify a non-linear DGM matrix that produces correct output
- No way to specify a correct RGM when a linear DGM is used

We had workarounds for passing kms_color tests but not all of the
behavior we had wrong was covered by these tests (especially when
it comes to non-linear DGM). Testing both DGM and RGM at the same time
isn't something kms_color tests well either.

[How]
The specifics for how color management works in AMDGPU and the new
behavior can be found by reading the documentation added to
amdgpu_dm_color.c from this patch.

All of the incorrect cases from the old implementation have been
addressed for the atomic interface, but there still a few TODOs for
the legacy one.

Note: this does cause regressions for kms_color@pipe-a-ctm-* over HDMI.

The result looks correct from visual inspection but the CRC no longer
matches. For reference, the test was previously doing the following:

linear degamma -> CTM -> sRGB regamma -> RGB to YUV (709) -> ...

Now the test is doing:

linear degamma -> CTM -> linear regamma -> RGB to YUV (709) -> ...

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Sun peng Li <Sunpeng.Li@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-06-11 12:49:56 -05:00
..
amdgpu_dm_color.c drm/amd/display: Rework CRTC color management 2019-06-11 12:49:56 -05:00
amdgpu_dm_crc.c drm/amd/display: Re-enable CRC capture following modeset 2019-01-28 11:44:03 -05:00
amdgpu_dm_debugfs.c drm/amd/display: Add connector debugfs for "output_bpc" 2019-06-11 12:40:14 -05:00
amdgpu_dm_debugfs.h drm/amd/display: Add support for hw_state logging via debugfs 2018-08-27 15:20:17 -05:00
amdgpu_dm_helpers.c drm/amd/display: Poll pending DOWN_REP before enabling the link 2019-03-19 15:04:02 -05:00
amdgpu_dm_irq.c drm/amd/display: In VRR mode, do DRM core vblank handling at end of vblank. (v2) 2019-04-03 10:00:33 -05:00
amdgpu_dm_irq.h
amdgpu_dm_mst_types.c drm/amd/display: Respect aux return values 2019-03-19 15:04:02 -05:00
amdgpu_dm_mst_types.h drm/amd/display: Cleanup MST non-atomic code workaround 2018-11-07 18:20:49 -05:00
amdgpu_dm_pp_smu.c drm/amd/display: Clean up old pplib interface functions 2019-03-27 22:41:49 -05:00
amdgpu_dm_services.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
amdgpu_dm_trace.h drm/amd/display: Add tracing to dc 2018-12-05 17:49:49 -05:00
amdgpu_dm.c drm/amd/display: Rework CRTC color management 2019-06-11 12:49:56 -05:00
amdgpu_dm.h drm/amd/display: Rework CRTC color management 2019-06-11 12:49:56 -05:00
Makefile drm/amd/display: Moving powerplay functions to a separate class 2018-07-05 16:38:41 -05:00