Re: [RFC PATCH 5/6] drm/qxl: don't use ttm bo->offset

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

 



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