Re: [PATCH v2 08/14] drm/msm/a6xx: Add skeleton A7xx support

From: Rob Clark
Date: Mon Aug 14 2023 - 17:00:05 EST


On Tue, Aug 8, 2023 at 2:03 PM Konrad Dybcio <konrad.dybcio@xxxxxxxxxx> wrote:
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> index 49f38edf9854..3e69ef9dde3f 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> @@ -46,6 +46,7 @@ enum adreno_family {
> ADRENO_6XX_GEN2, /* a640 family */
> ADRENO_6XX_GEN3, /* a650 family */
> ADRENO_6XX_GEN4, /* a660 family */
> + ADRENO_7XX_GEN1, /* a730 family */
> };
>
> #define ADRENO_QUIRK_TWO_PASS_USE_WFI BIT(0)
> @@ -401,6 +402,17 @@ static inline int adreno_is_a640_family(const struct adreno_gpu *gpu)
> return gpu->info->family == ADRENO_6XX_GEN2;
> }
>
> +static inline int adreno_is_a730(struct adreno_gpu *gpu)
> +{
> + return gpu->info->chip_ids[0] == 0x07030001;
> +}
> +
> +static inline int adreno_is_a7xx(struct adreno_gpu *gpu)
> +{
> + /* Update with non-fake (i.e. non-A702) Gen 7 GPUs */
> + return adreno_is_a730(gpu);

just use the family enum here.. that lets you move the
adreno_is_a730() helper into the patch that actually adds a730

BR,
-R

> +}
> +