drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c- Extension
.c- Size
- 7114 bytes
- Lines
- 245
- 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/delay.hlinux/gpio/consumer.hlinux/module.hlinux/of.hvideo/mipi_display.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct jdi_fhd_r63452function jdi_fhd_r63452_resetfunction jdi_fhd_r63452_onfunction jdi_fhd_r63452_offfunction jdi_fhd_r63452_preparefunction jdi_fhd_r63452_unpreparefunction jdi_fhd_r63452_get_modesfunction jdi_fhd_r63452_probefunction jdi_fhd_r63452_remove
Annotated Snippet
struct jdi_fhd_r63452 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
};
static inline struct jdi_fhd_r63452 *to_jdi_fhd_r63452(struct drm_panel *panel)
{
return container_of(panel, struct jdi_fhd_r63452, panel);
}
static void jdi_fhd_r63452_reset(struct jdi_fhd_r63452 *ctx)
{
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(10000, 11000);
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
usleep_range(1000, 2000);
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(10000, 11000);
}
static int jdi_fhd_r63452_on(struct jdi_fhd_r63452 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x00);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xd6, 0x01);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xec,
0x64, 0xdc, 0xec, 0x3b, 0x52, 0x00, 0x0b, 0x0b,
0x13, 0x15, 0x68, 0x0b, 0xb5);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x03);
mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_ADDRESS_MODE, 0x00);
mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx, 0x77);
mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0x0000, 0x0437);
mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0x0000, 0x077f);
mipi_dsi_dcs_set_tear_scanline_multi(&dsi_ctx, 0x0000);
mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0x00ff);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x24);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS, 0x00);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x84, 0x00);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 20);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 80);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x04);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x84, 0x00);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xc8, 0x11);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x03);
return dsi_ctx.accum_err;
}
static void jdi_fhd_r63452_off(struct jdi_fhd_r63452 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x00);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xd6, 0x01);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xec,
0x64, 0xdc, 0xec, 0x3b, 0x52, 0x00, 0x0b, 0x0b,
0x13, 0x15, 0x68, 0x0b, 0x95);
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x03);
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_usleep_range(&dsi_ctx, 2000, 3000);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 120);
}
static int jdi_fhd_r63452_prepare(struct drm_panel *panel)
{
struct jdi_fhd_r63452 *ctx = to_jdi_fhd_r63452(panel);
int ret;
jdi_fhd_r63452_reset(ctx);
Annotation
- Immediate include surface: `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `video/mipi_display.h`, `drm/drm_mipi_dsi.h`, `drm/drm_modes.h`, `drm/drm_panel.h`.
- Detected declarations: `struct jdi_fhd_r63452`, `function jdi_fhd_r63452_reset`, `function jdi_fhd_r63452_on`, `function jdi_fhd_r63452_off`, `function jdi_fhd_r63452_prepare`, `function jdi_fhd_r63452_unprepare`, `function jdi_fhd_r63452_get_modes`, `function jdi_fhd_r63452_probe`, `function jdi_fhd_r63452_remove`.
- 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.