Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/a8xx: Update GPU name with slice_mask

Once we've updated the chip_id after reading the slice_mask, also update
the GPU name so it matches.

Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/712225/
Message-ID: <20260316183436.671482-3-robin.clark@oss.qualcomm.com>

Rob Clark 9d24ec32 cc53487e

+10
+10
drivers/gpu/drm/msm/adreno/a8xx_gpu.c
··· 87 87 struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu); 88 88 struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu); 89 89 const struct a6xx_info *info = adreno_gpu->info->a6xx; 90 + struct device *dev = &gpu->pdev->dev; 90 91 u32 slice_mask; 91 92 92 93 if (adreno_gpu->info->family < ADRENO_8XX_GEN1) ··· 111 110 112 111 /* Chip ID depends on the number of slices available. So update it */ 113 112 adreno_gpu->chip_id |= FIELD_PREP(GENMASK(7, 4), hweight32(slice_mask)); 113 + 114 + /* Update the gpu-name to reflect the slice config: */ 115 + const char *name = devm_kasprintf(dev, GFP_KERNEL, 116 + "%"ADRENO_CHIPID_FMT, 117 + ADRENO_CHIPID_ARGS(adreno_gpu->chip_id)); 118 + if (name) { 119 + devm_kfree(dev, adreno_gpu->base.name); 120 + adreno_gpu->base.name = name; 121 + } 114 122 } 115 123 116 124 static u32 a8xx_get_first_slice(struct a6xx_gpu *a6xx_gpu)