Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335860

[PATCH 5/6] drm/vc4: Fix setting of vertical timings in the CRTC.

Path csiph.com!2.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Eric Anholt <eric@anholt.net>
Newsgroups linux.kernel
Subject [PATCH 5/6] drm/vc4: Fix setting of vertical timings in the CRTC.
Date Tue, 16 Feb 2016 22:30:04 +0100
Message-ID <r2Vm4-4ZP-27@gated-at.bofh.it> (permalink)
References <r2Vm2-4ZP-17@gated-at.bofh.it>
X-Original-To dri-devel@lists.freedesktop.org
X-Mailer git-send-email 2.7.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>, Eric Anholt <eric@anholt.net>
X-Original-Date Tue, 16 Feb 2016 13:20:18 -0800
X-Original-Message-ID <1455657619-12030-6-git-send-email-eric@anholt.net>
X-Original-References <1455657619-12030-1-git-send-email-eric@anholt.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1335860

Show key headers only | View raw


It looks like when I went to add the interlaced bits, I just took the
existing PV_VERT* block and indented it, instead of copy and pasting
it first.  Without this, changing resolution never worked.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index 5daa824..89562904 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -217,6 +217,16 @@ static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc)
 				 PV_HORZB_HFP) |
 		   VC4_SET_FIELD(mode->hdisplay, PV_HORZB_HACTIVE));
 
+	CRTC_WRITE(PV_VERTA,
+		   VC4_SET_FIELD(mode->vtotal - mode->vsync_end,
+				 PV_VERTA_VBP) |
+		   VC4_SET_FIELD(mode->vsync_end - mode->vsync_start,
+				 PV_VERTA_VSYNC));
+	CRTC_WRITE(PV_VERTB,
+		   VC4_SET_FIELD(mode->vsync_start - mode->vdisplay,
+				 PV_VERTB_VFP) |
+		   VC4_SET_FIELD(vactive, PV_VERTB_VACTIVE));
+
 	if (interlace) {
 		CRTC_WRITE(PV_VERTA_EVEN,
 			   VC4_SET_FIELD(mode->vtotal - mode->vsync_end - 1,
-- 
2.7.0

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

drm/vc4: Modesetting fixes Eric Anholt <eric@anholt.net> - 2016-02-16 22:30 +0100
  [PATCH 5/6] drm/vc4: Fix setting of vertical timings in the CRTC. Eric Anholt <eric@anholt.net> - 2016-02-16 22:30 +0100
  [PATCH 1/6] drm/vc4: Fix a framebuffer reference leak on async flip interrupt. Eric Anholt <eric@anholt.net> - 2016-02-16 22:30 +0100
  [PATCH 2/6] drm/vc4: Bring HDMI up from power off if necessary. Eric Anholt <eric@anholt.net> - 2016-02-16 22:30 +0100

csiph-web