Skip to contentSkip to conversation

drm/amd/display: fix S/G display enablement

PATCH In review Hamza Mahfooz 4 participants 4 messages Oct 26, 2023 – Oct 27, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: fix S/G display enablement

An assignment statement was reversed during a refactor which effectively disabled S/G display outright. Since, we use adev->mode_info.gpu_vm_support to indicate to the rest of the driver that S/G display should be enabled and currently it is always set to false. So, to fix this set adev->mode_info.gpu_vm_support's value to that of init_data.flags.gpu_vm_support.

Fixes d059c2ec6a23 ("drm/amd/display: enable S/G display for for recent APUs by default")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 781d04eda3d4..adbeb2c897b5 100644
@@ -1641,7 +1641,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 		init_data.flags.gpu_vm_support = (amdgpu_sg_display != 0) && (adev->flags & AMD_IS_APU);
 	}
 
-	init_data.flags.gpu_vm_support = adev->mode_info.gpu_vm_support;
+	adev->mode_info.gpu_vm_support = init_data.flags.gpu_vm_support;
 
 	if (amdgpu_dc_feature_mask & DC_FBC_MASK)
 		init_data.flags.fbc_support = true;
Signature · 1 line
2.42.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Hamza Mahfooz

An assignment statement was reversed during a refactor which effectively disabled S/G display outright. Since, we use adev->mode_info.gpu_vm_support to indicate to the rest of the driver that S/G display should be enabled and currently it is always set to false. So, to fix this set adev->mode_info.gpu_vm_support's value to that of init_data.flags.gpu_vm_support.

Quoted 4 lines
Fixes d059c2ec6a23 ("drm/amd/display: enable S/G display for for recent APUs by default")
Quoted 20 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 781d04eda3d4..adbeb2c897b5 100644
@@ -1641,7 +1641,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
                init_data.flags.gpu_vm_support = (amdgpu_sg_display != 0) && (adev->flags & AMD_IS_APU);
        }
 
-       init_data.flags.gpu_vm_support = adev->mode_info.gpu_vm_support;
+       adev->mode_info.gpu_vm_support = init_data.flags.gpu_vm_support;
 
        if (amdgpu_dc_feature_mask & DC_FBC_MASK)
                init_data.flags.fbc_support = true;
--

2.42.0

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Hamza Mahfooz
Quoted 11 lines · Hamza Mahfooz

An assignment statement was reversed during a refactor which effectively disabled S/G display outright. Since, we use adev->mode_info.gpu_vm_support to indicate to the rest of the driver that S/G display should be enabled and currently it is always set to false. So, to fix this set adev->mode_info.gpu_vm_support's value to that of init_data.flags.gpu_vm_support.

Fixes d059c2ec6a23 ("drm/amd/display: enable S/G display for for recent APUs by default")

Harry

Quoted 17 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 781d04eda3d4..adbeb2c897b5 100644
@@ -1641,7 +1641,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 		init_data.flags.gpu_vm_support = (amdgpu_sg_display != 0) && (adev->flags & AMD_IS_APU);
 	}
 
-	init_data.flags.gpu_vm_support = adev->mode_info.gpu_vm_support;
+	adev->mode_info.gpu_vm_support = init_data.flags.gpu_vm_support;
 
 	if (amdgpu_dc_feature_mask & DC_FBC_MASK)
 		init_data.flags.fbc_support = true;
Reviewed-by Tested-by Mark Broadworth on v1 1/1
#3 lore raw
In reply to Hamza Mahfooz

[AMD Official Use Only - General]

This patch is:

Best Regards,
Yifan

-----Original Message-----
From: Mahfooz, Hamza <[email protected]>
Sent: Friday, October 27, 2023 1:29 AM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Zhang, Yifan <[email protected]>; Siqueira, Rodrigo <[email protected]>; Mahfooz, Hamza <[email protected]>; Broadworth, Mark <[email protected]>
Subject: [PATCH] drm/amd/display: fix S/G display enablement

An assignment statement was reversed during a refactor which effectively disabled S/G display outright. Since, we use
adev->mode_info.gpu_vm_support to indicate to the rest of the driver
that S/G display should be enabled and currently it is always set to false. So, to fix this set adev->mode_info.gpu_vm_support's value to that of init_data.flags.gpu_vm_support.

Fixes d059c2ec6a23 ("drm/amd/display: enable S/G display for for recent APUs by default")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 781d04eda3d4..adbeb2c897b5 100644
@@ -1641,7 +1641,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
                init_data.flags.gpu_vm_support = (amdgpu_sg_display != 0) && (adev->flags & AMD_IS_APU);
        }
 
-       init_data.flags.gpu_vm_support = adev->mode_info.gpu_vm_support;
+       adev->mode_info.gpu_vm_support = init_data.flags.gpu_vm_support;
 
        if (amdgpu_dc_feature_mask & DC_FBC_MASK)
                init_data.flags.fbc_support = true;

--
2.42.0