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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
>> Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
>> Cc: Christian Gmeiner <christian.gmeiner@xxxxxxxxx>
>> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
> 
> 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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux