[PATCH 3/7] drm/vmwgfx: don't use ttm bo->offset

Nirmoy nirmodas at amd.com
Mon Feb 17 11:18:53 UTC 2020


On 2/17/20 12:09 PM, Christian König wrote:
> Am 17.02.20 um 11:18 schrieb Nirmoy Das:
>> Calculate GPU offset within vmwgfx driver itself without depending on
>> bo->offset
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
>> ---
>>   drivers/gpu/drm/vmwgfx/vmwgfx_bo.c         | 4 ++--
>>   drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c    | 2 +-
>>   drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c       | 2 +-
>>   drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 --
>>   4 files changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c 
>> b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
>> index 8b71bf6b58ef..a714582bb61c 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
>> @@ -258,7 +258,7 @@ int vmw_bo_pin_in_start_of_vram(struct 
>> vmw_private *dev_priv,
>>           ret = ttm_bo_validate(bo, &placement, &ctx);
>>         /* For some reason we didn't end up at the start of vram */
>> -    WARN_ON(ret == 0 && bo->offset != 0);
>> +    WARN_ON(ret == 0 && (bo->mem.start << PAGE_SHIFT) != 0);
>
> You could drop the (<< PAGE_SHIFT) part here.
>
Thanks Christian! I will drop that in next version.
> Apart from that feel free to stick an Acked-by: Christian König 
> <christian.koenig at amd.com> on the patch.
>
> Christian.
>
>


More information about the amd-gfx mailing list