drm/amd/display: Set correct EOTF and Gamut flag in VRR info
authorMike Hsieh <Mike.Hsieh@amd.com>
Tue, 4 Oct 2022 06:58:07 +0000 (14:58 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Nov 2022 22:41:41 +0000 (17:41 -0500)
[Why] FreeSync always use G2.2 EOTF and Native gamut
[How] Set EOTF and Gamut flags accordingly

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/freesync/freesync.c

index 0f39ab9dc5b418d32e8d8d259fd5219fe318cdbc..c2e00f7b8381ef6e99227590f3f096d7da1c88b9 100644 (file)
@@ -688,10 +688,10 @@ static void build_vrr_infopacket_fs2_data(enum color_transfer_func app_tf,
        if (app_tf != TRANSFER_FUNC_UNKNOWN) {
                infopacket->valid = true;
 
-               infopacket->sb[6] |= 0x08;  // PB6 = [Bit 3 = Native Color Active]
-
-               if (app_tf == TRANSFER_FUNC_GAMMA_22) {
-                       infopacket->sb[9] |= 0x04;  // PB6 = [Bit 2 = Gamma 2.2 EOTF Active]
+               if (app_tf != TRANSFER_FUNC_PQ2084) {
+                       infopacket->sb[6] |= 0x08;  // PB6 = [Bit 3 = Native Color Active]
+                       if (app_tf == TRANSFER_FUNC_GAMMA_22)
+                               infopacket->sb[9] |= 0x04;  // PB6 = [Bit 2 = Gamma 2.2 EOTF Active]
                }
        }
 }