dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: fix interlaced modes
@ 2015-02-23 19:45 Alex Deucher
  0 siblings, 0 replies; only message in thread
From: Alex Deucher @ 2015-02-23 19:45 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher

The viewport needs the frame size, not the field size.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/atombios_crtc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 7d827cb..41b460a 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1405,6 +1405,9 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
 	       (x << 16) | y);
 	viewport_w = crtc->mode.hdisplay;
 	viewport_h = (crtc->mode.vdisplay + 1) & ~1;
+	/* viewport is frame size, not field */
+	if (crtc->mode.flags & DRM_MODE_FLAG_INTERLACE)
+		viewport_h *= 2;
 	WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
 	       (viewport_w << 16) | viewport_h);
 
@@ -1605,6 +1608,9 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,
 	       (x << 16) | y);
 	viewport_w = crtc->mode.hdisplay;
 	viewport_h = (crtc->mode.vdisplay + 1) & ~1;
+	/* viewport is frame size, not field */
+	if (crtc->mode.flags & DRM_MODE_FLAG_INTERLACE)
+		viewport_h *= 2;
 	WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
 	       (viewport_w << 16) | viewport_h);
 
-- 
1.8.3.1

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-23 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 19:45 [PATCH] drm/radeon: fix interlaced modes Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox