Den 19.05.2020 10.04, skrev Thomas Zimmermann: > The udl driver contains an implementation of GEM vmap and mmap > operations that is identical to the common SHMEM helper; except > that udl's code uses cached pages by default. > > Convert udl to regular SHMEM helper functions. There's no reason > to have udl behave differently from all other SHMEM drivers. The > udl driver uses the SHMEM helper to enable caching. > > v2: > * implement .gem_create_object with SHMEM helper > > Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> > --- > diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c > index d1aa50fd6d65a..96d4317a2c1bd 100644 > --- a/drivers/gpu/drm/udl/udl_drv.c > +++ b/drivers/gpu/drm/udl/udl_drv.c > @@ -37,8 +37,8 @@ DEFINE_DRM_GEM_FOPS(udl_driver_fops); > static struct drm_driver driver = { > .driver_features = DRIVER_ATOMIC | DRIVER_GEM | DRIVER_MODESET, > > - /* gem hooks */ > - .gem_create_object = udl_driver_gem_create_object, > + /* GEM hooks */ > + .gem_create_object = drm_gem_shmem_create_object_cached, > > .fops = &udl_driver_fops, > DRM_GEM_SHMEM_DRIVER_OPS, You could add a DRM_GEM_SHMEM_CACHED_DRIVER_OPS macro and use that instead. Noralf. _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel