Lines Matching refs:osd
50 struct osd_state *osd = sd; in osd_read() local
52 return readl(osd->osd_base + offset); in osd_read()
57 struct osd_state *osd = sd; in osd_write() local
59 writel(val, osd->osd_base + offset); in osd_write()
66 struct osd_state *osd = sd; in osd_set() local
68 void __iomem *addr = osd->osd_base + offset; in osd_set()
78 struct osd_state *osd = sd; in osd_clear() local
80 void __iomem *addr = osd->osd_base + offset; in osd_clear()
91 struct osd_state *osd = sd; in osd_modify() local
93 void __iomem *addr = osd->osd_base + offset; in osd_modify()
465 struct osd_state *osd = sd; in osd_disable_layer() local
466 struct osd_window_state *win = &osd->win[layer]; in osd_disable_layer()
469 spin_lock_irqsave(&osd->lock, flags); in osd_disable_layer()
472 spin_unlock_irqrestore(&osd->lock, flags); in osd_disable_layer()
479 spin_unlock_irqrestore(&osd->lock, flags); in osd_disable_layer()
511 struct osd_state *osd = sd; in osd_enable_layer() local
512 struct osd_window_state *win = &osd->win[layer]; in osd_enable_layer()
516 spin_lock_irqsave(&osd->lock, flags); in osd_enable_layer()
527 spin_unlock_irqrestore(&osd->lock, flags); in osd_enable_layer()
532 spin_unlock_irqrestore(&osd->lock, flags); in osd_enable_layer()
541 _osd_set_blink_attribute(sd, osd->is_blinking, osd->blink); in osd_enable_layer()
544 spin_unlock_irqrestore(&osd->lock, flags); in osd_enable_layer()
738 struct osd_state *osd = sd; in osd_start_layer() local
739 struct osd_window_state *win = &osd->win[layer]; in osd_start_layer()
743 spin_lock_irqsave(&osd->lock, flags); in osd_start_layer()
749 osd->pingpong = in osd_start_layer()
750 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_start_layer()
755 spin_unlock_irqrestore(&osd->lock, flags); in osd_start_layer()
761 struct osd_state *osd = sd; in osd_get_layer_config() local
762 struct osd_window_state *win = &osd->win[layer]; in osd_get_layer_config()
765 spin_lock_irqsave(&osd->lock, flags); in osd_get_layer_config()
769 spin_unlock_irqrestore(&osd->lock, flags); in osd_get_layer_config()
787 struct osd_state *osd = sd; in try_layer_config() local
788 struct osd_window_state *win = &osd->win[layer]; in try_layer_config()
798 if (osd->vpbe_type == VPBE_VERSION_1) in try_layer_config()
806 if (osd->vpbe_type == VPBE_VERSION_1) in try_layer_config()
808 else if ((osd->vpbe_type == VPBE_VERSION_3) || in try_layer_config()
809 (osd->vpbe_type == VPBE_VERSION_2)) in try_layer_config()
813 if (osd->vpbe_type != VPBE_VERSION_2) in try_layer_config()
836 if ((osd->vpbe_type == VPBE_VERSION_1) && in try_layer_config()
841 pixfmt = osd->win[WIN_OSD1].lconfig.pixfmt; in try_layer_config()
843 pixfmt = osd->win[WIN_OSD0].lconfig.pixfmt; in try_layer_config()
856 if ((osd->vpbe_type == VPBE_VERSION_1) && is_vid_win(layer) && in try_layer_config()
861 pixfmt = osd->win[WIN_VID1].lconfig.pixfmt; in try_layer_config()
863 pixfmt = osd->win[WIN_VID0].lconfig.pixfmt; in try_layer_config()
1223 struct osd_state *osd = sd; in osd_set_layer_config() local
1224 struct osd_window_state *win = &osd->win[layer]; in osd_set_layer_config()
1229 spin_lock_irqsave(&osd->lock, flags); in osd_set_layer_config()
1233 spin_unlock_irqrestore(&osd->lock, flags); in osd_set_layer_config()
1239 osd->yc_pixfmt = lconfig->pixfmt; in osd_set_layer_config()
1259 &osd->osdwin[OSDWIN_OSD1]; in osd_set_layer_config()
1291 _osd_set_blink_attribute(sd, osd->is_blinking, in osd_set_layer_config()
1292 osd->blink); in osd_set_layer_config()
1307 &osd->osdwin[osdwin]; in osd_set_layer_config()
1341 if (osd->win[WIN_VID0].lconfig.pixfmt == PIXFMT_RGB888) in osd_set_layer_config()
1343 else if (osd->win[WIN_VID1].lconfig.pixfmt == PIXFMT_RGB888) in osd_set_layer_config()
1349 osd->pingpong = in osd_set_layer_config()
1350 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_set_layer_config()
1355 spin_unlock_irqrestore(&osd->lock, flags); in osd_set_layer_config()
1362 struct osd_state *osd = sd; in osd_init_layer() local
1363 struct osd_window_state *win = &osd->win[layer]; in osd_init_layer()
1369 spin_lock_irqsave(&osd->lock, flags); in osd_init_layer()
1391 osdwin_state = &osd->osdwin[osdwin]; in osd_init_layer()
1410 osd->is_blinking = 0; in osd_init_layer()
1411 osd->blink = BLINK_X1; in osd_init_layer()
1416 cfg->pixfmt = osd->yc_pixfmt; in osd_init_layer()
1421 spin_unlock_irqrestore(&osd->lock, flags); in osd_init_layer()
1426 struct osd_state *osd = sd; in osd_release_layer() local
1427 struct osd_window_state *win = &osd->win[layer]; in osd_release_layer()
1430 spin_lock_irqsave(&osd->lock, flags); in osd_release_layer()
1433 spin_unlock_irqrestore(&osd->lock, flags); in osd_release_layer()
1437 spin_unlock_irqrestore(&osd->lock, flags); in osd_release_layer()
1439 spin_lock_irqsave(&osd->lock, flags); in osd_release_layer()
1443 spin_unlock_irqrestore(&osd->lock, flags); in osd_release_layer()
1448 struct osd_state *osd = sd; in osd_request_layer() local
1449 struct osd_window_state *win = &osd->win[layer]; in osd_request_layer()
1452 spin_lock_irqsave(&osd->lock, flags); in osd_request_layer()
1455 spin_unlock_irqrestore(&osd->lock, flags); in osd_request_layer()
1460 spin_unlock_irqrestore(&osd->lock, flags); in osd_request_layer()
1490 static int osd_initialize(struct osd_state *osd) in osd_initialize() argument
1492 if (osd == NULL) in osd_initialize()
1494 _osd_init(osd); in osd_initialize()
1497 osd->yc_pixfmt = PIXFMT_YCBCRI; in osd_initialize()
1499 if (osd->vpbe_type == VPBE_VERSION_3) { in osd_initialize()
1504 osd->rom_clut = ROM_CLUT1; in osd_initialize()
1507 _osd_set_field_inversion(osd, osd->field_inversion); in osd_initialize()
1508 _osd_set_rom_clut(osd, osd->rom_clut); in osd_initialize()
1510 osd_init_layer(osd, WIN_OSD0); in osd_initialize()
1511 osd_init_layer(osd, WIN_VID0); in osd_initialize()
1512 osd_init_layer(osd, WIN_OSD1); in osd_initialize()
1513 osd_init_layer(osd, WIN_VID1); in osd_initialize()
1534 struct osd_state *osd; in osd_probe() local
1541 osd = devm_kzalloc(&pdev->dev, sizeof(struct osd_state), GFP_KERNEL); in osd_probe()
1542 if (osd == NULL) in osd_probe()
1546 osd->dev = &pdev->dev; in osd_probe()
1547 osd->vpbe_type = pdev_id->driver_data; in osd_probe()
1550 osd->osd_base = devm_ioremap_resource(&pdev->dev, res); in osd_probe()
1551 if (IS_ERR(osd->osd_base)) in osd_probe()
1552 return PTR_ERR(osd->osd_base); in osd_probe()
1554 osd->osd_base_phys = res->start; in osd_probe()
1555 osd->osd_size = resource_size(res); in osd_probe()
1556 spin_lock_init(&osd->lock); in osd_probe()
1557 osd->ops = osd_ops; in osd_probe()
1558 platform_set_drvdata(pdev, osd); in osd_probe()
1559 dev_notice(osd->dev, "OSD sub device probe success\n"); in osd_probe()