[PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS buffers (v3)
Zhang, Jerry
Jerry.Zhang at amd.com
Thu Feb 23 02:57:32 UTC 2017
Hi Marek,
Thanks much for your review.
I thought I got wrong reference code for SI.
I will fix it...
Regards,
Jerry (Junwei Zhang)
Linux Base Graphics
SRDC Software Development
_____________________________________
> -----Original Message-----
> From: Marek Olšák [mailto:maraeo at gmail.com]
> Sent: Thursday, February 23, 2017 1:21
> To: Zhang, Jerry
> Cc: amd-gfx mailing list
> Subject: Re: [PATCH v3 1/1] drm/amdgpu: export gfx config double offchip LDS
> buffers (v3)
>
> On Mon, Feb 20, 2017 at 3:50 AM, Junwei Zhang <Jerry.Zhang at amd.com> wrote:
> > v2: move the config struct to drm_amdgpu_info_device
> > v3: move the config feature to amdgpu_gca_config
> >
> > Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++
> > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 ++
> > drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 6 ++++++
> > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 6 ++++++
> > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 16 +++++++++++++++-
> > include/uapi/drm/amdgpu_drm.h | 2 ++
> > 6 files changed, 34 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > index 7f1421f..9c552a9 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > @@ -856,6 +856,9 @@ struct amdgpu_gca_config {
> > uint32_t macrotile_mode_array[16];
> >
> > struct amdgpu_rb_config
> > rb_config[AMDGPU_GFX_MAX_SE][AMDGPU_GFX_MAX_SH_PER_SE];
> > +
> > + /* gfx configure feature */
> > + uint32_t double_offchip_lds_buf;
> > };
> >
> > struct amdgpu_cu_info {
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > index 6b9bf0e..bcc13907d 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > @@ -545,6 +545,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev,
> void *data, struct drm_file
> > dev_info.vram_type = adev->mc.vram_type;
> > dev_info.vram_bit_width = adev->mc.vram_width;
> > dev_info.vce_harvest_config =
> > adev->vce.harvest_config;
> > + dev_info.gc_double_offchip_lds_buf =
> > + adev->gfx.config.double_offchip_lds_buf;
> >
> > return copy_to_user(out, &dev_info,
> > min((size_t)size,
> > sizeof(dev_info))) ? -EFAULT : 0; diff --git
> > a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > index 782190d..138e15a 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> > @@ -1579,6 +1579,11 @@ static void gfx_v6_0_setup_spi(struct
> amdgpu_device *adev)
> > mutex_unlock(&adev->grbm_idx_mutex);
> > }
> >
> > +static void gfx_v6_0_config_init(struct amdgpu_device *adev) {
> > + adev->gfx.config.double_offchip_lds_buf = 1;
>
> I'm pretty sure GFX6 doesn't have double offchip LDS buffers, so this should be 0.
>
> Marek
More information about the amd-gfx
mailing list