[PATCH RFC 088/111] staging: etnaviv: correct instruction count for GC2000 and GC880

Lucas Stach l.stach at pengutronix.de
Thu Apr 2 08:30:30 PDT 2015


These two GPUs seems to be in the transition state between two
generations and report a wrong instuction count. Fix it up in the
kernel like the Vivante driver does.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 drivers/staging/etnaviv/etnaviv_gpu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index 973b00346c7f..810a9ec04aea 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -166,7 +166,12 @@ static void etnaviv_hw_specs(struct etnaviv_gpu *gpu)
 
 	switch (gpu->identity.instruction_count) {
 	case 0:
-		gpu->identity.instruction_count = 256;
+		if ((gpu->identity.model == 0x2000 &&
+		     gpu->identity.revision == 0x5108) ||
+		    gpu->identity.model == 0x880)
+			gpu->identity.instruction_count = 512;
+		else
+			gpu->identity.instruction_count = 256;
 		break;
 
 	case 1:
-- 
2.1.4



More information about the dri-devel mailing list