drm/amd/amdgpu: move get memory type function from early init to sw init
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: move get memory type function from early init to sw init
On PX system, it will get memory type before gpu post , and get unkown type.
Change-Id I79e3760dd789c21a5f552bc4e5754f7a2defdaae
Signed-off-by Jim Qu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +8 -8
@@ -765,14 +765,6 @@ static int gmc_v6_0_early_init(void *handle)gmc_v6_0_set_gart_funcs (adev);gmc_v6_0_set_irq_funcs (adev); -if (adev->flags &AMD_IS_APU ) { - adev->mc.vram_type =AMDGPU_VRAM_TYPE_UNKNOWN ; - }else { -u32 tmp =RREG32 (mmMC_SEQ_MISC0); - tmp &=MC_SEQ_MISC0__MT__MASK ; - adev->mc.vram_type =gmc_v6_0_convert_vram_type (tmp); - } -return 0 ; }
@@ -792,6 +784,14 @@ static int gmc_v6_0_sw_init(void *handle)int dma_bits;struct amdgpu_device *adev = (struct amdgpu_device *)handle; +if (adev->flags &AMD_IS_APU ) { + adev->mc.vram_type =AMDGPU_VRAM_TYPE_UNKNOWN ; + }else { +u32 tmp =RREG32 (mmMC_SEQ_MISC0); + tmp &=MC_SEQ_MISC0__MT__MASK ; + adev->mc.vram_type =gmc_v6_0_convert_vram_type (tmp); + } + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,146 , &adev->mc.vm_fault);if (r)return r;
Signature · 6 lines
1.9.1 _______________________________________________ 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): 1498805832-13853-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org
Zhang, Hawking
Reviewed-by Hawking ZhangReviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Jim Qu
Sent: Friday, June 30, 2017 14:57
To: [email protected]
Cc: Qu, Jim <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: move get memory type function from early init to sw init
On PX system, it will get memory type before gpu post , and get unkown type.
Change-Id I79e3760dd789c21a5f552bc4e5754f7a2defdaae
Signed-off-by Jim Qu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +8 -8
@@ -765,14 +765,6 @@ static int gmc_v6_0_early_init(void *handle)gmc_v6_0_set_gart_funcs (adev);gmc_v6_0_set_irq_funcs (adev); -if (adev->flags &AMD_IS_APU ) { - adev->mc.vram_type =AMDGPU_VRAM_TYPE_UNKNOWN ; - }else { -u32 tmp =RREG32 (mmMC_SEQ_MISC0); - tmp &=MC_SEQ_MISC0__MT__MASK ; - adev->mc.vram_type =gmc_v6_0_convert_vram_type (tmp); - } -return 0 ; }
@@ -792,6 +784,14 @@ static int gmc_v6_0_sw_init(void *handle)int dma_bits;struct amdgpu_device *adev = (struct amdgpu_device *)handle; +if (adev->flags &AMD_IS_APU ) { + adev->mc.vram_type =AMDGPU_VRAM_TYPE_UNKNOWN ; + }else { +u32 tmp =RREG32 (mmMC_SEQ_MISC0); + tmp &=MC_SEQ_MISC0__MT__MASK ; + adev->mc.vram_type =gmc_v6_0_convert_vram_type (tmp); + } + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_LEGACY ,146 , &adev->mc.vm_fault);if (r)return r;
Signature · 10 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx