• Home
  • Raw
  • Download

Lines Matching refs:pinfo

61 static void disable_gpios(struct panel_info *pinfo)  in disable_gpios()  argument
63 gpiod_set_value(pinfo->enable_gpio, 0); in disable_gpios()
64 gpiod_set_value(pinfo->pp33_gpio, 0); in disable_gpios()
65 gpiod_set_value(pinfo->pp18_gpio, 0); in disable_gpios()
70 struct panel_info *pinfo = to_panel_info(panel); in send_mipi_cmds() local
74 for (i = 0; i < pinfo->desc->on_cmds_num; i++) { in send_mipi_cmds()
75 err = mipi_dsi_dcs_write_buffer(pinfo->link, &cmds[i], in send_mipi_cmds()
87 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_disable() local
90 if (!pinfo->enabled) in boe_panel_disable()
93 err = mipi_dsi_dcs_set_display_off(pinfo->link); in boe_panel_disable()
99 pinfo->enabled = false; in boe_panel_disable()
106 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_unprepare() local
109 if (!pinfo->prepared) in boe_panel_unprepare()
112 err = mipi_dsi_dcs_set_display_off(pinfo->link); in boe_panel_unprepare()
116 err = mipi_dsi_dcs_enter_sleep_mode(pinfo->link); in boe_panel_unprepare()
123 disable_gpios(pinfo); in boe_panel_unprepare()
125 pinfo->prepared = false; in boe_panel_unprepare()
132 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_prepare() local
135 if (pinfo->prepared) in boe_panel_prepare()
138 gpiod_set_value(pinfo->pp18_gpio, 1); in boe_panel_prepare()
141 gpiod_set_value(pinfo->pp33_gpio, 1); in boe_panel_prepare()
146 gpiod_set_value(pinfo->enable_gpio, 1); in boe_panel_prepare()
150 gpiod_set_value(pinfo->enable_gpio, 0); in boe_panel_prepare()
154 gpiod_set_value(pinfo->enable_gpio, 1); in boe_panel_prepare()
160 err = send_mipi_cmds(panel, pinfo->desc->on_cmds); in boe_panel_prepare()
166 err = mipi_dsi_dcs_exit_sleep_mode(pinfo->link); in boe_panel_prepare()
175 err = mipi_dsi_dcs_set_display_on(pinfo->link); in boe_panel_prepare()
184 pinfo->prepared = true; in boe_panel_prepare()
189 disable_gpios(pinfo); in boe_panel_prepare()
195 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_enable() local
198 if (pinfo->enabled) in boe_panel_enable()
203 ret = mipi_dsi_dcs_set_display_on(pinfo->link); in boe_panel_enable()
209 pinfo->enabled = true; in boe_panel_enable()
217 struct panel_info *pinfo = to_panel_info(panel); in boe_panel_get_modes() local
218 const struct drm_display_mode *m = pinfo->desc->display_mode; in boe_panel_get_modes()
223 dev_err(pinfo->base.dev, "failed to add mode %ux%u@%u\n", in boe_panel_get_modes()
232 connector->display_info.width_mm = pinfo->desc->width_mm; in boe_panel_get_modes()
233 connector->display_info.height_mm = pinfo->desc->height_mm; in boe_panel_get_modes()
234 connector->display_info.bpc = pinfo->desc->bpc; in boe_panel_get_modes()
851 static int panel_add(struct panel_info *pinfo) in panel_add() argument
853 struct device *dev = &pinfo->link->dev; in panel_add()
856 pinfo->pp18_gpio = devm_gpiod_get(dev, "pp18", GPIOD_OUT_HIGH); in panel_add()
857 if (IS_ERR(pinfo->pp18_gpio)) { in panel_add()
858 ret = PTR_ERR(pinfo->pp18_gpio); in panel_add()
864 pinfo->pp33_gpio = devm_gpiod_get(dev, "pp33", GPIOD_OUT_HIGH); in panel_add()
865 if (IS_ERR(pinfo->pp33_gpio)) { in panel_add()
866 ret = PTR_ERR(pinfo->pp33_gpio); in panel_add()
872 pinfo->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH); in panel_add()
873 if (IS_ERR(pinfo->enable_gpio)) { in panel_add()
874 ret = PTR_ERR(pinfo->enable_gpio); in panel_add()
880 drm_panel_init(&pinfo->base, dev, &panel_funcs, in panel_add()
883 ret = drm_panel_of_backlight(&pinfo->base); in panel_add()
887 drm_panel_add(&pinfo->base); in panel_add()
894 struct panel_info *pinfo; in panel_probe() local
898 pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL); in panel_probe()
899 if (!pinfo) in panel_probe()
906 pinfo->desc = desc; in panel_probe()
908 pinfo->link = dsi; in panel_probe()
909 mipi_dsi_set_drvdata(dsi, pinfo); in panel_probe()
911 err = panel_add(pinfo); in panel_probe()
917 drm_panel_remove(&pinfo->base); in panel_probe()
924 struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); in panel_remove() local
927 err = boe_panel_disable(&pinfo->base); in panel_remove()
931 err = boe_panel_unprepare(&pinfo->base); in panel_remove()
939 drm_panel_remove(&pinfo->base); in panel_remove()
946 struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi); in panel_shutdown() local
948 boe_panel_disable(&pinfo->base); in panel_shutdown()
949 boe_panel_unprepare(&pinfo->base); in panel_shutdown()