[PATCH 2/2] etnaviv: use stream count from VIVS_HI_CHIP_SPECS_4
Christian Gmeiner
christian.gmeiner at gmail.com
Mon Jan 18 23:05:10 PST 2016
Freescales v5 kernel driver reads stream count from SPECS_4 register
and if that value is 0 it falls back to the value from CHIP_SPECS.
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index e4f6008..926e369 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -133,10 +133,17 @@ static void etnaviv_hw_specs(struct etnaviv_gpu *gpu)
specs[0] = gpu_read(gpu, VIVS_HI_CHIP_SPECS);
specs[1] = gpu_read(gpu, VIVS_HI_CHIP_SPECS_2);
specs[2] = gpu_read(gpu, VIVS_HI_CHIP_SPECS_3);
+ specs[3] = gpu_read(gpu, VIVS_HI_CHIP_SPECS_4);
gpu->identity.stream_count =
- (specs[0] & VIVS_HI_CHIP_SPECS_STREAM_COUNT__MASK)
- >> VIVS_HI_CHIP_SPECS_STREAM_COUNT__SHIFT;
+ (specs[3] & VIVS_HI_CHIP_SPECS_4_STREAM_COUNT__MASK)
+ >> VIVS_HI_CHIP_SPECS_4_STREAM_COUNT__SHIFT;
+
+ if (gpu->identity.stream_count == 0)
+ gpu->identity.stream_count =
+ (specs[0] & VIVS_HI_CHIP_SPECS_STREAM_COUNT__MASK)
+ >> VIVS_HI_CHIP_SPECS_STREAM_COUNT__SHIFT;
+
gpu->identity.register_max =
(specs[0] & VIVS_HI_CHIP_SPECS_REGISTER_MAX__MASK)
>> VIVS_HI_CHIP_SPECS_REGISTER_MAX__SHIFT;
--
2.5.0
More information about the dri-devel
mailing list