Lines Matching refs:panel

73 	if (fb->panel->backlight) {  in clcdfb_disable()
74 fb->panel->backlight->props.power = FB_BLANK_POWERDOWN; in clcdfb_disable()
75 backlight_update_status(fb->panel->backlight); in clcdfb_disable()
126 if (fb->panel->backlight) { in clcdfb_enable()
127 fb->panel->backlight->props.power = FB_BLANK_UNBLANK; in clcdfb_enable()
128 backlight_update_status(fb->panel->backlight); in clcdfb_enable()
144 if (fb->panel->caps && fb->board->caps) in clcdfb_set_bitfields()
145 caps = fb->panel->caps & fb->board->caps; in clcdfb_set_bitfields()
148 caps = fb->panel->cntl & CNTL_BGR ? in clcdfb_set_bitfields()
155 if (!(fb->panel->cntl & CNTL_LCDTFT)) in clcdfb_set_bitfields()
512 fb->fb.var.xres = fb->panel->mode.xres; in clcdfb_register()
513 fb->fb.var.yres = fb->panel->mode.yres; in clcdfb_register()
514 fb->fb.var.xres_virtual = fb->panel->mode.xres; in clcdfb_register()
515 fb->fb.var.yres_virtual = fb->panel->mode.yres; in clcdfb_register()
516 fb->fb.var.bits_per_pixel = fb->panel->bpp; in clcdfb_register()
517 fb->fb.var.grayscale = fb->panel->grayscale; in clcdfb_register()
518 fb->fb.var.pixclock = fb->panel->mode.pixclock; in clcdfb_register()
519 fb->fb.var.left_margin = fb->panel->mode.left_margin; in clcdfb_register()
520 fb->fb.var.right_margin = fb->panel->mode.right_margin; in clcdfb_register()
521 fb->fb.var.upper_margin = fb->panel->mode.upper_margin; in clcdfb_register()
522 fb->fb.var.lower_margin = fb->panel->mode.lower_margin; in clcdfb_register()
523 fb->fb.var.hsync_len = fb->panel->mode.hsync_len; in clcdfb_register()
524 fb->fb.var.vsync_len = fb->panel->mode.vsync_len; in clcdfb_register()
525 fb->fb.var.sync = fb->panel->mode.sync; in clcdfb_register()
526 fb->fb.var.vmode = fb->panel->mode.vmode; in clcdfb_register()
529 fb->fb.var.height = fb->panel->height; in clcdfb_register()
530 fb->fb.var.width = fb->panel->width; in clcdfb_register()
560 fb->board->name, fb->panel->mode.name); in clcdfb_register()
627 static int clcdfb_of_get_backlight(struct device_node *panel, in clcdfb_of_get_backlight() argument
633 backlight = of_parse_phandle(panel, "backlight", 0); in clcdfb_of_get_backlight()
644 static int clcdfb_of_get_mode(struct device *dev, struct device_node *panel, in clcdfb_of_get_mode() argument
653 if (of_device_is_compatible(panel, "panel-dpi")) in clcdfb_of_get_mode()
654 err = clcdfb_of_get_dpi_panel_mode(panel, clcd_panel); in clcdfb_of_get_mode()
692 fb->panel->tim2 |= TIM2_BCD; in clcdfb_of_init_tft_panel()
695 fb->panel->cntl |= CNTL_LCDTFT | CNTL_LCDVCOMP(1); in clcdfb_of_init_tft_panel()
697 fb->panel->caps = 0; in clcdfb_of_init_tft_panel()
700 for (i = 0; i < ARRAY_SIZE(panels) && !fb->panel->caps; i++) { in clcdfb_of_init_tft_panel()
706 fb->panel->caps = panels[i].caps; in clcdfb_of_init_tft_panel()
714 fb->panel->bgr_connection = true; in clcdfb_of_init_tft_panel()
716 if (fb->panel->caps && fb->vendor->st_bitmux_control) { in clcdfb_of_init_tft_panel()
728 if (fb->panel->caps & CLCD_CAP_888) { in clcdfb_of_init_tft_panel()
730 } else if (fb->panel->caps & CLCD_CAP_565) { in clcdfb_of_init_tft_panel()
732 fb->panel->cntl |= CNTL_ST_1XBPP_565; in clcdfb_of_init_tft_panel()
733 } else if (fb->panel->caps & CLCD_CAP_5551) { in clcdfb_of_init_tft_panel()
735 fb->panel->cntl |= CNTL_ST_1XBPP_5551; in clcdfb_of_init_tft_panel()
736 } else if (fb->panel->caps & CLCD_CAP_444) { in clcdfb_of_init_tft_panel()
738 fb->panel->cntl |= CNTL_ST_1XBPP_444; in clcdfb_of_init_tft_panel()
743 fb->panel->cntl |= CNTL_ST_CDWID_24; in clcdfb_of_init_tft_panel()
745 fb->panel->cntl |= CNTL_ST_CDWID_18; in clcdfb_of_init_tft_panel()
747 fb->panel->cntl |= CNTL_ST_CDWID_16; in clcdfb_of_init_tft_panel()
749 fb->panel->cntl |= CNTL_ST_CDWID_12; in clcdfb_of_init_tft_panel()
752 return fb->panel->caps ? 0 : -EINVAL; in clcdfb_of_init_tft_panel()
757 struct device_node *endpoint, *panel; in clcdfb_of_init_display() local
763 fb->panel = devm_kzalloc(&fb->dev->dev, sizeof(*fb->panel), GFP_KERNEL); in clcdfb_of_init_display()
764 if (!fb->panel) in clcdfb_of_init_display()
774 panel = of_graph_get_remote_port_parent(endpoint); in clcdfb_of_init_display()
775 if (!panel) in clcdfb_of_init_display()
779 err = fb->vendor->init_panel(fb, panel); in clcdfb_of_init_display()
784 err = clcdfb_of_get_backlight(panel, fb->panel); in clcdfb_of_init_display()
788 err = clcdfb_of_get_mode(&fb->dev->dev, panel, fb->panel); in clcdfb_of_init_display()
803 / PICOS2KHZ(fb->panel->mode.pixclock); in clcdfb_of_init_display()
809 fb->panel->bpp = bpp; in clcdfb_of_init_display()
812 fb->panel->cntl |= CNTL_BEBO; in clcdfb_of_init_display()
814 fb->panel->width = -1; in clcdfb_of_init_display()
815 fb->panel->height = -1; in clcdfb_of_init_display()
884 framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres * in clcdfb_of_dma_setup()
885 fb->panel->bpp / 8); in clcdfb_of_dma_setup()