]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm: omapdrm: Remove remap argument to omap_gem_get_paddr()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 20 Apr 2017 21:33:50 +0000 (00:33 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Jun 2017 07:57:04 +0000 (10:57 +0300)
The function is always called with the remap argument set to true.
Hardcode that behaviour and remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_drv.h
drivers/gpu/drm/omapdrm/omap_fb.c
drivers/gpu/drm/omapdrm/omap_fbdev.c
drivers/gpu/drm/omapdrm/omap_gem.c
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c

index 16aa43c6fbc22d37a2930c3fa3aa1e6f1bd392b7..2b5e61b7efdf97d140ed024bd448032701099b29 100644 (file)
@@ -188,8 +188,7 @@ int omap_gem_roll(struct drm_gem_object *obj, uint32_t roll);
 void omap_gem_cpu_sync(struct drm_gem_object *obj, int pgoff);
 void omap_gem_dma_sync(struct drm_gem_object *obj,
                enum dma_data_direction dir);
-int omap_gem_get_paddr(struct drm_gem_object *obj,
-               dma_addr_t *paddr, bool remap);
+int omap_gem_get_paddr(struct drm_gem_object *obj, dma_addr_t *paddr);
 void omap_gem_put_paddr(struct drm_gem_object *obj);
 int omap_gem_get_pages(struct drm_gem_object *obj, struct page ***pages,
                bool remap);
index 5ca0537bb4271adb052d1d2ddb631efad4e91efd..5fc240f3a67e6b2a509038b07f0dc40e43eff46a 100644 (file)
@@ -258,7 +258,7 @@ int omap_framebuffer_pin(struct drm_framebuffer *fb)
 
        for (i = 0; i < n; i++) {
                struct plane *plane = &omap_fb->planes[i];
-               ret = omap_gem_get_paddr(plane->bo, &plane->paddr, true);
+               ret = omap_gem_get_paddr(plane->bo, &plane->paddr);
                if (ret)
                        goto fail;
                omap_gem_dma_sync(plane->bo, DMA_TO_DEVICE);
index 4e89dd53786232aac36cc10b2fa6ea1006a09371..d738e5b3ae453f96c73f450ae18a0589b76b1f19 100644 (file)
@@ -162,7 +162,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
         * to it).  Then we just need to be sure that we are able to re-
         * pin it in case of an opps.
         */
-       ret = omap_gem_get_paddr(fbdev->bo, &paddr, true);
+       ret = omap_gem_get_paddr(fbdev->bo, &paddr);
        if (ret) {
                dev_err(dev->dev,
                        "could not map (paddr)!  Skipping framebuffer alloc\n");
index 4bb52a5f59397109eceaa501664f5a609595357d..3d94ea8684e6e03d922b6a1ac5b3477fd0a99b7b 100644 (file)
@@ -784,12 +784,10 @@ void omap_gem_dma_sync(struct drm_gem_object *obj,
        }
 }
 
-/* Get physical address for DMA.. if 'remap' is true, and the buffer is not
- * already contiguous, remap it to pin in physically contiguous memory.. (ie.
- * map in TILER)
+/* Get physical address for DMA.. if the buffer is not already contiguous, remap
+ * it to pin in physically contiguous memory.. (ie. map in TILER)
  */
-int omap_gem_get_paddr(struct drm_gem_object *obj,
-               dma_addr_t *paddr, bool remap)
+int omap_gem_get_paddr(struct drm_gem_object *obj, dma_addr_t *paddr)
 {
        struct omap_drm_private *priv = obj->dev->dev_private;
        struct omap_gem_object *omap_obj = to_omap_bo(obj);
@@ -797,7 +795,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj,
 
        mutex_lock(&obj->dev->struct_mutex);
 
-       if (!is_contiguous(omap_obj) && remap && priv->has_dmm) {
+       if (!is_contiguous(omap_obj) && priv->has_dmm) {
                if (omap_obj->paddr_cnt == 0) {
                        struct page **pages;
                        uint32_t npages = obj->size >> PAGE_SHIFT;
index 0dbe0306953da431978263bff9f7c96b60e31fb6..024cf27d74dbecefb7be743e9fda4ac497dca126 100644 (file)
@@ -41,7 +41,7 @@ static struct sg_table *omap_gem_map_dma_buf(
        /* camera, etc, need physically contiguous.. but we need a
         * better way to know this..
         */
-       ret = omap_gem_get_paddr(obj, &paddr, true);
+       ret = omap_gem_get_paddr(obj, &paddr);
        if (ret)
                goto out;