drm/amdgpu/powerplay: fix smu7_get_memory_type for fiji
Subsystems (2)
PATCH 1/1 drm/amdgpu/powerplay: fix smu7_get_memory_type for fiji
Fiji uses a different register than other smu7 asics, but we already have this info in the base driver so just use that.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -6
@@ -4150,13 +4150,9 @@ static int smu7_read_clock_registers(struct pp_hwmgr *hwmgr)static int smu7_get_memory_type (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); -uint32_t temp; - - temp =cgs_read_register (hwmgr->device, mmMC_SEQ_MISC0); +struct amdgpu_device *adev = hwmgr->adev; - data->is_memory_gddr5 = (MC_SEQ_MISC0_GDDR5_VALUE == - ((temp &MC_SEQ_MISC0_GDDR5_MASK ) >> -MC_SEQ_MISC0_GDDR5_SHIFT )); + data->is_memory_gddr5 = (adev->gmc.vram_type ==AMDGPU_VRAM_TYPE_GDDR5 );return 0 ; }
Signature · 6 lines
2.13.6 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20180411225908.409-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Zhu, Rex
Reviewed-byBest Regards
Rex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Alex Deucher <[email protected]>
Sent: Thursday, April 12, 2018 6:59 AM
To: [email protected]
Cc: Deucher, Alexander
Subject: [PATCH] drm/amdgpu/powerplay: fix smu7_get_memory_type for fiji
Fiji uses a different register than other smu7 asics, but we already have this info in the base driver so just use that.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -6
@@ -4150,13 +4150,9 @@ static int smu7_read_clock_registers(struct pp_hwmgr *hwmgr)static int smu7_get_memory_type (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); -uint32_t temp; - - temp =cgs_read_register (hwmgr->device, mmMC_SEQ_MISC0); +struct amdgpu_device *adev = hwmgr->adev; - data->is_memory_gddr5 = (MC_SEQ_MISC0_GDDR5_VALUE == - ((temp &MC_SEQ_MISC0_GDDR5_MASK ) >> -MC_SEQ_MISC0_GDDR5_SHIFT )); + data->is_memory_gddr5 = (adev->gmc.vram_type ==AMDGPU_VRAM_TYPE_GDDR5 );return 0 ; }
--
2.13.6
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx