Lines Matching refs:osd

47 	struct osd_state *osd = sd;  in osd_read()  local
49 return readl(osd->osd_base + offset); in osd_read()
54 struct osd_state *osd = sd; in osd_write() local
56 writel(val, osd->osd_base + offset); in osd_write()
63 struct osd_state *osd = sd; in osd_set() local
65 u32 addr = osd->osd_base + offset; in osd_set()
75 struct osd_state *osd = sd; in osd_clear() local
77 u32 addr = osd->osd_base + offset; in osd_clear()
88 struct osd_state *osd = sd; in osd_modify() local
90 u32 addr = osd->osd_base + offset; in osd_modify()
462 struct osd_state *osd = sd; in osd_disable_layer() local
463 struct osd_window_state *win = &osd->win[layer]; in osd_disable_layer()
466 spin_lock_irqsave(&osd->lock, flags); in osd_disable_layer()
469 spin_unlock_irqrestore(&osd->lock, flags); in osd_disable_layer()
476 spin_unlock_irqrestore(&osd->lock, flags); in osd_disable_layer()
508 struct osd_state *osd = sd; in osd_enable_layer() local
509 struct osd_window_state *win = &osd->win[layer]; in osd_enable_layer()
513 spin_lock_irqsave(&osd->lock, flags); in osd_enable_layer()
524 spin_unlock_irqrestore(&osd->lock, flags); in osd_enable_layer()
529 spin_unlock_irqrestore(&osd->lock, flags); in osd_enable_layer()
538 _osd_set_blink_attribute(sd, osd->is_blinking, osd->blink); in osd_enable_layer()
541 spin_unlock_irqrestore(&osd->lock, flags); in osd_enable_layer()
735 struct osd_state *osd = sd; in osd_start_layer() local
736 struct osd_window_state *win = &osd->win[layer]; in osd_start_layer()
740 spin_lock_irqsave(&osd->lock, flags); in osd_start_layer()
746 osd->pingpong = in osd_start_layer()
747 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_start_layer()
752 spin_unlock_irqrestore(&osd->lock, flags); in osd_start_layer()
758 struct osd_state *osd = sd; in osd_get_layer_config() local
759 struct osd_window_state *win = &osd->win[layer]; in osd_get_layer_config()
762 spin_lock_irqsave(&osd->lock, flags); in osd_get_layer_config()
766 spin_unlock_irqrestore(&osd->lock, flags); in osd_get_layer_config()
784 struct osd_state *osd = sd; in try_layer_config() local
785 struct osd_window_state *win = &osd->win[layer]; in try_layer_config()
795 if (osd->vpbe_type == VPBE_VERSION_1) in try_layer_config()
803 if (osd->vpbe_type == VPBE_VERSION_1) in try_layer_config()
805 else if ((osd->vpbe_type == VPBE_VERSION_3) || in try_layer_config()
806 (osd->vpbe_type == VPBE_VERSION_2)) in try_layer_config()
810 if (osd->vpbe_type != VPBE_VERSION_2) in try_layer_config()
833 if ((osd->vpbe_type == VPBE_VERSION_1) && in try_layer_config()
837 pixfmt = osd->win[WIN_OSD1].lconfig.pixfmt; in try_layer_config()
839 pixfmt = osd->win[WIN_OSD0].lconfig.pixfmt; in try_layer_config()
852 if ((osd->vpbe_type == VPBE_VERSION_1) && is_vid_win(layer) && in try_layer_config()
857 pixfmt = osd->win[WIN_VID1].lconfig.pixfmt; in try_layer_config()
859 pixfmt = osd->win[WIN_VID0].lconfig.pixfmt; in try_layer_config()
1219 struct osd_state *osd = sd; in osd_set_layer_config() local
1220 struct osd_window_state *win = &osd->win[layer]; in osd_set_layer_config()
1225 spin_lock_irqsave(&osd->lock, flags); in osd_set_layer_config()
1229 spin_unlock_irqrestore(&osd->lock, flags); in osd_set_layer_config()
1235 osd->yc_pixfmt = lconfig->pixfmt; in osd_set_layer_config()
1255 &osd->osdwin[OSDWIN_OSD1]; in osd_set_layer_config()
1287 _osd_set_blink_attribute(sd, osd->is_blinking, in osd_set_layer_config()
1288 osd->blink); in osd_set_layer_config()
1303 &osd->osdwin[osdwin]; in osd_set_layer_config()
1337 if (osd->win[WIN_VID0].lconfig.pixfmt == PIXFMT_RGB888) in osd_set_layer_config()
1339 else if (osd->win[WIN_VID1].lconfig.pixfmt == PIXFMT_RGB888) in osd_set_layer_config()
1345 osd->pingpong = in osd_set_layer_config()
1346 _osd_dm6446_vid0_pingpong(sd, osd->field_inversion, in osd_set_layer_config()
1351 spin_unlock_irqrestore(&osd->lock, flags); in osd_set_layer_config()
1358 struct osd_state *osd = sd; in osd_init_layer() local
1359 struct osd_window_state *win = &osd->win[layer]; in osd_init_layer()
1365 spin_lock_irqsave(&osd->lock, flags); in osd_init_layer()
1387 osdwin_state = &osd->osdwin[osdwin]; in osd_init_layer()
1406 osd->is_blinking = 0; in osd_init_layer()
1407 osd->blink = BLINK_X1; in osd_init_layer()
1412 cfg->pixfmt = osd->yc_pixfmt; in osd_init_layer()
1417 spin_unlock_irqrestore(&osd->lock, flags); in osd_init_layer()
1422 struct osd_state *osd = sd; in osd_release_layer() local
1423 struct osd_window_state *win = &osd->win[layer]; in osd_release_layer()
1426 spin_lock_irqsave(&osd->lock, flags); in osd_release_layer()
1429 spin_unlock_irqrestore(&osd->lock, flags); in osd_release_layer()
1433 spin_unlock_irqrestore(&osd->lock, flags); in osd_release_layer()
1435 spin_lock_irqsave(&osd->lock, flags); in osd_release_layer()
1439 spin_unlock_irqrestore(&osd->lock, flags); in osd_release_layer()
1444 struct osd_state *osd = sd; in osd_request_layer() local
1445 struct osd_window_state *win = &osd->win[layer]; in osd_request_layer()
1448 spin_lock_irqsave(&osd->lock, flags); in osd_request_layer()
1451 spin_unlock_irqrestore(&osd->lock, flags); in osd_request_layer()
1456 spin_unlock_irqrestore(&osd->lock, flags); in osd_request_layer()
1486 static int osd_initialize(struct osd_state *osd) in osd_initialize() argument
1488 if (osd == NULL) in osd_initialize()
1490 _osd_init(osd); in osd_initialize()
1493 osd->yc_pixfmt = PIXFMT_YCbCrI; in osd_initialize()
1495 if (osd->vpbe_type == VPBE_VERSION_3) { in osd_initialize()
1500 osd->rom_clut = ROM_CLUT1; in osd_initialize()
1503 _osd_set_field_inversion(osd, osd->field_inversion); in osd_initialize()
1504 _osd_set_rom_clut(osd, osd->rom_clut); in osd_initialize()
1506 osd_init_layer(osd, WIN_OSD0); in osd_initialize()
1507 osd_init_layer(osd, WIN_VID0); in osd_initialize()
1508 osd_init_layer(osd, WIN_OSD1); in osd_initialize()
1509 osd_init_layer(osd, WIN_VID1); in osd_initialize()
1530 struct osd_state *osd; in osd_probe() local
1534 osd = kzalloc(sizeof(struct osd_state), GFP_KERNEL); in osd_probe()
1535 if (osd == NULL) in osd_probe()
1538 osd->dev = &pdev->dev; in osd_probe()
1540 osd->vpbe_type = (enum vpbe_version)pdata->vpbe_type; in osd_probe()
1542 dev_err(osd->dev, "No platform data defined for OSD" in osd_probe()
1550 dev_err(osd->dev, "Unable to get OSD register address map\n"); in osd_probe()
1554 osd->osd_base_phys = res->start; in osd_probe()
1555 osd->osd_size = resource_size(res); in osd_probe()
1556 if (!request_mem_region(osd->osd_base_phys, osd->osd_size, in osd_probe()
1558 dev_err(osd->dev, "Unable to reserve OSD MMIO region\n"); in osd_probe()
1562 osd->osd_base = (unsigned long)ioremap_nocache(res->start, in osd_probe()
1563 osd->osd_size); in osd_probe()
1564 if (!osd->osd_base) { in osd_probe()
1565 dev_err(osd->dev, "Unable to map the OSD region\n"); in osd_probe()
1569 spin_lock_init(&osd->lock); in osd_probe()
1570 osd->ops = osd_ops; in osd_probe()
1571 platform_set_drvdata(pdev, osd); in osd_probe()
1572 dev_notice(osd->dev, "OSD sub device probe success\n"); in osd_probe()
1576 release_mem_region(osd->osd_base_phys, osd->osd_size); in osd_probe()
1578 kfree(osd); in osd_probe()
1584 struct osd_state *osd = platform_get_drvdata(pdev); in osd_remove() local
1586 iounmap((void *)osd->osd_base); in osd_remove()
1587 release_mem_region(osd->osd_base_phys, osd->osd_size); in osd_remove()
1588 kfree(osd); in osd_remove()