[PATCH] drm/etnaviv: Always init gpu->memory_base

Marek Vasut marex at denx.de
Fri Aug 26 14:38:32 UTC 2016


On 08/26/2016 04:35 PM, Lucas Stach wrote:
> Am Freitag, den 26.08.2016, 16:25 +0200 schrieb Marek Vasut:
>> The content of gpu->memory_base should point to start of RAM, not zero.
>>
>> Signed-off-by: Marek Vasut <marex at denx.de>
>> Cc: Lucas Stach <l.stach at pengutronix.de>
>> Cc: Christian Gmeiner <christian.gmeiner at gmail.com>
>> Cc: Russell King <rmk+kernel at arm.linux.org.uk>
> 
> NACK. This will cause memory corruption when used with a MC10 GPU. The
> checks are there for a reason. ;)
> 
> I'll have to think about a proper solution for MX6SX.

Oh ok, thanks.

>> ---
>>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
>> index ff6aa5d..a168532 100644
>> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
>> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
>> @@ -588,6 +588,8 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>>  			gpu->memory_base = PHYS_OFFSET;
>>  		else
>>  			gpu->memory_base = dma_mask - SZ_2G + 1;
>> +	} else {
>> +		gpu->memory_base = PHYS_OFFSET;
>>  	}
>>  
>>  	ret = etnaviv_hw_reset(gpu);
> 
> 


-- 
Best regards,
Marek Vasut


More information about the dri-devel mailing list