Re: [PATCH] drm/amdgpu: enable renoir discovery for gc info retrieved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 1, 2020 at 10:14 PM Liang, Prike <Prike.Liang@xxxxxxx> wrote:
>
> [AMD Official Use Only - Internal Distribution Only]
>
> Ping...

Already enabled:
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=amd-staging-drm-next&id=e467ab869f5783cf93d4cf24c6ac647cc29d1fb5

Alex

>
> Thanks,
> > -----Original Message-----
> > From: Liang, Prike <Prike.Liang@xxxxxxx>
> > Sent: Friday, May 29, 2020 11:28 AM
> > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Huang, Ray
> > <Ray.Huang@xxxxxxx>; Liang, Prike <Prike.Liang@xxxxxxx>
> > Subject: [PATCH] drm/amdgpu: enable renoir discovery for gc info retrieved
> >
> > Use ip discovery GC table instead of gpu info firmware for exporting gpu info
> > to inquire interface.As Renoir discovery has same version with Navi1x
> > therefore just enable it same way as Navi1x.
> >
> > Signed-off-by: Prike.Liang <Prike.Liang@xxxxxxx>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23
> > ++++++++++++++++++++---
> >  1 file changed, 20 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 2f0e8da..bff740ccd 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -1528,7 +1528,7 @@ static int
> > amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)  {
> >  const char *chip_name;
> >  char fw_name[30];
> > -int err;
> > +int err, r;
> >  const struct gpu_info_firmware_header_v1_0 *hdr;
> >
> >  adev->firmware.gpu_info_fw = NULL;
> > @@ -1578,6 +1578,23 @@ static int
> > amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
> >  chip_name = "arcturus";
> >  break;
> >  case CHIP_RENOIR:
> > +if (amdgpu_discovery) {
> > +/**
> > + * For RENOIR series seems needn't reinitialize the reg base
> > again as it already set during
> > + * early init,if any concern here will need export
> > amdgpu_discovery_init() for this case.
> > + */
> > +r = amdgpu_discovery_reg_base_init(adev);
> > +if (r) {
> > +DRM_WARN("failed to get ip discovery table,
> > "
> > +"fallback to get gpu info in legacy
> > method\n");
> > +goto legacy_gpuinfo;
> > +}
> > +
> > +amdgpu_discovery_get_gfx_info(adev);
> > +
> > +return 0;
> > +}
> > +legacy_gpuinfo:
> >  chip_name = "renoir";
> >  break;
> >  case CHIP_NAVI10:
> > @@ -1617,7 +1634,7 @@ static int
> > amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
> >  (const struct gpu_info_firmware_v1_0 *)(adev-
> > >firmware.gpu_info_fw->data +
> >
> > le32_to_cpu(hdr->header.ucode_array_offset_bytes));
> >
> > -if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
> > +if (amdgpu_discovery && adev->asic_type >= CHIP_RENOIR
> > && !r) {
> >  amdgpu_discovery_get_gfx_info(adev);
> >  goto parse_soc_bounding_box;
> >  }
> > @@ -3364,7 +3381,7 @@ void amdgpu_device_fini(struct amdgpu_device
> > *adev)
> >  sysfs_remove_files(&adev->dev->kobj, amdgpu_dev_attributes);
> >  if (IS_ENABLED(CONFIG_PERF_EVENTS))
> >  amdgpu_pmu_fini(adev);
> > -if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
> > +if (amdgpu_discovery && adev->asic_type >= CHIP_RENOIR)
> >  amdgpu_discovery_fini(adev);
> >  }
> >
> > --
> > 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux