[RFC PATCH 5/6] drm/qxl: don't use ttm bo->offset
Gerd Hoffmann
kraxel at redhat.com
Fri Feb 14 09:08:56 UTC 2020
> - if (bo->mem.mm_node)
> - bo->offset = (bo->mem.start << PAGE_SHIFT) +
> - bdev->man[bo->mem.mem_type].gpu_offset;
> - else
> - bo->offset = 0;
> -
>
>
> My assumption is
>
> (bo->tbo.offset - slot->gpu_offset + offset) == (bo->tbo.mem.start << PAGE_SHIFT) + bdev->man[bo->mem.mem_type].gpu_offset - slot->gpu_offset + offset)
>
> -> == (bo->tbo.mem.start << PAGE_SHIFT) + offset
That looks better.
> and we loose slot->gpu_offset so I thought it should be
>
> ((bo->tbo.mem.start << PAGE_SHIFT) + slot->gpu_offset + offset);
No.
The addressing scheme used by qxl is the slot in the high bits and the
offset within the slot in the low bits. The qxl device has two pci
memory bars, the driver creates a slot for each of them, for ttm they
are VRAM and PRIV.
So maybe we don't need gpu_offset at all. Not fully sure how driver and
ttm interact here.
cheers,
Gerd
More information about the dri-devel
mailing list