drm/etnaviv: fix up model and revision for GC2000+
[linux-2.6-block.git] / drivers / gpu / drm / etnaviv / etnaviv_gpu.c
index 39b5be3916d515a8824df9074555487b7c8b3c78..40ceb22d0442431fd9a518fb1935d94652f47d49 100644 (file)
@@ -327,6 +327,18 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
                                gpu->identity.revision = 0x1051;
                        }
                }
+
+               /*
+                * NXP likes to call the GPU on the i.MX6QP GC2000+, but in
+                * reality it's just a re-branded GC3000. We can identify this
+                * core by the upper half of the revision register being all 1.
+                * Fix model/rev here, so all other places can refer to this
+                * core by its real identity.
+                */
+               if (etnaviv_is_model_rev(gpu, GC2000, 0xffff5450)) {
+                       gpu->identity.model = chipModel_GC3000;
+                       gpu->identity.revision &= 0xffff;
+               }
        }
 
        dev_info(gpu->dev, "model: GC%x, revision: %x\n",