[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418954426-21909-5-git-send-email-steve_longerbeam@mentor.com>
Date: Thu, 18 Dec 2014 18:00:23 -0800
From: Steve Longerbeam <slongerbeam@...il.com>
To: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-fbdev@...r.kernel.org, David Airlie <airlied@...ux.ie>,
Philipp Zabel <p.zabel@...gutronix.de>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Tomi Valkeinen <tomi.valkeinen@...com>
Cc: Russell King <rmk+kernel@....linux.org.uk>,
Fabio Estevam <fabio.estevam@...escale.com>,
Shawn Guo <shawn.guo@...aro.org>,
Denis Carikli <denis@...rea.com>,
Jiada Wang <jiada_wang@...tor.com>,
Steve Longerbeam <steve_longerbeam@...tor.com>
Subject: [PATCH v2 4/7] imx-drm: ipuv3-crtc: Implement mode_fixup
Ask the IPU display interface, via ipu_di_adjust_videomode(), to
adjust a video mode to meet any DI restrictions. The function takes
a subsystem independent videomode, so the drm_display_mode must be
converted to videomode first, and then the adjusted mode converted
back to a drm_display_mode.
Signed-off-by: Steve Longerbeam <steve_longerbeam@...tor.com>
---
drivers/gpu/drm/imx/ipuv3-crtc.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
index 11e84a2..fb16026 100644
--- a/drivers/gpu/drm/imx/ipuv3-crtc.c
+++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
@@ -242,6 +242,18 @@ static bool ipu_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
+ struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc);
+ struct videomode vm;
+ int ret;
+
+ videomode_from_drm_display_mode(adjusted_mode, &vm);
+
+ ret = ipu_di_adjust_videomode(ipu_crtc->di, &vm);
+ if (ret)
+ return false;
+
+ drm_display_mode_from_videomode(&vm, adjusted_mode);
+
return true;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists