[PATCH 10/14] drm/amdgpu: add rv770_get_memory_type to set the GDDR5 flag
Huang Rui
ray.huang at amd.com
Tue Aug 30 16:07:25 UTC 2016
On Tue, Aug 30, 2016 at 10:21:21PM +0800, Deucher, Alexander wrote:
> > -----Original Message-----
> > From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> > Of Huang Rui
> > Sent: Tuesday, August 30, 2016 7:50 AM
> > To: amd-gfx at lists.freedesktop.org; Deucher, Alexander
> > Cc: Wang, Ken; Yu, Hui; Huang, Ray; Huan, Alvin
> > Subject: [PATCH 10/14] drm/amdgpu: add rv770_get_memory_type to set
> > the GDDR5 flag
> >
> > Add rv770_get_memory_type to set mem_gddr5 flag, because it will be
> > used on the whole si dpm part.
> >
> > Change-Id: I60f7ef38775c3b27e475f38f939905483fbb56f5
> > Signed-off-by: Huang Rui <ray.huang at amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/si_dpm.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> > b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> > index 5f1e5fe..563aeea 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> > @@ -6433,8 +6433,24 @@ static void si_set_pcie_lane_width_in_smc(struct
> > amdgpu_device *adev,
> > }
> > }
> >
> > +void rv770_get_memory_type(struct amdgpu_device *adev)
>
> adev->mc.vram_type should be set in the gmc module. Use that instead of pi->mem_gddr5. See ci_dpm.c for example.
>
So should I use "adev->mc.vram_type == AMDGPU_VRAM_TYPE_GDDR5" check
instead? I will update it in V2.
Thanks,
Rui
More information about the amd-gfx
mailing list