mbox series

[0/3] drm/udl: Convert to SHMEM

Message ID 20191028084549.30243-1-tzimmermann@suse.de (mailing list archive)
Headers show
Series drm/udl: Convert to SHMEM | expand

Message

Thomas Zimmermann Oct. 28, 2019, 8:45 a.m. UTC
Udl's GEM implementation is mostly SHMEM and we should attempt to
replace it with the latter.

Patches #1 and #2 update udl to simplify the conversion. In patch #3
the udl code is being replaced by SHMEM. The GEM object's mmap() and
free_object() functions are wrappers around their SHMEM counterparts.
For mmap() we fix-up the page-caching flags to distinguish between
write-combined and cached access. For free(), we have to unmap the
buffer's mapping that has been established by udl's fbdev code.

The patchset has been tested by running the fbdev console, X11 and
Weston on a DisplayLink adapter.

Thomas Zimmermann (3):
  drm/udl: Remove flags field from struct udl_gem_object
  drm/udl: Allocate GEM object via struct drm_driver.gem_create_object
  drm/udl: Switch to SHMEM

 drivers/gpu/drm/udl/Kconfig      |   1 +
 drivers/gpu/drm/udl/Makefile     |   2 +-
 drivers/gpu/drm/udl/udl_dmabuf.c | 255 -------------------------------
 drivers/gpu/drm/udl/udl_drv.c    |  30 +---
 drivers/gpu/drm/udl/udl_drv.h    |  36 +----
 drivers/gpu/drm/udl/udl_fb.c     |  65 ++++----
 drivers/gpu/drm/udl/udl_gem.c    | 245 ++++++-----------------------
 7 files changed, 93 insertions(+), 541 deletions(-)
 delete mode 100644 drivers/gpu/drm/udl/udl_dmabuf.c

--
2.23.0

Comments

Thomas Zimmermann Oct. 28, 2019, 8:48 a.m. UTC | #1
(cc: Gerd)

Am 28.10.19 um 09:45 schrieb Thomas Zimmermann:
> Udl's GEM implementation is mostly SHMEM and we should attempt to
> replace it with the latter.
> 
> Patches #1 and #2 update udl to simplify the conversion. In patch #3
> the udl code is being replaced by SHMEM. The GEM object's mmap() and
> free_object() functions are wrappers around their SHMEM counterparts.
> For mmap() we fix-up the page-caching flags to distinguish between
> write-combined and cached access. For free(), we have to unmap the
> buffer's mapping that has been established by udl's fbdev code.
> 
> The patchset has been tested by running the fbdev console, X11 and
> Weston on a DisplayLink adapter.
> 
> Thomas Zimmermann (3):
>   drm/udl: Remove flags field from struct udl_gem_object
>   drm/udl: Allocate GEM object via struct drm_driver.gem_create_object
>   drm/udl: Switch to SHMEM
> 
>  drivers/gpu/drm/udl/Kconfig      |   1 +
>  drivers/gpu/drm/udl/Makefile     |   2 +-
>  drivers/gpu/drm/udl/udl_dmabuf.c | 255 -------------------------------
>  drivers/gpu/drm/udl/udl_drv.c    |  30 +---
>  drivers/gpu/drm/udl/udl_drv.h    |  36 +----
>  drivers/gpu/drm/udl/udl_fb.c     |  65 ++++----
>  drivers/gpu/drm/udl/udl_gem.c    | 245 ++++++-----------------------
>  7 files changed, 93 insertions(+), 541 deletions(-)
>  delete mode 100644 drivers/gpu/drm/udl/udl_dmabuf.c
> 
> --
> 2.23.0
>