drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c- Extension
.c- Size
- 135679 bytes
- Lines
- 3101
- 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
drm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_of.hdrm/drm_panel.hdrm/drm_print.hdrm/drm_probe_helper.hlinux/gpio/consumer.hlinux/delay.hlinux/module.hlinux/of.hlinux/regulator/consumer.hvideo/mipi_display.h
Detected Declarations
struct jadardstruct jadard_panel_descstruct jadardfunction jadard_enable_standard_cmdsfunction jadard_disablefunction jadard_preparefunction jadard_unpreparefunction jadard_get_modesfunction jadard_panel_get_orientationfunction radxa_display_8hd_ad002_init_cmdsfunction cz101b4001_init_cmdsfunction kingdisplay_kd101ne3_init_cmdsfunction melfas_lmfbx101117480_init_cmdsfunction anbernic_rgds_init_cmdsfunction taiguan_xti05101_01a_init_cmdsfunction waveshare_3_4_c_initfunction waveshare_4_0_c_initfunction waveshare_8_0_a_initfunction waveshare_10_1_a_initfunction waveshare_10_1_b_initfunction jadard_dsi_probefunction jadard_dsi_remove
Annotated Snippet
struct jadard_panel_desc {
const struct drm_display_mode *mode_4ln;
const struct drm_display_mode *mode_2ln;
unsigned int lanes;
enum mipi_dsi_pixel_format format;
int (*init)(struct jadard *jadard);
bool lp11_before_reset;
bool reset_before_power_off_vcioo;
unsigned int vcioo_to_lp11_delay_ms;
unsigned int lp11_to_reset_delay_ms;
unsigned int backlight_off_to_display_off_delay_ms;
unsigned int display_off_to_enter_sleep_delay_ms;
unsigned int enter_sleep_to_reset_down_delay_ms;
unsigned long mode_flags;
};
struct jadard {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
const struct jadard_panel_desc *desc;
enum drm_panel_orientation orientation;
struct regulator *vdd;
struct regulator *vccio;
struct gpio_desc *reset;
};
#define JD9365DA_DCS_SWITCH_PAGE 0xe0
#define jd9365da_switch_page(dsi_ctx, page) \
mipi_dsi_dcs_write_seq_multi(dsi_ctx, JD9365DA_DCS_SWITCH_PAGE, (page))
static void jadard_enable_standard_cmds(struct mipi_dsi_multi_context *dsi_ctx)
{
mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0xe1, 0x93);
mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0xe2, 0x65);
mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0xe3, 0xf8);
if (dsi_ctx->dsi->lanes == 2)
mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0x80, 0x01);
else
mipi_dsi_dcs_write_seq_multi(dsi_ctx, 0x80, 0x03);
}
static inline struct jadard *panel_to_jadard(struct drm_panel *panel)
{
return container_of(panel, struct jadard, panel);
}
static int jadard_disable(struct drm_panel *panel)
{
struct jadard *jadard = panel_to_jadard(panel);
struct mipi_dsi_multi_context dsi_ctx = { .dsi = jadard->dsi };
if (jadard->desc->backlight_off_to_display_off_delay_ms)
mipi_dsi_msleep(&dsi_ctx, jadard->desc->backlight_off_to_display_off_delay_ms);
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
if (jadard->desc->display_off_to_enter_sleep_delay_ms)
mipi_dsi_msleep(&dsi_ctx, jadard->desc->display_off_to_enter_sleep_delay_ms);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
if (jadard->desc->enter_sleep_to_reset_down_delay_ms)
mipi_dsi_msleep(&dsi_ctx, jadard->desc->enter_sleep_to_reset_down_delay_ms);
return dsi_ctx.accum_err;
}
static int jadard_prepare(struct drm_panel *panel)
{
struct jadard *jadard = panel_to_jadard(panel);
int ret;
ret = regulator_enable(jadard->vccio);
if (ret)
return ret;
ret = regulator_enable(jadard->vdd);
if (ret)
return ret;
if (jadard->desc->vcioo_to_lp11_delay_ms)
msleep(jadard->desc->vcioo_to_lp11_delay_ms);
if (jadard->desc->lp11_before_reset) {
ret = mipi_dsi_dcs_nop(jadard->dsi);
if (ret)
return ret;
}
Annotation
- Immediate include surface: `drm/drm_mipi_dsi.h`, `drm/drm_modes.h`, `drm/drm_of.h`, `drm/drm_panel.h`, `drm/drm_print.h`, `drm/drm_probe_helper.h`, `linux/gpio/consumer.h`, `linux/delay.h`.
- Detected declarations: `struct jadard`, `struct jadard_panel_desc`, `struct jadard`, `function jadard_enable_standard_cmds`, `function jadard_disable`, `function jadard_prepare`, `function jadard_unprepare`, `function jadard_get_modes`, `function jadard_panel_get_orientation`, `function radxa_display_8hd_ad002_init_cmds`.
- 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.