diff --git a/src/etnaviv/drm/etnaviv_gpu.c b/src/etnaviv/drm/etnaviv_gpu.c index a3bf6574df8..11739257519 100644 --- a/src/etnaviv/drm/etnaviv_gpu.c +++ b/src/etnaviv/drm/etnaviv_gpu.c @@ -259,6 +259,14 @@ struct etna_gpu *etna_gpu_new(struct etna_device *dev, unsigned int core) if (!core_info_okay) { query_features_from_kernel(gpu); query_limits_from_kernel(gpu); + + /* GC3000 with the instruction cache feature has a incorrect instruction + * limit encoded in HW (HWDB has the correct number). Fix this up so + * other parts of the stack don't have to worry about this. + */ + if (etna_core_has_feature(&gpu->info, ETNA_FEATURE_INSTRUCTION_CACHE) && + gpu->info.gpu.max_instructions < 512) + gpu->info.gpu.max_instructions = 512; } determine_halti(gpu); diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 46a4851e38e..5f0c33a9a21 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -870,10 +870,8 @@ etna_get_specs(struct etna_screen *screen) screen->specs.has_icache = true; } else if (VIV_FEATURE(screen, ETNA_FEATURE_INSTRUCTION_CACHE)) { /* GC3000 - this core is capable of loading shaders from - * memory. It can also run shaders from registers, as a fallback, but - * "max_instructions" does not have the correct value. It has place for - * 2*256 instructions just like GC2000, but the offsets are slightly - * different. + * memory. It can also run shaders from registers as a fallback, but the + * offsets are slightly different. */ screen->specs.vs_offset = 0xC000; /* State 08000-0C000 mirrors 0C000-0E000, and the Vivante driver uses