diff options
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index d39093dc37e6..056a72e6ed26 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c | |||
@@ -251,9 +251,12 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) | |||
251 | chipIdentity = gpu_read(gpu, VIVS_HI_CHIP_IDENTITY); | 251 | chipIdentity = gpu_read(gpu, VIVS_HI_CHIP_IDENTITY); |
252 | 252 | ||
253 | /* Special case for older graphic cores. */ | 253 | /* Special case for older graphic cores. */ |
254 | if (VIVS_HI_CHIP_IDENTITY_FAMILY(chipIdentity) == 0x01) { | 254 | if (((chipIdentity & VIVS_HI_CHIP_IDENTITY_FAMILY__MASK) |
255 | >> VIVS_HI_CHIP_IDENTITY_FAMILY__SHIFT) == 0x01) { | ||
255 | gpu->identity.model = 0x500; /* gc500 */ | 256 | gpu->identity.model = 0x500; /* gc500 */ |
256 | gpu->identity.revision = VIVS_HI_CHIP_IDENTITY_REVISION(chipIdentity); | 257 | gpu->identity.revision = |
258 | (chipIdentity & VIVS_HI_CHIP_IDENTITY_REVISION__MASK) | ||
259 | >> VIVS_HI_CHIP_IDENTITY_REVISION__SHIFT; | ||
257 | } else { | 260 | } else { |
258 | 261 | ||
259 | gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL); | 262 | gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL); |