[PATCH] drm/amdgpu: change SH MEM alignment mode for gfx10

Deucher, Alexander Alexander.Deucher at amd.com
Thu Apr 16 13:25:50 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Michel Dänzer
> Sent: Thursday, April 16, 2020 5:57 AM
> To: Gao, Likun <Likun.Gao at amd.com>; Marek Olšák <maraeo at gmail.com>;
> Pierre-Eric Pelloux-Prayer <pelloux at gmail.com>
> Cc: amd-gfx at lists.freedesktop.org; Zhang, Hawking
> <Hawking.Zhang at amd.com>
> Subject: Re: [PATCH] drm/amdgpu: change SH MEM alignment mode for
> gfx10
> 
> On 2020-04-03 12:20 p.m., Likun Gao wrote:
> > From: Likun Gao <Likun.Gao at amd.com>
> >
> > Change SH_MEM_CONFIG Alignment mode to Automatic, as:
> > 1)OGL fn_amd_compute_shader will failed with unaligned mode.
> > 2)The default alignment mode was defined to automatic on gfx10
> > specification.
> >
> > Signed-off-by: Likun Gao <Likun.Gao at amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> > b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> > index 5a67306..d8f0c0d 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> > @@ -279,7 +279,7 @@ static const struct soc15_reg_golden
> > golden_settings_gc_10_1_2_nv12[] =
> >
> >  #define DEFAULT_SH_MEM_CONFIG \
> >  	((SH_MEM_ADDRESS_MODE_64 <<
> SH_MEM_CONFIG__ADDRESS_MODE__SHIFT) | \
> > -	 (SH_MEM_ALIGNMENT_MODE_UNALIGNED <<
> SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \
> > +	 (SH_MEM_ALIGNMENT_MODE_DWORD <<
> > +SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \
> >  	 (SH_MEM_RETRY_MODE_ALL <<
> SH_MEM_CONFIG__RETRY_MODE__SHIFT) | \
> >  	 (3 << SH_MEM_CONFIG__INITIAL_INST_PREFETCH__SHIFT))
> >
> >
> 
> I bisected a bunch of piglit regressions (mostly half-float related, e.g. draw-
> vertices-half-float_gles2) with radeonsi on Navi 10 to this change.
> 
> Does radeonsi/LLVM need corresponding changes?

This change was reverted.  The problem was in the Orca OpenGL shader compiler.

Alex


More information about the amd-gfx mailing list