Lines Matching +full:10 +full:- +full:inch

1 // SPDX-License-Identifier: GPL-2.0
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()
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()
90 if (!pinfo->enabled) in boe_panel_disable()
93 err = mipi_dsi_dcs_set_display_off(pinfo->link); in boe_panel_disable()
95 dev_err(panel->dev, "failed to set display off: %d\n", err); in boe_panel_disable()
99 pinfo->enabled = false; in boe_panel_disable()
109 if (!pinfo->prepared) in boe_panel_unprepare()
112 err = mipi_dsi_dcs_set_display_off(pinfo->link); in boe_panel_unprepare()
114 dev_err(panel->dev, "failed to set display off: %d\n", err); in boe_panel_unprepare()
116 err = mipi_dsi_dcs_enter_sleep_mode(pinfo->link); in boe_panel_unprepare()
118 dev_err(panel->dev, "failed to enter sleep mode: %d\n", err); in boe_panel_unprepare()
120 /* sleep_mode_delay: 1ms - 2ms */ in boe_panel_unprepare()
125 pinfo->prepared = false; in boe_panel_unprepare()
135 if (pinfo->prepared) in boe_panel_prepare()
138 gpiod_set_value(pinfo->pp18_gpio, 1); in boe_panel_prepare()
139 /* T1: 5ms - 6ms */ in boe_panel_prepare()
141 gpiod_set_value(pinfo->pp33_gpio, 1); in boe_panel_prepare()
144 /* T2: 14ms - 15ms */ in boe_panel_prepare()
146 gpiod_set_value(pinfo->enable_gpio, 1); in boe_panel_prepare()
148 /* T3: 1ms - 2ms */ in boe_panel_prepare()
150 gpiod_set_value(pinfo->enable_gpio, 0); in boe_panel_prepare()
152 /* T4: 1ms - 2ms */ in boe_panel_prepare()
154 gpiod_set_value(pinfo->enable_gpio, 1); in boe_panel_prepare()
156 /* T5: 5ms - 6ms */ in boe_panel_prepare()
160 err = send_mipi_cmds(panel, pinfo->desc->on_cmds); in boe_panel_prepare()
162 dev_err(panel->dev, "failed to send DCS Init Code: %d\n", err); in boe_panel_prepare()
166 err = mipi_dsi_dcs_exit_sleep_mode(pinfo->link); in boe_panel_prepare()
168 dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); in boe_panel_prepare()
172 /* T6: 120ms - 121ms */ in boe_panel_prepare()
175 err = mipi_dsi_dcs_set_display_on(pinfo->link); in boe_panel_prepare()
177 dev_err(panel->dev, "failed to set display on: %d\n", err); in boe_panel_prepare()
181 /* T7: 20ms - 21ms */ in boe_panel_prepare()
184 pinfo->prepared = true; in boe_panel_prepare()
198 if (pinfo->enabled) in boe_panel_enable()
203 ret = mipi_dsi_dcs_set_display_on(pinfo->link); in boe_panel_enable()
205 dev_err(panel->dev, "failed to set display on: %d\n", ret); in boe_panel_enable()
209 pinfo->enabled = true; in boe_panel_enable()
218 const struct drm_display_mode *m = pinfo->desc->display_mode; in boe_panel_get_modes()
221 mode = drm_mode_duplicate(connector->dev, m); in boe_panel_get_modes()
223 dev_err(pinfo->base.dev, "failed to add mode %ux%u@%u\n", in boe_panel_get_modes()
224 m->hdisplay, m->vdisplay, drm_mode_vrefresh(m)); in boe_panel_get_modes()
225 return -ENOMEM; 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()
254 .vsync_start = 1920 + 10,
255 .vsync_end = 1920 + 10 + 14,
256 .vtotal = 1920 + 10 + 14 + 4,
259 /* 8 inch */
536 /* 10 inch */
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()
859 if (ret != -EPROBE_DEFER) 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()
867 if (ret != -EPROBE_DEFER) 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()
875 if (ret != -EPROBE_DEFER) 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()
898 pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL); in panel_probe()
900 return -ENOMEM; in panel_probe()
902 desc = of_device_get_match_data(&dsi->dev); in panel_probe()
903 dsi->mode_flags = desc->mode_flags; in panel_probe()
904 dsi->format = desc->format; in panel_probe()
905 dsi->lanes = desc->lanes; in panel_probe()
906 pinfo->desc = desc; in panel_probe()
908 pinfo->link = dsi; in panel_probe()
917 drm_panel_remove(&pinfo->base); in panel_probe()
927 err = boe_panel_disable(&pinfo->base); in panel_remove()
929 dev_err(&dsi->dev, "failed to disable panel: %d\n", err); in panel_remove()
931 err = boe_panel_unprepare(&pinfo->base); in panel_remove()
933 dev_err(&dsi->dev, "failed to unprepare panel: %d\n", err); in panel_remove()
937 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); in panel_remove()
939 drm_panel_remove(&pinfo->base); in panel_remove()
946 boe_panel_disable(&pinfo->base); in panel_shutdown()
947 boe_panel_unprepare(&pinfo->base); in panel_shutdown()
952 .name = "panel-boe-himax8279d",