dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Christ <s.christ@phytec.de>
To: p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org
Subject: [PATCH 3/3] drm/imx: ipuv3-crtc: implement fast path mode_set_base
Date: Wed, 13 Jul 2016 10:11:48 +0200	[thread overview]
Message-ID: <1468397508-5112-4-git-send-email-s.christ@phytec.de> (raw)
In-Reply-To: <1468397508-5112-1-git-send-email-s.christ@phytec.de>

Implementing the function "mode_set_base" for i.MX6 IPU enables the
fast-path in function drm_crtc_helper_set_config. The fast-path is used
when flag 'mode_changed' is false and flag 'fb_changed' is true.

The fast-patch is needed for applications using the legcay framebuffer
ioctl FBIOPAN_DISPLAY for buffer flipping. When the fast-patch is not
present, the ioctl FBIOPAN_DISPLAY causes a complete mode set which is
too interruptive.

Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
 drivers/gpu/drm/imx/ipuv3-crtc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
index fc04041..9858a57 100644
--- a/drivers/gpu/drm/imx/ipuv3-crtc.c
+++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
@@ -234,6 +234,15 @@ static const struct drm_crtc_funcs ipu_crtc_funcs = {
 	.page_flip = ipu_page_flip,
 };
 
+int ipu_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
+				  struct drm_framebuffer *old_fb)
+{
+	struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc);
+	struct ipu_plane *plane = ipu_crtc->plane[0];
+
+	return ipu_plane_set_base(plane, crtc->primary->fb, x, y);
+}
+
 static int ipu_crtc_mode_set(struct drm_crtc *crtc,
 			       struct drm_display_mode *orig_mode,
 			       struct drm_display_mode *mode,
@@ -378,6 +387,7 @@ static const struct drm_crtc_helper_funcs ipu_helper_funcs = {
 	.dpms = ipu_crtc_dpms,
 	.mode_fixup = ipu_crtc_mode_fixup,
 	.mode_set = ipu_crtc_mode_set,
+	.mode_set_base = ipu_crtc_mode_set_base,
 	.prepare = ipu_crtc_prepare,
 	.commit = ipu_crtc_commit,
 };
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-07-13  8:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13  8:11 [PATCH 0/3] Support fast framebuffer panning for i.MX6 Stefan Christ
2016-07-13  8:11 ` [PATCH 1/3] drm/cma-helper: Add multi buffer support for cma fbdev Stefan Christ
2016-07-13 10:05   ` Daniel Vetter
2016-07-13  8:11 ` [PATCH 2/3] drm: fb_helper: implement ioctl FBIO_WAITFORVSYNC Stefan Christ
2016-07-13 10:16   ` Daniel Vetter
2016-07-15  7:19     ` Daniel Vetter
2016-07-27  9:59       ` Stefan Christ
2016-07-27 13:09         ` Daniel Vetter
2016-07-13  8:11 ` Stefan Christ [this message]
2016-07-13 10:00 ` [PATCH 0/3] Support fast framebuffer panning for i.MX6 Daniel Vetter
2016-07-14 15:11   ` Stefan Christ
2016-07-15  7:14     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468397508-5112-4-git-send-email-s.christ@phytec.de \
    --to=s.christ@phytec.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox