[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:28:47 UTC 2016


On Wed, Aug 31, 2016 at 12:17:27AM +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 12:07 PM
> > To: Deucher, Alexander
> > Cc: Huan, Alvin; Wang, Ken; amd-gfx at lists.freedesktop.org; Yu, Hui
> > Subject: Re: [PATCH 10/14] drm/amdgpu: add rv770_get_memory_type to
> > set the GDDR5 flag
> > 
> > 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.
> 
> Sure.  Either that or set pi->mem_gddr5 = adev->mc.vram_type == AMDGPU_VRAM_TYPE_GDDR5;
> 
> Also, double check that the gmc6 module properly sets vram_type.  See the gmc 7 module for reference.
> 

I see. vram_type is already inited as gmc_v6_0_convert_vram_type(tmp) in
early_init of gmc 6. Good to know, thanks.

Rui


More information about the amd-gfx mailing list