Skip to contentSkip to conversation

ocfb: fix tgdel and tvdel timing parameters

PATCH RESEND In review Andrea Merello 3 participants 3 messages Jan 26, 2016 – Jan 29, 2016 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 ocfb: fix tgdel and tvdel timing parameters

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).

drivers/video/fbdev/ocfb.c +2 -2
index c9293ae..a970edc2 100644
@@ -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

Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Andrea Merello

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).

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.

#2 lore raw
In reply to Andrea Merello
Quoted 29 lines · Andrea Merello

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).

drivers/video/fbdev/ocfb.c +2 -3
index c9293ae..a970edc2 100644
@@ -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 +
--
Quoted 2 lines

1.9.1

Thanks, queued for 4.5 fixes.

Tomi