diff mbox series

[2/2] drm/msm/a690: Remove revn and name

Message ID 20230704163640.6162-2-robdclark@gmail.com
State New
Headers show
Series [1/2] drm/msm/adreno: Fix warn splat for devices without revn | expand

Commit Message

Rob Clark July 4, 2023, 4:36 p.m. UTC
From: Rob Clark <robdclark@chromium.org>

These fields are deprecated.  But any userspace new enough to support
a690 also knows how to identify the GPU based on chip-id.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/msm/adreno/adreno_device.c | 2 --
 drivers/gpu/drm/msm/adreno/adreno_gpu.h    | 3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Dmitry Baryshkov July 13, 2023, 7:54 p.m. UTC | #1
On 04/07/2023 19:36, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
> 
> These fields are deprecated.  But any userspace new enough to support
> a690 also knows how to identify the GPU based on chip-id.
> 
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
>   drivers/gpu/drm/msm/adreno/adreno_device.c | 2 --
>   drivers/gpu/drm/msm/adreno/adreno_gpu.h    | 3 ++-
>   2 files changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index cb94cfd137a8..ce8d0b2475bf 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -369,8 +369,6 @@  static const struct adreno_info gpulist[] = {
 		.hwcg = a640_hwcg,
 	}, {
 		.rev = ADRENO_REV(6, 9, 0, ANY_ID),
-		.revn = 690,
-		.name = "A690",
 		.fw = {
 			[ADRENO_FW_SQE] = "a660_sqe.fw",
 			[ADRENO_FW_GMU] = "a690_gmu.bin",
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index ef1bcb6b624e..cf45007400c8 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -310,7 +310,8 @@  static inline int adreno_is_a680(const struct adreno_gpu *gpu)
 
 static inline int adreno_is_a690(const struct adreno_gpu *gpu)
 {
-	return adreno_is_revn(gpu, 690);
+	/* The order of args is important here to handle ANY_ID correctly */
+	return adreno_cmp_rev(ADRENO_REV(6, 9, 0, ANY_ID), gpu->rev);
 };
 /* check for a615, a616, a618, a619 or any derivatives */
 static inline int adreno_is_a615_family(const struct adreno_gpu *gpu)