> -       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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to