[PATCH 2/2] etnaviv: use stream count from VIVS_HI_CHIP_SPECS_4
Christian Gmeiner
christian.gmeiner at gmail.com
Tue Jan 19 00:13:29 PST 2016
2016-01-19 8:05 GMT+01:00 Christian Gmeiner <christian.gmeiner at gmail.com>:
> 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)
Here I am missing the specs array change - shame on me.
> 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;
Will send a V2 later the day.
greets
--
Christian Gmeiner, MSc
https://soundcloud.com/christian-gmeiner
More information about the dri-devel
mailing list