[Openchrome-devel] drm-openchrome: drivers/gpu/drm

James Simmons jsimmons at kemper.freedesktop.org
Sat Mar 30 15:13:41 PDT 2013


 drivers/gpu/drm/via/via_crtc.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit fe1cf74897f740ab3e31733649a435d1a9353e09
Author: James Simmons <jsimmons at infradead.org>
Date:   Sat Mar 30 18:13:29 2013 -0400

    Another IRQ issue. This time it is with vblank irq happening when nothing is mapped to the crtc. To handle this a crtc disable function is introduce that turns off the vbl, cursor, and power downs the crtc not in use.

diff --git a/drivers/gpu/drm/via/via_crtc.c b/drivers/gpu/drm/via/via_crtc.c
index 3933e00..c923936 100644
--- a/drivers/gpu/drm/via/via_crtc.c
+++ b/drivers/gpu/drm/via/via_crtc.c
@@ -901,6 +901,19 @@ via_crtc_dpms(struct drm_crtc *crtc, int mode)
 }
 
 static void
+via_crtc_disable(struct drm_crtc *crtc)
+{
+	struct via_crtc *iga = container_of(crtc, struct via_crtc, base);
+
+	drm_vblank_off(crtc->dev, iga->index);
+
+	/* Turn off the cursor */
+	via_hide_cursor(crtc);
+
+	via_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
+}
+
+static void
 via_crtc_prepare(struct drm_crtc *crtc)
 {
 	/* Turn off the cursor */
@@ -1258,6 +1271,7 @@ via_iga2_mode_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb,
 
 static const struct drm_crtc_helper_funcs via_iga1_helper_funcs = {
 	.dpms = via_crtc_dpms,
+	.disable = via_crtc_disable,
 	.prepare = via_crtc_prepare,
 	.commit = via_crtc_commit,
 	.mode_fixup = via_crtc_mode_fixup,
@@ -1269,6 +1283,7 @@ static const struct drm_crtc_helper_funcs via_iga1_helper_funcs = {
 
 static const struct drm_crtc_helper_funcs via_iga2_helper_funcs = {
 	.dpms = via_crtc_dpms,
+	.disable = via_crtc_disable,
 	.prepare = via_crtc_prepare,
 	.commit = via_crtc_commit,
 	.mode_fixup = via_crtc_mode_fixup,


More information about the Openchrome-devel mailing list