Lines Matching full:sd
48 static inline u32 osd_read(struct osd_state *sd, u32 offset) in osd_read() argument
50 struct osd_state *osd = sd; in osd_read()
55 static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset) in osd_write() argument
57 struct osd_state *osd = sd; in osd_write()
64 static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) in osd_set() argument
66 struct osd_state *osd = sd; in osd_set()
76 static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) in osd_clear() argument
78 struct osd_state *osd = sd; in osd_clear()
88 static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, in osd_modify() argument
91 struct osd_state *osd = sd; in osd_modify()
114 * @sd: ptr to struct osd_state
127 static int _osd_dm6446_vid0_pingpong(struct osd_state *sd, in _osd_dm6446_vid0_pingpong() argument
134 pdata = (struct osd_platform_data *)sd->dev->platform_data; in _osd_dm6446_vid0_pingpong()
138 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR); in _osd_dm6446_vid0_pingpong()
139 osd_write(sd, fb_base_phys & ~0x1F, OSD_PPVWIN0ADR); in _osd_dm6446_vid0_pingpong()
140 osd_modify(sd, OSD_MISCCTL_PPSW | OSD_MISCCTL_PPRV, 0, in _osd_dm6446_vid0_pingpong()
146 osd_write(sd, in _osd_dm6446_vid0_pingpong()
149 osd_write(sd, in _osd_dm6446_vid0_pingpong()
152 osd_modify(sd, in _osd_dm6446_vid0_pingpong()
163 static void _osd_set_field_inversion(struct osd_state *sd, int enable) in _osd_set_field_inversion() argument
170 osd_modify(sd, OSD_MODE_FSINV, fsinv, OSD_MODE); in _osd_set_field_inversion()
173 static void _osd_set_blink_attribute(struct osd_state *sd, int enable, in _osd_set_blink_attribute() argument
183 osd_modify(sd, OSD_OSDATRMD_BLNKINT | OSD_OSDATRMD_BLNK, osdatrmd, in _osd_set_blink_attribute()
187 static void _osd_set_rom_clut(struct osd_state *sd, in _osd_set_rom_clut() argument
191 osd_clear(sd, OSD_MISCCTL_RSEL, OSD_MISCCTL); in _osd_set_rom_clut()
193 osd_set(sd, OSD_MISCCTL_RSEL, OSD_MISCCTL); in _osd_set_rom_clut()
196 static void _osd_set_palette_map(struct osd_state *sd, in _osd_set_palette_map() argument
242 osd_modify(sd, bmp_mask, clut_index << bmp_shift, bmp_offset); in _osd_set_palette_map()
245 static void _osd_set_rec601_attenuation(struct osd_state *sd, in _osd_set_rec601_attenuation() argument
250 osd_modify(sd, OSD_OSDWIN0MD_ATN0E, in _osd_set_rec601_attenuation()
253 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_set_rec601_attenuation()
254 osd_modify(sd, OSD_OSDWIN0MD_ATN0E, in _osd_set_rec601_attenuation()
257 else if ((sd->vpbe_type == VPBE_VERSION_3) || in _osd_set_rec601_attenuation()
258 (sd->vpbe_type == VPBE_VERSION_2)) in _osd_set_rec601_attenuation()
259 osd_modify(sd, OSD_EXTMODE_ATNOSD0EN, in _osd_set_rec601_attenuation()
264 osd_modify(sd, OSD_OSDWIN1MD_ATN1E, in _osd_set_rec601_attenuation()
267 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_set_rec601_attenuation()
268 osd_modify(sd, OSD_OSDWIN1MD_ATN1E, in _osd_set_rec601_attenuation()
271 else if ((sd->vpbe_type == VPBE_VERSION_3) || in _osd_set_rec601_attenuation()
272 (sd->vpbe_type == VPBE_VERSION_2)) in _osd_set_rec601_attenuation()
273 osd_modify(sd, OSD_EXTMODE_ATNOSD1EN, in _osd_set_rec601_attenuation()
280 static void _osd_set_blending_factor(struct osd_state *sd, in _osd_set_blending_factor() argument
286 osd_modify(sd, OSD_OSDWIN0MD_BLND0, in _osd_set_blending_factor()
290 osd_modify(sd, OSD_OSDWIN1MD_BLND1, in _osd_set_blending_factor()
296 static void _osd_enable_rgb888_pixblend(struct osd_state *sd, in _osd_enable_rgb888_pixblend() argument
300 osd_modify(sd, OSD_MISCCTL_BLDSEL, 0, OSD_MISCCTL); in _osd_enable_rgb888_pixblend()
303 osd_modify(sd, OSD_EXTMODE_OSD0BLDCHR, in _osd_enable_rgb888_pixblend()
307 osd_modify(sd, OSD_EXTMODE_OSD1BLDCHR, in _osd_enable_rgb888_pixblend()
313 static void _osd_enable_color_key(struct osd_state *sd, in _osd_enable_color_key() argument
323 if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_enable_color_key()
326 osd_modify(sd, OSD_TRANSPBMPIDX_BMP0, in _osd_enable_color_key()
332 osd_modify(sd, OSD_TRANSPBMPIDX_BMP1, in _osd_enable_color_key()
341 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_enable_color_key()
342 osd_write(sd, colorkey & OSD_TRANSPVAL_RGBTRANS, in _osd_enable_color_key()
344 else if (sd->vpbe_type == VPBE_VERSION_3) in _osd_enable_color_key()
345 osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL, in _osd_enable_color_key()
350 if (sd->vpbe_type == VPBE_VERSION_3) in _osd_enable_color_key()
351 osd_modify(sd, OSD_TRANSPVALU_Y, colorkey, in _osd_enable_color_key()
355 if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_enable_color_key()
356 osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL, in _osd_enable_color_key()
358 osd_modify(sd, OSD_TRANSPVALU_RGBU, colorkey >> 16, in _osd_enable_color_key()
368 osd_set(sd, OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD); in _osd_enable_color_key()
371 osd_set(sd, OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD); in _osd_enable_color_key()
376 static void _osd_disable_color_key(struct osd_state *sd, in _osd_disable_color_key() argument
381 osd_clear(sd, OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD); in _osd_disable_color_key()
384 osd_clear(sd, OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD); in _osd_disable_color_key()
389 static void _osd_set_osd_clut(struct osd_state *sd, in _osd_set_osd_clut() argument
399 osd_modify(sd, OSD_OSDWIN0MD_CLUTS0, winmd, OSD_OSDWIN0MD); in _osd_set_osd_clut()
404 osd_modify(sd, OSD_OSDWIN1MD_CLUTS1, winmd, OSD_OSDWIN1MD); in _osd_set_osd_clut()
409 static void _osd_set_zoom(struct osd_state *sd, enum osd_layer layer, in _osd_set_zoom() argument
419 osd_modify(sd, OSD_OSDWIN0MD_OHZ0 | OSD_OSDWIN0MD_OVZ0, winmd, in _osd_set_zoom()
425 osd_modify(sd, OSD_VIDWINMD_VHZ0 | OSD_VIDWINMD_VVZ0, winmd, in _osd_set_zoom()
431 osd_modify(sd, OSD_OSDWIN1MD_OHZ1 | OSD_OSDWIN1MD_OVZ1, winmd, in _osd_set_zoom()
437 osd_modify(sd, OSD_VIDWINMD_VHZ1 | OSD_VIDWINMD_VVZ1, winmd, in _osd_set_zoom()
443 static void _osd_disable_layer(struct osd_state *sd, enum osd_layer layer) in _osd_disable_layer() argument
447 osd_clear(sd, OSD_OSDWIN0MD_OACT0, OSD_OSDWIN0MD); in _osd_disable_layer()
450 osd_clear(sd, OSD_VIDWINMD_ACT0, OSD_VIDWINMD); in _osd_disable_layer()
454 osd_clear(sd, OSD_OSDWIN1MD_OASW | OSD_OSDWIN1MD_OACT1, in _osd_disable_layer()
458 osd_clear(sd, OSD_VIDWINMD_ACT1, OSD_VIDWINMD); in _osd_disable_layer()
463 static void osd_disable_layer(struct osd_state *sd, enum osd_layer layer) in osd_disable_layer() argument
465 struct osd_state *osd = sd; in osd_disable_layer()
477 _osd_disable_layer(sd, layer); in osd_disable_layer()
482 static void _osd_enable_attribute_mode(struct osd_state *sd) in _osd_enable_attribute_mode() argument
485 osd_set(sd, OSD_OSDWIN1MD_OASW, OSD_OSDWIN1MD); in _osd_enable_attribute_mode()
488 static void _osd_enable_layer(struct osd_state *sd, enum osd_layer layer) in _osd_enable_layer() argument
492 osd_set(sd, OSD_OSDWIN0MD_OACT0, OSD_OSDWIN0MD); in _osd_enable_layer()
495 osd_set(sd, OSD_VIDWINMD_ACT0, OSD_VIDWINMD); in _osd_enable_layer()
499 osd_modify(sd, OSD_OSDWIN1MD_OASW | OSD_OSDWIN1MD_OACT1, in _osd_enable_layer()
503 osd_set(sd, OSD_VIDWINMD_ACT1, OSD_VIDWINMD); in _osd_enable_layer()
508 static int osd_enable_layer(struct osd_state *sd, enum osd_layer layer, in osd_enable_layer() argument
511 struct osd_state *osd = sd; in osd_enable_layer()
538 _osd_enable_layer(sd, layer); in osd_enable_layer()
540 _osd_enable_attribute_mode(sd); in osd_enable_layer()
541 _osd_set_blink_attribute(sd, osd->is_blinking, osd->blink); in osd_enable_layer()
557 static void _osd_start_layer(struct osd_state *sd, enum osd_layer layer, in _osd_start_layer() argument
562 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_start_layer()
565 osd_write(sd, fb_base_phys & ~0x1F, OSD_OSDWIN0ADR); in _osd_start_layer()
568 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR); in _osd_start_layer()
571 osd_write(sd, fb_base_phys & ~0x1F, OSD_OSDWIN1ADR); in _osd_start_layer()
574 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN1ADR); in _osd_start_layer()
577 } else if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_start_layer()
583 osd_modify(sd, OSD_OSDWINADH_O0AH, in _osd_start_layer()
587 osd_write(sd, fb_offset_32 & OSD_OSDWIN0ADL_O0AL, in _osd_start_layer()
591 osd_modify(sd, OSD_VIDWINADH_V0AH, in _osd_start_layer()
595 osd_write(sd, fb_offset_32 & OSD_VIDWIN0ADL_V0AL, in _osd_start_layer()
599 osd_modify(sd, OSD_OSDWINADH_O1AH, in _osd_start_layer()
603 osd_write(sd, fb_offset_32 & OSD_OSDWIN1ADL_O1AL, in _osd_start_layer()
607 osd_modify(sd, OSD_VIDWINADH_V1AH, in _osd_start_layer()
611 osd_write(sd, fb_offset_32 & OSD_VIDWIN1ADL_V1AL, in _osd_start_layer()
615 } else if (sd->vpbe_type == VPBE_VERSION_2) { in _osd_start_layer()
616 struct osd_window_state *win = &sd->win[layer]; in _osd_start_layer()
637 osd_modify(sd, OSD_VIDWIN0OFST_V0AH, in _osd_start_layer()
642 osd_modify(sd, OSD_VIDWINADH_V0AH, in _osd_start_layer()
647 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
650 osd_modify(sd, OSD_VIDWIN1OFST_V1AH, in _osd_start_layer()
656 osd_modify(sd, OSD_VIDWINADH_V1AH, in _osd_start_layer()
662 osd_write(sd, cbcr_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
672 osd_modify(sd, OSD_OSDWIN0OFST_O0AH, in _osd_start_layer()
677 osd_modify(sd, OSD_OSDWINADH_O0AH, in _osd_start_layer()
681 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
686 osd_modify(sd, OSD_VIDWIN0OFST_V0AH, in _osd_start_layer()
691 osd_modify(sd, OSD_VIDWINADH_V0AH, in _osd_start_layer()
696 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
701 osd_modify(sd, OSD_OSDWIN1OFST_O1AH, in _osd_start_layer()
706 osd_modify(sd, OSD_OSDWINADH_O1AH, in _osd_start_layer()
711 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
716 osd_modify(sd, OSD_VIDWIN1OFST_V1AH, in _osd_start_layer()
721 osd_modify(sd, OSD_VIDWINADH_V1AH, in _osd_start_layer()
726 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
734 static void osd_start_layer(struct osd_state *sd, enum osd_layer layer, in osd_start_layer() argument
738 struct osd_state *osd = sd; in osd_start_layer()
746 _osd_start_layer(sd, layer, fb_base_phys, cbcr_ofst); in osd_start_layer()
750 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_start_layer()
758 static void osd_get_layer_config(struct osd_state *sd, enum osd_layer layer, in osd_get_layer_config() argument
761 struct osd_state *osd = sd; in osd_get_layer_config()
774 * @sd: ptr to struct osd_state
784 static int try_layer_config(struct osd_state *sd, enum osd_layer layer, in try_layer_config() argument
787 struct osd_state *osd = sd; in try_layer_config()
899 static void _osd_disable_vid_rgb888(struct osd_state *sd) in _osd_disable_vid_rgb888() argument
907 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_disable_vid_rgb888()
908 osd_clear(sd, OSD_MISCCTL_RGBEN, OSD_MISCCTL); in _osd_disable_vid_rgb888()
911 static void _osd_enable_vid_rgb888(struct osd_state *sd, in _osd_enable_vid_rgb888() argument
921 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_enable_vid_rgb888()
923 osd_modify(sd, OSD_MISCCTL_RGBEN | OSD_MISCCTL_RGBWIN, in _osd_enable_vid_rgb888()
926 osd_modify(sd, OSD_MISCCTL_RGBEN | OSD_MISCCTL_RGBWIN, in _osd_enable_vid_rgb888()
932 static void _osd_set_cbcr_order(struct osd_state *sd, in _osd_set_cbcr_order() argument
940 osd_clear(sd, OSD_MODE_CS, OSD_MODE); in _osd_set_cbcr_order()
942 osd_set(sd, OSD_MODE_CS, OSD_MODE); in _osd_set_cbcr_order()
945 static void _osd_set_layer_config(struct osd_state *sd, enum osd_layer layer, in _osd_set_layer_config() argument
950 _osd_set_cbcr_order(sd, lconfig->pixfmt); in _osd_set_layer_config()
954 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_set_layer_config()
958 } else if ((sd->vpbe_type == VPBE_VERSION_3) || in _osd_set_layer_config()
959 (sd->vpbe_type == VPBE_VERSION_2)) { in _osd_set_layer_config()
968 _osd_enable_rgb888_pixblend(sd, OSDWIN_OSD0); in _osd_set_layer_config()
1002 osd_modify(sd, winmd_mask, winmd, OSD_OSDWIN0MD); in _osd_set_layer_config()
1003 osd_write(sd, lconfig->line_length >> 5, OSD_OSDWIN0OFST); in _osd_set_layer_config()
1004 osd_write(sd, lconfig->xpos, OSD_OSDWIN0XP); in _osd_set_layer_config()
1005 osd_write(sd, lconfig->xsize, OSD_OSDWIN0XL); in _osd_set_layer_config()
1007 osd_write(sd, lconfig->ypos >> 1, OSD_OSDWIN0YP); in _osd_set_layer_config()
1008 osd_write(sd, lconfig->ysize >> 1, OSD_OSDWIN0YL); in _osd_set_layer_config()
1010 osd_write(sd, lconfig->ypos, OSD_OSDWIN0YP); in _osd_set_layer_config()
1011 osd_write(sd, lconfig->ysize, OSD_OSDWIN0YL); in _osd_set_layer_config()
1019 osd_modify(sd, winmd_mask, winmd, OSD_VIDWINMD); in _osd_set_layer_config()
1020 osd_write(sd, lconfig->line_length >> 5, OSD_VIDWIN0OFST); in _osd_set_layer_config()
1021 osd_write(sd, lconfig->xpos, OSD_VIDWIN0XP); in _osd_set_layer_config()
1022 osd_write(sd, lconfig->xsize, OSD_VIDWIN0XL); in _osd_set_layer_config()
1027 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1033 osd_modify(sd, winmd_mask, winmd, in _osd_set_layer_config()
1037 osd_modify(sd, OSD_MISCCTL_S420D, in _osd_set_layer_config()
1039 osd_write(sd, lconfig->line_length >> 5, in _osd_set_layer_config()
1041 osd_write(sd, lconfig->xpos, OSD_VIDWIN1XP); in _osd_set_layer_config()
1042 osd_write(sd, lconfig->xsize, OSD_VIDWIN1XL); in _osd_set_layer_config()
1049 osd_write(sd, in _osd_set_layer_config()
1052 osd_write(sd, in _osd_set_layer_config()
1056 } else if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1058 osd_modify(sd, OSD_MISCCTL_S420D, ~OSD_MISCCTL_S420D, in _osd_set_layer_config()
1063 osd_write(sd, lconfig->ypos >> 1, OSD_VIDWIN0YP); in _osd_set_layer_config()
1064 osd_write(sd, lconfig->ysize >> 1, OSD_VIDWIN0YL); in _osd_set_layer_config()
1065 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1067 osd_write(sd, lconfig->ypos >> 1, in _osd_set_layer_config()
1069 osd_write(sd, lconfig->ysize >> 1, in _osd_set_layer_config()
1073 osd_write(sd, lconfig->ypos, OSD_VIDWIN0YP); in _osd_set_layer_config()
1074 osd_write(sd, lconfig->ysize, OSD_VIDWIN0YL); in _osd_set_layer_config()
1075 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1077 osd_write(sd, lconfig->ypos, OSD_VIDWIN1YP); in _osd_set_layer_config()
1078 osd_write(sd, lconfig->ysize, OSD_VIDWIN1YL); in _osd_set_layer_config()
1089 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_set_layer_config()
1099 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_set_layer_config()
1103 } else if ((sd->vpbe_type == VPBE_VERSION_3) in _osd_set_layer_config()
1104 || (sd->vpbe_type == VPBE_VERSION_2)) { in _osd_set_layer_config()
1114 _osd_enable_rgb888_pixblend(sd, in _osd_set_layer_config()
1151 osd_modify(sd, winmd_mask, winmd, OSD_OSDWIN1MD); in _osd_set_layer_config()
1152 osd_write(sd, lconfig->line_length >> 5, OSD_OSDWIN1OFST); in _osd_set_layer_config()
1153 osd_write(sd, lconfig->xpos, OSD_OSDWIN1XP); in _osd_set_layer_config()
1154 osd_write(sd, lconfig->xsize, OSD_OSDWIN1XL); in _osd_set_layer_config()
1156 osd_write(sd, lconfig->ypos >> 1, OSD_OSDWIN1YP); in _osd_set_layer_config()
1157 osd_write(sd, lconfig->ysize >> 1, OSD_OSDWIN1YL); in _osd_set_layer_config()
1159 osd_write(sd, lconfig->ypos, OSD_OSDWIN1YP); in _osd_set_layer_config()
1160 osd_write(sd, lconfig->ysize, OSD_OSDWIN1YL); in _osd_set_layer_config()
1168 osd_modify(sd, winmd_mask, winmd, OSD_VIDWINMD); in _osd_set_layer_config()
1169 osd_write(sd, lconfig->line_length >> 5, OSD_VIDWIN1OFST); in _osd_set_layer_config()
1170 osd_write(sd, lconfig->xpos, OSD_VIDWIN1XP); in _osd_set_layer_config()
1171 osd_write(sd, lconfig->xsize, OSD_VIDWIN1XL); in _osd_set_layer_config()
1176 if (sd->vpbe_type == VPBE_VERSION_2) { in _osd_set_layer_config()
1182 osd_modify(sd, winmd_mask, winmd, in _osd_set_layer_config()
1185 osd_modify(sd, OSD_MISCCTL_S420D, in _osd_set_layer_config()
1187 osd_write(sd, lconfig->line_length >> 5, in _osd_set_layer_config()
1189 osd_write(sd, lconfig->xpos, OSD_VIDWIN0XP); in _osd_set_layer_config()
1190 osd_write(sd, lconfig->xsize, OSD_VIDWIN0XL); in _osd_set_layer_config()
1192 osd_modify(sd, OSD_MISCCTL_S420D, in _osd_set_layer_config()
1198 osd_write(sd, lconfig->ypos >> 1, OSD_VIDWIN1YP); in _osd_set_layer_config()
1199 osd_write(sd, lconfig->ysize >> 1, OSD_VIDWIN1YL); in _osd_set_layer_config()
1200 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1202 osd_write(sd, lconfig->ypos >> 1, in _osd_set_layer_config()
1204 osd_write(sd, lconfig->ysize >> 1, in _osd_set_layer_config()
1208 osd_write(sd, lconfig->ypos, OSD_VIDWIN1YP); in _osd_set_layer_config()
1209 osd_write(sd, lconfig->ysize, OSD_VIDWIN1YL); in _osd_set_layer_config()
1210 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1212 osd_write(sd, lconfig->ypos, OSD_VIDWIN0YP); in _osd_set_layer_config()
1213 osd_write(sd, lconfig->ysize, OSD_VIDWIN0YL); in _osd_set_layer_config()
1220 static int osd_set_layer_config(struct osd_state *sd, enum osd_layer layer, in osd_set_layer_config() argument
1223 struct osd_state *osd = sd; in osd_set_layer_config()
1231 reject_config = try_layer_config(sd, layer, lconfig); in osd_set_layer_config()
1251 _osd_disable_layer(sd, layer); in osd_set_layer_config()
1255 _osd_set_layer_config(sd, layer, lconfig); in osd_set_layer_config()
1270 _osd_set_osd_clut(sd, OSDWIN_OSD1, in osd_set_layer_config()
1272 _osd_set_blending_factor(sd, OSDWIN_OSD1, in osd_set_layer_config()
1275 _osd_enable_color_key(sd, OSDWIN_OSD1, in osd_set_layer_config()
1280 _osd_disable_color_key(sd, OSDWIN_OSD1); in osd_set_layer_config()
1281 _osd_set_rec601_attenuation(sd, OSDWIN_OSD1, in osd_set_layer_config()
1291 _osd_set_blink_attribute(sd, osd->is_blinking, in osd_set_layer_config()
1332 _osd_set_palette_map(sd, osdwin, clut_index, in osd_set_layer_config()
1342 _osd_enable_vid_rgb888(sd, WIN_VID0); in osd_set_layer_config()
1344 _osd_enable_vid_rgb888(sd, WIN_VID1); in osd_set_layer_config()
1346 _osd_disable_vid_rgb888(sd); in osd_set_layer_config()
1350 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_set_layer_config()
1360 static void osd_init_layer(struct osd_state *sd, enum osd_layer layer) in osd_init_layer() argument
1362 struct osd_state *osd = sd; in osd_init_layer()
1372 _osd_disable_layer(sd, layer); in osd_init_layer()
1376 _osd_set_zoom(sd, layer, win->h_zoom, win->v_zoom); in osd_init_layer()
1379 _osd_start_layer(sd, layer, win->fb_base_phys, 0); in osd_init_layer()
1398 _osd_set_layer_config(sd, layer, cfg); in osd_init_layer()
1400 _osd_set_osd_clut(sd, osdwin, osdwin_state->clut); in osd_init_layer()
1402 _osd_disable_color_key(sd, osdwin); in osd_init_layer()
1404 _osd_set_blending_factor(sd, osdwin, osdwin_state->blend); in osd_init_layer()
1406 _osd_set_rec601_attenuation(sd, osdwin, in osd_init_layer()
1417 _osd_set_layer_config(sd, layer, cfg); in osd_init_layer()
1424 static void osd_release_layer(struct osd_state *sd, enum osd_layer layer) in osd_release_layer() argument
1426 struct osd_state *osd = sd; in osd_release_layer()
1438 osd_init_layer(sd, layer); in osd_release_layer()
1446 static int osd_request_layer(struct osd_state *sd, enum osd_layer layer) in osd_request_layer() argument
1448 struct osd_state *osd = sd; in osd_request_layer()
1465 static void _osd_init(struct osd_state *sd) in _osd_init() argument
1467 osd_write(sd, 0, OSD_MODE); in _osd_init()
1468 osd_write(sd, 0, OSD_VIDWINMD); in _osd_init()
1469 osd_write(sd, 0, OSD_OSDWIN0MD); in _osd_init()
1470 osd_write(sd, 0, OSD_OSDWIN1MD); in _osd_init()
1471 osd_write(sd, 0, OSD_RECTCUR); in _osd_init()
1472 osd_write(sd, 0, OSD_MISCCTL); in _osd_init()
1473 if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_init()
1474 osd_write(sd, 0, OSD_VBNDRY); in _osd_init()
1475 osd_write(sd, 0, OSD_EXTMODE); in _osd_init()
1476 osd_write(sd, OSD_MISCCTL_DMANG, OSD_MISCCTL); in _osd_init()
1480 static void osd_set_left_margin(struct osd_state *sd, u32 val) in osd_set_left_margin() argument
1482 osd_write(sd, val, OSD_BASEPX); in osd_set_left_margin()
1485 static void osd_set_top_margin(struct osd_state *sd, u32 val) in osd_set_top_margin() argument
1487 osd_write(sd, val, OSD_BASEPY); in osd_set_top_margin()