Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6659e3ed559db2e730947268f9d57869b7a9016c Commit: 6659e3ed559db2e730947268f9d57869b7a9016c Parent: 4339ab93657cce9ca0e4678053ddcb68149d48fd Author: Ian Armstrong <[EMAIL PROTECTED]> AuthorDate: Fri Oct 12 08:15:41 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Mon Oct 22 12:01:45 2007 -0200
V4L/DVB (6340): ivtvfb: screen mode change sometimes goes wrong This patch partially reverts a previous change that caused the CX2341X_OSD_SET_PIXEL_FORMAT firmware calls to be skipped when the pixel format of the framebuffer wasn't altered by FBIOPUT_VSCREENINFO. Unfortunately, another firmware call on the PVR350 sometimes scrambles the display when trying to adjust the framebuffer settings. This patch re-enables the CX2341X_OSD_SET_PIXEL_FORMAT calls to try and prevent this from occurring. Signed-off-by: Ian Armstrong <[EMAIL PROTECTED]> Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/ivtv/ivtvfb.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index 9684048..0abca6b 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c @@ -166,9 +166,6 @@ struct osd_info { unsigned long fb_end_aligned_physaddr; #endif - /* Current osd mode */ - int osd_mode; - /* Store the buffer offset */ int set_osd_coords_x; int set_osd_coords_y; @@ -470,13 +467,11 @@ static int ivtvfb_set_var(struct ivtv *itv, struct fb_var_screeninfo *var) IVTVFB_DEBUG_WARN("ivtvfb_set_var - Invalid bpp\n"); } - /* Change osd mode if needed. - Although rare, things can go wrong. The extra mode - change seems to help... */ - if (osd_mode != -1 && osd_mode != oi->osd_mode) { + /* Set video mode. Although rare, the display can become scrambled even + if we don't change mode. Always 'bounce' to osd_mode via mode 0 */ + if (osd_mode != -1) { ivtv_vapi(itv, CX2341X_OSD_SET_PIXEL_FORMAT, 1, 0); ivtv_vapi(itv, CX2341X_OSD_SET_PIXEL_FORMAT, 1, osd_mode); - oi->osd_mode = osd_mode; } oi->bits_per_pixel = var->bits_per_pixel; @@ -882,9 +877,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) oi->bits_per_pixel = osd_depth; oi->bytes_per_pixel = oi->bits_per_pixel / 8; - /* Invalidate current osd mode to force a mode switch later */ - oi->osd_mode = -1; - /* Horizontal size & position */ if (osd_xres > 720) osd_xres = 720; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html