[PATCH resend] ocfb: fix tgdel and tvdel timing parameters

Subsystems: framebuffer layer, the rest

STALE3847d

3 messages, 3 authors, 2016-01-29 · open the first message on its own page

[PATCH resend] ocfb: fix tgdel and tvdel timing parameters

From: Andrea Merello <hidden>
Date: 2016-01-26 14:48:04

According to the ocfb documentation:
Fix tgdel HW param should be left margin, not right.
Fix tvdel HW param should upper margin, not lower.

This seems to fix lock issues on certain monitors (tested on a
slightly customized IP, but the FPGA guy said that it should
be the same wrt this changes).

Signed-off-by: Andrea Merello <redacted>
diff --git a/drivers/video/fbdev/ocfb.c b/drivers/video/fbdev/ocfb.c
index c9293ae..a970edc2 100644
--- a/drivers/video/fbdev/ocfb.c
+++ b/drivers/video/fbdev/ocfb.c
@@ -123,11 +123,11 @@ static int ocfb_setupfb(struct ocfb_dev *fbdev)

 	/* Horizontal timings */
 	ocfb_writereg(fbdev, OCFB_HTIM, (var->hsync_len - 1) << 24 |
-		      (var->right_margin - 1) << 16 | (var->xres - 1));
+		      (var->left_margin - 1) << 16 | (var->xres - 1));

 	/* Vertical timings */
 	ocfb_writereg(fbdev, OCFB_VTIM, (var->vsync_len - 1) << 24 |
-		      (var->lower_margin - 1) << 16 | (var->yres - 1));
+		      (var->upper_margin - 1) << 16 | (var->yres - 1));

 	/* Total length of frame */
 	hlen = var->left_margin + var->right_margin + var->hsync_len +
--
1.9.1

Re: [PATCH resend] ocfb: fix tgdel and tvdel timing parameters

From: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Date: 2016-01-26 20:36:50

On Tue, Jan 26, 2016 at 03:48:04PM +0100, Andrea Merello wrote:
According to the ocfb documentation:
Fix tgdel HW param should be left margin, not right.
Fix tvdel HW param should upper margin, not lower.

This seems to fix lock issues on certain monitors (tested on a
slightly customized IP, but the FPGA guy said that it should
be the same wrt this changes).

Signed-off-by: Andrea Merello <redacted>
I don't have a hardware setup at the moment to test this,
but you are right about the ocfb documentation and looking at the rtl,
it seems right.

Acked-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

Re: [PATCH resend] ocfb: fix tgdel and tvdel timing parameters

From: Tomi Valkeinen <hidden>
Date: 2016-01-29 11:35:02


On 26/01/16 16:48, Andrea Merello wrote:
quoted hunk
According to the ocfb documentation:
Fix tgdel HW param should be left margin, not right.
Fix tvdel HW param should upper margin, not lower.

This seems to fix lock issues on certain monitors (tested on a
slightly customized IP, but the FPGA guy said that it should
be the same wrt this changes).

Signed-off-by: Andrea Merello <redacted>
diff --git a/drivers/video/fbdev/ocfb.c b/drivers/video/fbdev/ocfb.c
index c9293ae..a970edc2 100644
--- a/drivers/video/fbdev/ocfb.c
+++ b/drivers/video/fbdev/ocfb.c
@@ -123,11 +123,11 @@ static int ocfb_setupfb(struct ocfb_dev *fbdev)

 	/* Horizontal timings */
 	ocfb_writereg(fbdev, OCFB_HTIM, (var->hsync_len - 1) << 24 |
-		      (var->right_margin - 1) << 16 | (var->xres - 1));
+		      (var->left_margin - 1) << 16 | (var->xres - 1));

 	/* Vertical timings */
 	ocfb_writereg(fbdev, OCFB_VTIM, (var->vsync_len - 1) << 24 |
-		      (var->lower_margin - 1) << 16 | (var->yres - 1));
+		      (var->upper_margin - 1) << 16 | (var->yres - 1));

 	/* Total length of frame */
 	hlen = var->left_margin + var->right_margin + var->hsync_len +
--
1.9.1
Thanks, queued for 4.5 fixes.

 Tomi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help