diff options
| author | Nicholas Kazlauskas <[email protected]> | 2019-05-09 16:14:58 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-06-22 14:34:13 +0000 |
| commit | cf020d49b3c4ef6ab6f26be3dbf2f36b3df9f797 (patch) | |
| tree | 9b682c6b12aeab353f96e671c685bf7c9be2b8be /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | drm/amd/display: Use macro for invalid OPP ID (diff) | |
| download | kernel-cf020d49b3c4ef6ab6f26be3dbf2f36b3df9f797.tar.gz kernel-cf020d49b3c4ef6ab6f26be3dbf2f36b3df9f797.zip | |
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 <[email protected]>
Reviewed-by: Sun peng Li <[email protected]>
Acked-by: Bhawanpreet Lakha <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions
