drm/shmobile: Add DRM PRIME support
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 8 Jun 2013 07:33:27 +0000 (09:33 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 20 Jun 2013 08:07:14 +0000 (10:07 +0200)
Just use the GEM CMA DRM PRIME helpers.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/shmobile/shmob_drm_drv.c

index 29d15e3fe144e8ffa360619c69ac93588897ab29..edc10181f551a83150404c6f891e9828905983a6 100644 (file)
@@ -263,7 +263,8 @@ static const struct file_operations shmob_drm_fops = {
 };
 
 static struct drm_driver shmob_drm_driver = {
-       .driver_features        = DRIVER_HAVE_IRQ | DRIVER_GEM | DRIVER_MODESET,
+       .driver_features        = DRIVER_HAVE_IRQ | DRIVER_GEM | DRIVER_MODESET
+                               | DRIVER_PRIME,
        .load                   = shmob_drm_load,
        .unload                 = shmob_drm_unload,
        .preclose               = shmob_drm_preclose,
@@ -273,6 +274,10 @@ static struct drm_driver shmob_drm_driver = {
        .disable_vblank         = shmob_drm_disable_vblank,
        .gem_free_object        = drm_gem_cma_free_object,
        .gem_vm_ops             = &drm_gem_cma_vm_ops,
+       .prime_handle_to_fd     = drm_gem_prime_handle_to_fd,
+       .prime_fd_to_handle     = drm_gem_prime_fd_to_handle,
+       .gem_prime_import       = drm_gem_cma_dmabuf_import,
+       .gem_prime_export       = drm_gem_cma_dmabuf_export,
        .dumb_create            = drm_gem_cma_dumb_create,
        .dumb_map_offset        = drm_gem_cma_dumb_map_offset,
        .dumb_destroy           = drm_gem_cma_dumb_destroy,