[PATCH 1/2] drm/msm/adreno: Change chip_id format

Rob Clark posted 2 patches 3 weeks ago
[PATCH 1/2] drm/msm/adreno: Change chip_id format
Posted by Rob Clark 3 weeks ago
The "ipv4-style" %u.%u.%u.%u used to make sense when the chip_id was
simply encoding gen.major.minor.patch.  But this hasn't been true for
at least a couple years.

Switch to %08x, which is still easy enough to read for older devices,
and much easier to read with the new scheme.

Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index 1d0145f8b3ec..6cdfafcb0c57 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -67,12 +67,8 @@ enum adreno_family {
 /* Helper for formating the chip_id in the way that userspace tools like
  * crashdec expect.
  */
-#define ADRENO_CHIPID_FMT "u.%u.%u.%u"
-#define ADRENO_CHIPID_ARGS(_c) \
-	(((_c) >> 24) & 0xff), \
-	(((_c) >> 16) & 0xff), \
-	(((_c) >> 8)  & 0xff), \
-	((_c) & 0xff)
+#define ADRENO_CHIPID_FMT "08x"
+#define ADRENO_CHIPID_ARGS(_c) (_c)
 
 struct adreno_gpu;
 
-- 
2.53.0
Re: [PATCH 1/2] drm/msm/adreno: Change chip_id format
Posted by Dmitry Baryshkov 3 weeks ago
On Mon, Mar 16, 2026 at 11:34:33AM -0700, Rob Clark wrote:
> The "ipv4-style" %u.%u.%u.%u used to make sense when the chip_id was
> simply encoding gen.major.minor.patch.  But this hasn't been true for
> at least a couple years.
> 
> Switch to %08x, which is still easy enough to read for older devices,
> and much easier to read with the new scheme.
> 
> Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
> ---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.h | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry