Lines Matching +full:fhd +full:- +full:video

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Generated using linux-mdss-dsi-panel-driver-generator from Lineage OS device tree:
6 …com/LineageOS/android_kernel_xiaomi_msm8996/blob/lineage-18.1/arch/arm/boot/dts/qcom/a1-msm8996-mt…
14 #include <video/mipi_display.h>
34 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in jdi_fhd_r63452_reset()
36 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in jdi_fhd_r63452_reset()
38 gpiod_set_value_cansleep(ctx->reset_gpio, 0); in jdi_fhd_r63452_reset()
44 struct mipi_dsi_device *dsi = ctx->dsi; in jdi_fhd_r63452_on()
45 struct device *dev = &dsi->dev; in jdi_fhd_r63452_on()
48 dsi->mode_flags |= MIPI_DSI_MODE_LPM; in jdi_fhd_r63452_on()
124 struct mipi_dsi_device *dsi = ctx->dsi; in jdi_fhd_r63452_off()
125 struct device *dev = &dsi->dev; in jdi_fhd_r63452_off()
128 dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; in jdi_fhd_r63452_off()
157 struct device *dev = &ctx->dsi->dev; in jdi_fhd_r63452_prepare()
160 if (ctx->prepared) in jdi_fhd_r63452_prepare()
168 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in jdi_fhd_r63452_prepare()
172 ctx->prepared = true; in jdi_fhd_r63452_prepare()
179 struct device *dev = &ctx->dsi->dev; in jdi_fhd_r63452_unprepare()
182 if (!ctx->prepared) in jdi_fhd_r63452_unprepare()
187 dev_err(dev, "Failed to un-initialize panel: %d\n", ret); in jdi_fhd_r63452_unprepare()
189 gpiod_set_value_cansleep(ctx->reset_gpio, 1); in jdi_fhd_r63452_unprepare()
191 ctx->prepared = false; in jdi_fhd_r63452_unprepare()
214 mode = drm_mode_duplicate(connector->dev, &jdi_fhd_r63452_mode); in jdi_fhd_r63452_get_modes()
216 return -ENOMEM; in jdi_fhd_r63452_get_modes()
220 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; in jdi_fhd_r63452_get_modes()
221 connector->display_info.width_mm = mode->width_mm; in jdi_fhd_r63452_get_modes()
222 connector->display_info.height_mm = mode->height_mm; in jdi_fhd_r63452_get_modes()
236 struct device *dev = &dsi->dev; in jdi_fhd_r63452_probe()
242 return -ENOMEM; in jdi_fhd_r63452_probe()
244 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in jdi_fhd_r63452_probe()
245 if (IS_ERR(ctx->reset_gpio)) in jdi_fhd_r63452_probe()
246 return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), in jdi_fhd_r63452_probe()
247 "Failed to get reset-gpios\n"); in jdi_fhd_r63452_probe()
249 ctx->dsi = dsi; in jdi_fhd_r63452_probe()
252 dsi->lanes = 4; in jdi_fhd_r63452_probe()
253 dsi->format = MIPI_DSI_FMT_RGB888; in jdi_fhd_r63452_probe()
254 dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST | in jdi_fhd_r63452_probe()
257 drm_panel_init(&ctx->panel, dev, &jdi_fhd_r63452_panel_funcs, in jdi_fhd_r63452_probe()
260 ret = drm_panel_of_backlight(&ctx->panel); in jdi_fhd_r63452_probe()
264 drm_panel_add(&ctx->panel); in jdi_fhd_r63452_probe()
282 dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); in jdi_fhd_r63452_remove()
284 drm_panel_remove(&ctx->panel); in jdi_fhd_r63452_remove()
288 { .compatible = "jdi,fhd-r63452" },
297 .name = "panel-jdi-fhd-r63452",
304 MODULE_DESCRIPTION("DRM driver for JDI FHD R63452 DSI panel, command mode");