Skip to content

Commit 74162dd

Browse files
melissawengregkh
authored andcommitted
drm/amd/display: Disable CRTC degamma LUT for DCN401
commit 97a0f2b upstream. In DCN401 pre-blending degamma LUT isn't affecting cursor as in previous DCN version. As this is not the behavior close to what is expected for CRTC degamma LUT, disable CRTC degamma LUT property in this HW. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/4176
1 parent 62f2a58 commit 74162dd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,16 @@ int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
731731
* support programmable degamma anywhere.
732732
*/
733733
is_dcn = dm->adev->dm.dc->caps.color.dpp.dcn_arch;
734-
drm_crtc_enable_color_mgmt(&acrtc->base, is_dcn ? MAX_COLOR_LUT_ENTRIES : 0,
734+
/* Dont't enable DRM CRTC degamma property for DCN401 since the
735+
* pre-blending degamma LUT doesn't apply to cursor, and therefore
736+
* can't work similar to a post-blending degamma LUT as in other hw
737+
* versions.
738+
* TODO: revisit it once KMS plane color API is merged.
739+
*/
740+
drm_crtc_enable_color_mgmt(&acrtc->base,
741+
(is_dcn &&
742+
dm->adev->dm.dc->ctx->dce_version != DCN_VERSION_4_01) ?
743+
MAX_COLOR_LUT_ENTRIES : 0,
735744
true, MAX_COLOR_LUT_ENTRIES);
736745

737746
drm_mode_crtc_set_gamma_size(&acrtc->base, MAX_COLOR_LEGACY_LUT_ENTRIES);

0 commit comments

Comments
 (0)