Lines Matching refs:sd
63 static inline u32 osd_read(struct osd_state *sd, u32 offset) in osd_read() argument
65 struct osd_state *osd = sd; in osd_read()
70 static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset) in osd_write() argument
72 struct osd_state *osd = sd; in osd_write()
79 static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) in osd_set() argument
81 struct osd_state *osd = sd; in osd_set()
91 static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) in osd_clear() argument
93 struct osd_state *osd = sd; in osd_clear()
103 static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, in osd_modify() argument
106 struct osd_state *osd = sd; in osd_modify()
142 static int _osd_dm6446_vid0_pingpong(struct osd_state *sd, in _osd_dm6446_vid0_pingpong() argument
149 pdata = (struct osd_platform_data *)sd->dev->platform_data; in _osd_dm6446_vid0_pingpong()
153 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR); in _osd_dm6446_vid0_pingpong()
154 osd_write(sd, fb_base_phys & ~0x1F, OSD_PPVWIN0ADR); in _osd_dm6446_vid0_pingpong()
155 osd_modify(sd, OSD_MISCCTL_PPSW | OSD_MISCCTL_PPRV, 0, in _osd_dm6446_vid0_pingpong()
161 osd_write(sd, in _osd_dm6446_vid0_pingpong()
164 osd_write(sd, in _osd_dm6446_vid0_pingpong()
167 osd_modify(sd, in _osd_dm6446_vid0_pingpong()
178 static void _osd_set_field_inversion(struct osd_state *sd, int enable) in _osd_set_field_inversion() argument
185 osd_modify(sd, OSD_MODE_FSINV, fsinv, OSD_MODE); in _osd_set_field_inversion()
188 static void _osd_set_blink_attribute(struct osd_state *sd, int enable, in _osd_set_blink_attribute() argument
198 osd_modify(sd, OSD_OSDATRMD_BLNKINT | OSD_OSDATRMD_BLNK, osdatrmd, in _osd_set_blink_attribute()
202 static void _osd_set_rom_clut(struct osd_state *sd, in _osd_set_rom_clut() argument
206 osd_clear(sd, OSD_MISCCTL_RSEL, OSD_MISCCTL); in _osd_set_rom_clut()
208 osd_set(sd, OSD_MISCCTL_RSEL, OSD_MISCCTL); in _osd_set_rom_clut()
211 static void _osd_set_palette_map(struct osd_state *sd, in _osd_set_palette_map() argument
257 osd_modify(sd, bmp_mask, clut_index << bmp_shift, bmp_offset); in _osd_set_palette_map()
260 static void _osd_set_rec601_attenuation(struct osd_state *sd, in _osd_set_rec601_attenuation() argument
265 osd_modify(sd, OSD_OSDWIN0MD_ATN0E, in _osd_set_rec601_attenuation()
268 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_set_rec601_attenuation()
269 osd_modify(sd, OSD_OSDWIN0MD_ATN0E, in _osd_set_rec601_attenuation()
272 else if ((sd->vpbe_type == VPBE_VERSION_3) || in _osd_set_rec601_attenuation()
273 (sd->vpbe_type == VPBE_VERSION_2)) in _osd_set_rec601_attenuation()
274 osd_modify(sd, OSD_EXTMODE_ATNOSD0EN, in _osd_set_rec601_attenuation()
279 osd_modify(sd, OSD_OSDWIN1MD_ATN1E, in _osd_set_rec601_attenuation()
282 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_set_rec601_attenuation()
283 osd_modify(sd, OSD_OSDWIN1MD_ATN1E, in _osd_set_rec601_attenuation()
286 else if ((sd->vpbe_type == VPBE_VERSION_3) || in _osd_set_rec601_attenuation()
287 (sd->vpbe_type == VPBE_VERSION_2)) in _osd_set_rec601_attenuation()
288 osd_modify(sd, OSD_EXTMODE_ATNOSD1EN, in _osd_set_rec601_attenuation()
295 static void _osd_set_blending_factor(struct osd_state *sd, in _osd_set_blending_factor() argument
301 osd_modify(sd, OSD_OSDWIN0MD_BLND0, in _osd_set_blending_factor()
305 osd_modify(sd, OSD_OSDWIN1MD_BLND1, in _osd_set_blending_factor()
311 static void _osd_enable_rgb888_pixblend(struct osd_state *sd, in _osd_enable_rgb888_pixblend() argument
315 osd_modify(sd, OSD_MISCCTL_BLDSEL, 0, OSD_MISCCTL); in _osd_enable_rgb888_pixblend()
318 osd_modify(sd, OSD_EXTMODE_OSD0BLDCHR, in _osd_enable_rgb888_pixblend()
322 osd_modify(sd, OSD_EXTMODE_OSD1BLDCHR, in _osd_enable_rgb888_pixblend()
328 static void _osd_enable_color_key(struct osd_state *sd, in _osd_enable_color_key() argument
338 if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_enable_color_key()
341 osd_modify(sd, OSD_TRANSPBMPIDX_BMP0, in _osd_enable_color_key()
347 osd_modify(sd, OSD_TRANSPBMPIDX_BMP1, in _osd_enable_color_key()
356 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_enable_color_key()
357 osd_write(sd, colorkey & OSD_TRANSPVAL_RGBTRANS, in _osd_enable_color_key()
359 else if (sd->vpbe_type == VPBE_VERSION_3) in _osd_enable_color_key()
360 osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL, in _osd_enable_color_key()
365 if (sd->vpbe_type == VPBE_VERSION_3) in _osd_enable_color_key()
366 osd_modify(sd, OSD_TRANSPVALU_Y, colorkey, in _osd_enable_color_key()
370 if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_enable_color_key()
371 osd_write(sd, colorkey & OSD_TRANSPVALL_RGBL, in _osd_enable_color_key()
373 osd_modify(sd, OSD_TRANSPVALU_RGBU, colorkey >> 16, in _osd_enable_color_key()
383 osd_set(sd, OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD); in _osd_enable_color_key()
386 osd_set(sd, OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD); in _osd_enable_color_key()
391 static void _osd_disable_color_key(struct osd_state *sd, in _osd_disable_color_key() argument
396 osd_clear(sd, OSD_OSDWIN0MD_TE0, OSD_OSDWIN0MD); in _osd_disable_color_key()
399 osd_clear(sd, OSD_OSDWIN1MD_TE1, OSD_OSDWIN1MD); in _osd_disable_color_key()
404 static void _osd_set_osd_clut(struct osd_state *sd, in _osd_set_osd_clut() argument
414 osd_modify(sd, OSD_OSDWIN0MD_CLUTS0, winmd, OSD_OSDWIN0MD); in _osd_set_osd_clut()
419 osd_modify(sd, OSD_OSDWIN1MD_CLUTS1, winmd, OSD_OSDWIN1MD); in _osd_set_osd_clut()
424 static void _osd_set_zoom(struct osd_state *sd, enum osd_layer layer, in _osd_set_zoom() argument
434 osd_modify(sd, OSD_OSDWIN0MD_OHZ0 | OSD_OSDWIN0MD_OVZ0, winmd, in _osd_set_zoom()
440 osd_modify(sd, OSD_VIDWINMD_VHZ0 | OSD_VIDWINMD_VVZ0, winmd, in _osd_set_zoom()
446 osd_modify(sd, OSD_OSDWIN1MD_OHZ1 | OSD_OSDWIN1MD_OVZ1, winmd, in _osd_set_zoom()
452 osd_modify(sd, OSD_VIDWINMD_VHZ1 | OSD_VIDWINMD_VVZ1, winmd, in _osd_set_zoom()
458 static void _osd_disable_layer(struct osd_state *sd, enum osd_layer layer) in _osd_disable_layer() argument
462 osd_clear(sd, OSD_OSDWIN0MD_OACT0, OSD_OSDWIN0MD); in _osd_disable_layer()
465 osd_clear(sd, OSD_VIDWINMD_ACT0, OSD_VIDWINMD); in _osd_disable_layer()
469 osd_clear(sd, OSD_OSDWIN1MD_OASW | OSD_OSDWIN1MD_OACT1, in _osd_disable_layer()
473 osd_clear(sd, OSD_VIDWINMD_ACT1, OSD_VIDWINMD); in _osd_disable_layer()
478 static void osd_disable_layer(struct osd_state *sd, enum osd_layer layer) in osd_disable_layer() argument
480 struct osd_state *osd = sd; in osd_disable_layer()
492 _osd_disable_layer(sd, layer); in osd_disable_layer()
497 static void _osd_enable_attribute_mode(struct osd_state *sd) in _osd_enable_attribute_mode() argument
500 osd_set(sd, OSD_OSDWIN1MD_OASW, OSD_OSDWIN1MD); in _osd_enable_attribute_mode()
503 static void _osd_enable_layer(struct osd_state *sd, enum osd_layer layer) in _osd_enable_layer() argument
507 osd_set(sd, OSD_OSDWIN0MD_OACT0, OSD_OSDWIN0MD); in _osd_enable_layer()
510 osd_set(sd, OSD_VIDWINMD_ACT0, OSD_VIDWINMD); in _osd_enable_layer()
514 osd_modify(sd, OSD_OSDWIN1MD_OASW | OSD_OSDWIN1MD_OACT1, in _osd_enable_layer()
518 osd_set(sd, OSD_VIDWINMD_ACT1, OSD_VIDWINMD); in _osd_enable_layer()
523 static int osd_enable_layer(struct osd_state *sd, enum osd_layer layer, in osd_enable_layer() argument
526 struct osd_state *osd = sd; in osd_enable_layer()
553 _osd_enable_layer(sd, layer); in osd_enable_layer()
555 _osd_enable_attribute_mode(sd); in osd_enable_layer()
556 _osd_set_blink_attribute(sd, osd->is_blinking, osd->blink); in osd_enable_layer()
572 static void _osd_start_layer(struct osd_state *sd, enum osd_layer layer, in _osd_start_layer() argument
577 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_start_layer()
580 osd_write(sd, fb_base_phys & ~0x1F, OSD_OSDWIN0ADR); in _osd_start_layer()
583 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR); in _osd_start_layer()
586 osd_write(sd, fb_base_phys & ~0x1F, OSD_OSDWIN1ADR); in _osd_start_layer()
589 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN1ADR); in _osd_start_layer()
592 } else if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_start_layer()
598 osd_modify(sd, OSD_OSDWINADH_O0AH, in _osd_start_layer()
602 osd_write(sd, fb_offset_32 & OSD_OSDWIN0ADL_O0AL, in _osd_start_layer()
606 osd_modify(sd, OSD_VIDWINADH_V0AH, in _osd_start_layer()
610 osd_write(sd, fb_offset_32 & OSD_VIDWIN0ADL_V0AL, in _osd_start_layer()
614 osd_modify(sd, OSD_OSDWINADH_O1AH, in _osd_start_layer()
618 osd_write(sd, fb_offset_32 & OSD_OSDWIN1ADL_O1AL, in _osd_start_layer()
622 osd_modify(sd, OSD_VIDWINADH_V1AH, in _osd_start_layer()
626 osd_write(sd, fb_offset_32 & OSD_VIDWIN1ADL_V1AL, in _osd_start_layer()
630 } else if (sd->vpbe_type == VPBE_VERSION_2) { in _osd_start_layer()
631 struct osd_window_state *win = &sd->win[layer]; in _osd_start_layer()
652 osd_modify(sd, OSD_VIDWIN0OFST_V0AH, in _osd_start_layer()
657 osd_modify(sd, OSD_VIDWINADH_V0AH, in _osd_start_layer()
662 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
665 osd_modify(sd, OSD_VIDWIN1OFST_V1AH, in _osd_start_layer()
671 osd_modify(sd, OSD_VIDWINADH_V1AH, in _osd_start_layer()
677 osd_write(sd, cbcr_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
687 osd_modify(sd, OSD_OSDWIN0OFST_O0AH, in _osd_start_layer()
692 osd_modify(sd, OSD_OSDWINADH_O0AH, in _osd_start_layer()
696 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
701 osd_modify(sd, OSD_VIDWIN0OFST_V0AH, in _osd_start_layer()
706 osd_modify(sd, OSD_VIDWINADH_V0AH, in _osd_start_layer()
711 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
716 osd_modify(sd, OSD_OSDWIN1OFST_O1AH, in _osd_start_layer()
721 osd_modify(sd, OSD_OSDWINADH_O1AH, in _osd_start_layer()
726 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
731 osd_modify(sd, OSD_VIDWIN1OFST_V1AH, in _osd_start_layer()
736 osd_modify(sd, OSD_VIDWINADH_V1AH, in _osd_start_layer()
741 osd_write(sd, fb_offset_32 & OSD_WINADL_MASK, in _osd_start_layer()
749 static void osd_start_layer(struct osd_state *sd, enum osd_layer layer, in osd_start_layer() argument
753 struct osd_state *osd = sd; in osd_start_layer()
761 _osd_start_layer(sd, layer, fb_base_phys, cbcr_ofst); in osd_start_layer()
765 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_start_layer()
773 static void osd_get_layer_config(struct osd_state *sd, enum osd_layer layer, in osd_get_layer_config() argument
776 struct osd_state *osd = sd; in osd_get_layer_config()
799 static int try_layer_config(struct osd_state *sd, enum osd_layer layer, in try_layer_config() argument
802 struct osd_state *osd = sd; in try_layer_config()
913 static void _osd_disable_vid_rgb888(struct osd_state *sd) in _osd_disable_vid_rgb888() argument
921 if (sd->vpbe_type == VPBE_VERSION_1) in _osd_disable_vid_rgb888()
922 osd_clear(sd, OSD_MISCCTL_RGBEN, OSD_MISCCTL); in _osd_disable_vid_rgb888()
925 static void _osd_enable_vid_rgb888(struct osd_state *sd, in _osd_enable_vid_rgb888() argument
935 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_enable_vid_rgb888()
937 osd_modify(sd, OSD_MISCCTL_RGBEN | OSD_MISCCTL_RGBWIN, in _osd_enable_vid_rgb888()
940 osd_modify(sd, OSD_MISCCTL_RGBEN | OSD_MISCCTL_RGBWIN, in _osd_enable_vid_rgb888()
946 static void _osd_set_cbcr_order(struct osd_state *sd, in _osd_set_cbcr_order() argument
954 osd_clear(sd, OSD_MODE_CS, OSD_MODE); in _osd_set_cbcr_order()
956 osd_set(sd, OSD_MODE_CS, OSD_MODE); in _osd_set_cbcr_order()
959 static void _osd_set_layer_config(struct osd_state *sd, enum osd_layer layer, in _osd_set_layer_config() argument
964 _osd_set_cbcr_order(sd, lconfig->pixfmt); in _osd_set_layer_config()
968 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_set_layer_config()
972 } else if ((sd->vpbe_type == VPBE_VERSION_3) || in _osd_set_layer_config()
973 (sd->vpbe_type == VPBE_VERSION_2)) { in _osd_set_layer_config()
982 _osd_enable_rgb888_pixblend(sd, OSDWIN_OSD0); in _osd_set_layer_config()
1016 osd_modify(sd, winmd_mask, winmd, OSD_OSDWIN0MD); in _osd_set_layer_config()
1017 osd_write(sd, lconfig->line_length >> 5, OSD_OSDWIN0OFST); in _osd_set_layer_config()
1018 osd_write(sd, lconfig->xpos, OSD_OSDWIN0XP); in _osd_set_layer_config()
1019 osd_write(sd, lconfig->xsize, OSD_OSDWIN0XL); in _osd_set_layer_config()
1021 osd_write(sd, lconfig->ypos >> 1, OSD_OSDWIN0YP); in _osd_set_layer_config()
1022 osd_write(sd, lconfig->ysize >> 1, OSD_OSDWIN0YL); in _osd_set_layer_config()
1024 osd_write(sd, lconfig->ypos, OSD_OSDWIN0YP); in _osd_set_layer_config()
1025 osd_write(sd, lconfig->ysize, OSD_OSDWIN0YL); in _osd_set_layer_config()
1033 osd_modify(sd, winmd_mask, winmd, OSD_VIDWINMD); in _osd_set_layer_config()
1034 osd_write(sd, lconfig->line_length >> 5, OSD_VIDWIN0OFST); in _osd_set_layer_config()
1035 osd_write(sd, lconfig->xpos, OSD_VIDWIN0XP); in _osd_set_layer_config()
1036 osd_write(sd, lconfig->xsize, OSD_VIDWIN0XL); in _osd_set_layer_config()
1041 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1047 osd_modify(sd, winmd_mask, winmd, in _osd_set_layer_config()
1051 osd_modify(sd, OSD_MISCCTL_S420D, in _osd_set_layer_config()
1053 osd_write(sd, lconfig->line_length >> 5, in _osd_set_layer_config()
1055 osd_write(sd, lconfig->xpos, OSD_VIDWIN1XP); in _osd_set_layer_config()
1056 osd_write(sd, lconfig->xsize, OSD_VIDWIN1XL); in _osd_set_layer_config()
1063 osd_write(sd, in _osd_set_layer_config()
1066 osd_write(sd, in _osd_set_layer_config()
1070 } else if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1072 osd_modify(sd, OSD_MISCCTL_S420D, ~OSD_MISCCTL_S420D, in _osd_set_layer_config()
1077 osd_write(sd, lconfig->ypos >> 1, OSD_VIDWIN0YP); in _osd_set_layer_config()
1078 osd_write(sd, lconfig->ysize >> 1, OSD_VIDWIN0YL); in _osd_set_layer_config()
1079 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1081 osd_write(sd, lconfig->ypos >> 1, in _osd_set_layer_config()
1083 osd_write(sd, lconfig->ysize >> 1, in _osd_set_layer_config()
1087 osd_write(sd, lconfig->ypos, OSD_VIDWIN0YP); in _osd_set_layer_config()
1088 osd_write(sd, lconfig->ysize, OSD_VIDWIN0YL); in _osd_set_layer_config()
1089 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1091 osd_write(sd, lconfig->ypos, OSD_VIDWIN1YP); in _osd_set_layer_config()
1092 osd_write(sd, lconfig->ysize, OSD_VIDWIN1YL); in _osd_set_layer_config()
1103 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_set_layer_config()
1113 if (sd->vpbe_type == VPBE_VERSION_1) { in _osd_set_layer_config()
1117 } else if ((sd->vpbe_type == VPBE_VERSION_3) in _osd_set_layer_config()
1118 || (sd->vpbe_type == VPBE_VERSION_2)) { in _osd_set_layer_config()
1128 _osd_enable_rgb888_pixblend(sd, in _osd_set_layer_config()
1165 osd_modify(sd, winmd_mask, winmd, OSD_OSDWIN1MD); in _osd_set_layer_config()
1166 osd_write(sd, lconfig->line_length >> 5, OSD_OSDWIN1OFST); in _osd_set_layer_config()
1167 osd_write(sd, lconfig->xpos, OSD_OSDWIN1XP); in _osd_set_layer_config()
1168 osd_write(sd, lconfig->xsize, OSD_OSDWIN1XL); in _osd_set_layer_config()
1170 osd_write(sd, lconfig->ypos >> 1, OSD_OSDWIN1YP); in _osd_set_layer_config()
1171 osd_write(sd, lconfig->ysize >> 1, OSD_OSDWIN1YL); in _osd_set_layer_config()
1173 osd_write(sd, lconfig->ypos, OSD_OSDWIN1YP); in _osd_set_layer_config()
1174 osd_write(sd, lconfig->ysize, OSD_OSDWIN1YL); in _osd_set_layer_config()
1182 osd_modify(sd, winmd_mask, winmd, OSD_VIDWINMD); in _osd_set_layer_config()
1183 osd_write(sd, lconfig->line_length >> 5, OSD_VIDWIN1OFST); in _osd_set_layer_config()
1184 osd_write(sd, lconfig->xpos, OSD_VIDWIN1XP); in _osd_set_layer_config()
1185 osd_write(sd, lconfig->xsize, OSD_VIDWIN1XL); in _osd_set_layer_config()
1190 if (sd->vpbe_type == VPBE_VERSION_2) { in _osd_set_layer_config()
1196 osd_modify(sd, winmd_mask, winmd, in _osd_set_layer_config()
1199 osd_modify(sd, OSD_MISCCTL_S420D, in _osd_set_layer_config()
1201 osd_write(sd, lconfig->line_length >> 5, in _osd_set_layer_config()
1203 osd_write(sd, lconfig->xpos, OSD_VIDWIN0XP); in _osd_set_layer_config()
1204 osd_write(sd, lconfig->xsize, OSD_VIDWIN0XL); in _osd_set_layer_config()
1206 osd_modify(sd, OSD_MISCCTL_S420D, in _osd_set_layer_config()
1212 osd_write(sd, lconfig->ypos >> 1, OSD_VIDWIN1YP); in _osd_set_layer_config()
1213 osd_write(sd, lconfig->ysize >> 1, OSD_VIDWIN1YL); in _osd_set_layer_config()
1214 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1216 osd_write(sd, lconfig->ypos >> 1, in _osd_set_layer_config()
1218 osd_write(sd, lconfig->ysize >> 1, in _osd_set_layer_config()
1222 osd_write(sd, lconfig->ypos, OSD_VIDWIN1YP); in _osd_set_layer_config()
1223 osd_write(sd, lconfig->ysize, OSD_VIDWIN1YL); in _osd_set_layer_config()
1224 if ((sd->vpbe_type == VPBE_VERSION_2) && in _osd_set_layer_config()
1226 osd_write(sd, lconfig->ypos, OSD_VIDWIN0YP); in _osd_set_layer_config()
1227 osd_write(sd, lconfig->ysize, OSD_VIDWIN0YL); in _osd_set_layer_config()
1234 static int osd_set_layer_config(struct osd_state *sd, enum osd_layer layer, in osd_set_layer_config() argument
1237 struct osd_state *osd = sd; in osd_set_layer_config()
1245 reject_config = try_layer_config(sd, layer, lconfig); in osd_set_layer_config()
1265 _osd_disable_layer(sd, layer); in osd_set_layer_config()
1269 _osd_set_layer_config(sd, layer, lconfig); in osd_set_layer_config()
1284 _osd_set_osd_clut(sd, OSDWIN_OSD1, in osd_set_layer_config()
1286 _osd_set_blending_factor(sd, OSDWIN_OSD1, in osd_set_layer_config()
1289 _osd_enable_color_key(sd, OSDWIN_OSD1, in osd_set_layer_config()
1294 _osd_disable_color_key(sd, OSDWIN_OSD1); in osd_set_layer_config()
1295 _osd_set_rec601_attenuation(sd, OSDWIN_OSD1, in osd_set_layer_config()
1305 _osd_set_blink_attribute(sd, osd->is_blinking, in osd_set_layer_config()
1346 _osd_set_palette_map(sd, osdwin, clut_index, in osd_set_layer_config()
1356 _osd_enable_vid_rgb888(sd, WIN_VID0); in osd_set_layer_config()
1358 _osd_enable_vid_rgb888(sd, WIN_VID1); in osd_set_layer_config()
1360 _osd_disable_vid_rgb888(sd); in osd_set_layer_config()
1364 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_set_layer_config()
1374 static void osd_init_layer(struct osd_state *sd, enum osd_layer layer) in osd_init_layer() argument
1376 struct osd_state *osd = sd; in osd_init_layer()
1386 _osd_disable_layer(sd, layer); in osd_init_layer()
1390 _osd_set_zoom(sd, layer, win->h_zoom, win->v_zoom); in osd_init_layer()
1393 _osd_start_layer(sd, layer, win->fb_base_phys, 0); in osd_init_layer()
1412 _osd_set_layer_config(sd, layer, cfg); in osd_init_layer()
1414 _osd_set_osd_clut(sd, osdwin, osdwin_state->clut); in osd_init_layer()
1416 _osd_disable_color_key(sd, osdwin); in osd_init_layer()
1418 _osd_set_blending_factor(sd, osdwin, osdwin_state->blend); in osd_init_layer()
1420 _osd_set_rec601_attenuation(sd, osdwin, in osd_init_layer()
1431 _osd_set_layer_config(sd, layer, cfg); in osd_init_layer()
1438 static void osd_release_layer(struct osd_state *sd, enum osd_layer layer) in osd_release_layer() argument
1440 struct osd_state *osd = sd; in osd_release_layer()
1452 osd_init_layer(sd, layer); in osd_release_layer()
1460 static int osd_request_layer(struct osd_state *sd, enum osd_layer layer) in osd_request_layer() argument
1462 struct osd_state *osd = sd; in osd_request_layer()
1479 static void _osd_init(struct osd_state *sd) in _osd_init() argument
1481 osd_write(sd, 0, OSD_MODE); in _osd_init()
1482 osd_write(sd, 0, OSD_VIDWINMD); in _osd_init()
1483 osd_write(sd, 0, OSD_OSDWIN0MD); in _osd_init()
1484 osd_write(sd, 0, OSD_OSDWIN1MD); in _osd_init()
1485 osd_write(sd, 0, OSD_RECTCUR); in _osd_init()
1486 osd_write(sd, 0, OSD_MISCCTL); in _osd_init()
1487 if (sd->vpbe_type == VPBE_VERSION_3) { in _osd_init()
1488 osd_write(sd, 0, OSD_VBNDRY); in _osd_init()
1489 osd_write(sd, 0, OSD_EXTMODE); in _osd_init()
1490 osd_write(sd, OSD_MISCCTL_DMANG, OSD_MISCCTL); in _osd_init()
1494 static void osd_set_left_margin(struct osd_state *sd, u32 val) in osd_set_left_margin() argument
1496 osd_write(sd, val, OSD_BASEPX); in osd_set_left_margin()
1499 static void osd_set_top_margin(struct osd_state *sd, u32 val) in osd_set_top_margin() argument
1501 osd_write(sd, val, OSD_BASEPY); in osd_set_top_margin()