summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_plane.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-03-05 17:49:37 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-06-12 21:52:48 +0200
commit9d29c1f2d5510fc7cb95cacc27016fab279fb881 (patch)
tree27eac122065a63bb8684bbc9cbd4a7fb24c722f1 /drivers/gpu/drm/omapdrm/omap_plane.c
parentdrm: omapdrm: Switch page flip to atomic helpers (diff)
downloadlinux-9d29c1f2d5510fc7cb95cacc27016fab279fb881.tar.xz
linux-9d29c1f2d5510fc7cb95cacc27016fab279fb881.zip
drm: omapdrm: Drop manual framebuffer pin handling
Since the removal of omap_plane_mode_set(), framebuffers are now pinned exclusively through the plane .prepare_fb() and .cleanup_fb() operations as the remaining callers of omap_plane_setup() don't modify the framebuffer. Remove the manual pin/unpin infrastructure. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_plane.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 117fa37534b6..7813e48b6896 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -45,49 +45,12 @@ struct omap_plane {
struct omap_drm_window win;
bool enabled;
- /* last fb that we pinned: */
- struct drm_framebuffer *pinned_fb;
-
uint32_t nformats;
uint32_t formats[32];
struct omap_drm_irq error_irq;
};
-/* update which fb (if any) is pinned for scanout */
-static int omap_plane_update_pin(struct drm_plane *plane)
-{
- struct omap_plane *omap_plane = to_omap_plane(plane);
- struct drm_framebuffer *pinned_fb = omap_plane->pinned_fb;
- struct drm_framebuffer *fb = omap_plane->enabled ? plane->fb : NULL;
- int ret = 0;
-
- if (pinned_fb == fb)
- return 0;
-
- DBG("%p -> %p", pinned_fb, fb);
-
- if (fb) {
- drm_framebuffer_reference(fb);
- ret = omap_framebuffer_pin(fb);
- }
-
- if (pinned_fb)
- omap_crtc_queue_unpin(plane->crtc, pinned_fb);
-
- if (ret) {
- dev_err(plane->dev->dev, "could not swap %p -> %p\n",
- omap_plane->pinned_fb, fb);
- drm_framebuffer_unreference(fb);
- omap_plane->pinned_fb = NULL;
- return ret;
- }
-
- omap_plane->pinned_fb = fb;
-
- return 0;
-}
-
static int __omap_plane_setup(struct omap_plane *omap_plane,
struct drm_crtc *crtc,
struct drm_framebuffer *fb)
@@ -133,10 +96,6 @@ static int omap_plane_setup(struct omap_plane *omap_plane)
struct drm_plane *plane = &omap_plane->base;
int ret;
- ret = omap_plane_update_pin(plane);
- if (ret < 0)
- return ret;
-
dispc_runtime_get();
ret = __omap_plane_setup(omap_plane, plane->crtc, plane->fb);
dispc_runtime_put();