diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | 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 9684048fe56c..0abca6bec7d4 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
@@ -166,9 +166,6 @@ struct osd_info { | |||
166 | unsigned long fb_end_aligned_physaddr; | 166 | unsigned long fb_end_aligned_physaddr; |
167 | #endif | 167 | #endif |
168 | 168 | ||
169 | /* Current osd mode */ | ||
170 | int osd_mode; | ||
171 | |||
172 | /* Store the buffer offset */ | 169 | /* Store the buffer offset */ |
173 | int set_osd_coords_x; | 170 | int set_osd_coords_x; |
174 | int set_osd_coords_y; | 171 | int set_osd_coords_y; |
@@ -470,13 +467,11 @@ static int ivtvfb_set_var(struct ivtv *itv, struct fb_var_screeninfo *var) | |||
470 | IVTVFB_DEBUG_WARN("ivtvfb_set_var - Invalid bpp\n"); | 467 | IVTVFB_DEBUG_WARN("ivtvfb_set_var - Invalid bpp\n"); |
471 | } | 468 | } |
472 | 469 | ||
473 | /* Change osd mode if needed. | 470 | /* Set video mode. Although rare, the display can become scrambled even |
474 | Although rare, things can go wrong. The extra mode | 471 | if we don't change mode. Always 'bounce' to osd_mode via mode 0 */ |
475 | change seems to help... */ | 472 | if (osd_mode != -1) { |
476 | if (osd_mode != -1 && osd_mode != oi->osd_mode) { | ||
477 | ivtv_vapi(itv, CX2341X_OSD_SET_PIXEL_FORMAT, 1, 0); | 473 | ivtv_vapi(itv, CX2341X_OSD_SET_PIXEL_FORMAT, 1, 0); |
478 | ivtv_vapi(itv, CX2341X_OSD_SET_PIXEL_FORMAT, 1, osd_mode); | 474 | ivtv_vapi(itv, CX2341X_OSD_SET_PIXEL_FORMAT, 1, osd_mode); |
479 | oi->osd_mode = osd_mode; | ||
480 | } | 475 | } |
481 | 476 | ||
482 | oi->bits_per_pixel = var->bits_per_pixel; | 477 | oi->bits_per_pixel = var->bits_per_pixel; |
@@ -882,9 +877,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) | |||
882 | oi->bits_per_pixel = osd_depth; | 877 | oi->bits_per_pixel = osd_depth; |
883 | oi->bytes_per_pixel = oi->bits_per_pixel / 8; | 878 | oi->bytes_per_pixel = oi->bits_per_pixel / 8; |
884 | 879 | ||
885 | /* Invalidate current osd mode to force a mode switch later */ | ||
886 | oi->osd_mode = -1; | ||
887 | |||
888 | /* Horizontal size & position */ | 880 | /* Horizontal size & position */ |
889 | 881 | ||
890 | if (osd_xres > 720) osd_xres = 720; | 882 | if (osd_xres > 720) osd_xres = 720; |