Re: [PATCH 1/3] drm/msm/a3xx: Pass the revision information

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

 



On Tue, 20 Jun 2023 at 21:14, Fabio Estevam <festevam@xxxxxxx> wrote:
>
> On 20/06/2023 14:40, Dmitry Baryshkov wrote:
>
> > This looks like a boilerplate being added to all aYxx drivers (and
> > then these fields are also set in adreno_gpu_init()). Can we remove
> > duplication somehow?
>
> Sorry, I missed this comment prior to sending v2.
>
> Maybe a simpler fix for a2xx_gpu would be:
>
> --- a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
> @@ -540,6 +540,10 @@ struct msm_gpu *a2xx_gpu_init(struct drm_device
> *dev)
>          gpu->perfcntrs = perfcntrs;
>          gpu->num_perfcntrs = ARRAY_SIZE(perfcntrs);
>
> +       ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
> +       if (ret)
> +               goto fail;
> +
>          if (adreno_is_a20x(adreno_gpu))
>                  adreno_gpu->registers = a200_registers;
>          else if (adreno_is_a225(adreno_gpu))
> @@ -547,10 +551,6 @@ struct msm_gpu *a2xx_gpu_init(struct drm_device
> *dev)
>          else
>                  adreno_gpu->registers = a220_registers;
>
> -       ret = adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
> -       if (ret)
> -               goto fail;
> -
>          if (!gpu->aspace) {
>                  dev_err(dev->dev, "No memory protection without MMU\n");
>                  if (!allow_vram_carveout) {
>
> What do you think?
>
> a3xx and a4xx call adreno_gpu_init() prior to adreno_is_xxx() so they
> don't have issues.

Yes, this seems like a perfect solution. Please send it with the
proper commit message. Also please add:

Fixes: 21af872cd8c6 ("drm/msm/adreno: add a2xx")

-- 
With best wishes
Dmitry



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux