drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c- Extension
.c- Size
- 10030 bytes
- Lines
- 419
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/backlight.hlinux/delay.hlinux/gpio/consumer.hlinux/module.hlinux/of.hlinux/regulator/consumer.hvideo/mipi_display.hdrm/drm_crtc.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct jdi_panelfunction jdi_panel_initfunction jdi_panel_onfunction jdi_panel_offfunction jdi_panel_disablefunction jdi_panel_unpreparefunction jdi_panel_preparefunction jdi_panel_enablefunction jdi_panel_get_modesfunction dsi_dcs_bl_get_brightnessfunction dsi_dcs_bl_update_statusfunction drm_panel_create_dsi_backlightfunction jdi_panel_addfunction jdi_panel_delfunction jdi_panel_probefunction jdi_panel_remove
Annotated Snippet
struct jdi_panel {
struct drm_panel base;
struct mipi_dsi_device *dsi;
struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)];
struct gpio_desc *enable_gpio;
struct gpio_desc *reset_gpio;
struct gpio_desc *dcdc_en_gpio;
struct backlight_device *backlight;
const struct drm_display_mode *mode;
};
static inline struct jdi_panel *to_jdi_panel(struct drm_panel *panel)
{
return container_of(panel, struct jdi_panel, base);
}
static int jdi_panel_init(struct jdi_panel *jdi)
{
struct mipi_dsi_device *dsi = jdi->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);
mipi_dsi_usleep_range(&dsi_ctx, 10000, 20000);
mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx, MIPI_DCS_PIXEL_FMT_24BIT << 4);
mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0, jdi->mode->hdisplay - 1);
mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0, jdi->mode->vdisplay - 1);
/*
* BIT(5) BCTRL = 1 Backlight Control Block On, Brightness registers
* are active
* BIT(3) BL = 1 Backlight Control On
* BIT(2) DD = 0 Display Dimming is Off
*/
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x24);
/* CABC off */
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 120);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x00);
mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
/* Interface setting, video mode */
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb3, 0x26, 0x08, 0x00, 0x20, 0x00);
mipi_dsi_usleep_range(&dsi_ctx, 20000, 21000);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x03);
return dsi_ctx.accum_err;
}
static int jdi_panel_on(struct jdi_panel *jdi)
{
struct mipi_dsi_device *dsi = jdi->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
return dsi_ctx.accum_err;
}
static void jdi_panel_off(struct jdi_panel *jdi)
{
struct mipi_dsi_device *dsi = jdi->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
/* Reset error to continue power-down even if display off failed */
dsi_ctx.accum_err = 0;
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
msleep(100);
}
static int jdi_panel_disable(struct drm_panel *panel)
{
struct jdi_panel *jdi = to_jdi_panel(panel);
Annotation
- Immediate include surface: `linux/backlight.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `linux/regulator/consumer.h`, `video/mipi_display.h`, `drm/drm_crtc.h`.
- Detected declarations: `struct jdi_panel`, `function jdi_panel_init`, `function jdi_panel_on`, `function jdi_panel_off`, `function jdi_panel_disable`, `function jdi_panel_unprepare`, `function jdi_panel_prepare`, `function jdi_panel_enable`, `function jdi_panel_get_modes`, `function dsi_dcs_bl_get_brightness`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.