[PATCH v2 4/4] drm/udl: Remove struct udl_gem_object and functions
Thomas Zimmermann
tzimmermann at suse.de
Thu Nov 7 09:37:45 UTC 2019
Hi Noralf
Am 06.11.19 um 12:48 schrieb Noralf Trønnes:
>
>
> Den 06.11.2019 11.47, skrev Thomas Zimmermann:
>> Simply removes all the obsolete GEM code from udl. No functional
>> changes.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> ---
>> drivers/gpu/drm/udl/Makefile | 2 +-
>> drivers/gpu/drm/udl/udl_dmabuf.c | 254 -------------------------------
>> drivers/gpu/drm/udl/udl_drv.h | 29 ----
>> drivers/gpu/drm/udl/udl_gem.c | 206 -------------------------
>> 4 files changed, 1 insertion(+), 490 deletions(-)
>> delete mode 100644 drivers/gpu/drm/udl/udl_dmabuf.c
>>
>
> <snip>
>
>> -int udl_gem_vmap(struct udl_gem_object *obj)
>> -{
>> - int page_count = obj->base.size / PAGE_SIZE;
>> - int ret;
>> -
>> - if (obj->base.import_attach) {
>> - obj->vmapping = dma_buf_vmap(obj->base.import_attach->dmabuf);
>> - if (!obj->vmapping)
>> - return -ENOMEM;
>> - return 0;
>> - }
>> -
>> - ret = udl_gem_get_pages(obj);
>> - if (ret)
>> - return ret;
>> -
>> - obj->vmapping = vmap(obj->pages, page_count, 0, PAGE_KERNEL);
>
> This differs from the shmem helper vmap:
>
> shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
> VM_MAP, pgprot_writecombine(PAGE_KERNEL));
>
> Boris added the WC in be7d9f05c53e:
>
> drm/gem_shmem: Use a writecombine mapping for ->vaddr
>
> Right now, the BO is mapped as a cached region when ->vmap() is called
> and the underlying object is not a dmabuf.
> Doing that makes cache management a bit more complicated (you'd need
> to call dma_map/unmap_sg() on the ->sgt field everytime the BO is about
> to be passed to the GPU/CPU), so let's map the BO with writecombine
> attributes instead (as done in most drivers).
>
> I don't know what the implications of this are, just pointing out a
> difference.
After some testing, I added an udl vmap function that enables caching on
the pages. I think I see a performance improvement for full-screen updates.
Best regards
Thomas
>
> Noralf.
>
>> - if (!obj->vmapping)
>> - return -ENOMEM;
>> - return 0;
>> -}
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20191107/4ea0b8d8/attachment-0001.sig>
More information about the dri-devel
mailing list