drivers/gpu/drm/panel/panel-innolux-p079zca.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-innolux-p079zca.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-innolux-p079zca.c- Extension
.c- Size
- 15336 bytes
- Lines
- 484
- 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.hlinux/regulator/consumer.hvideo/mipi_display.hdrm/drm_crtc.hdrm/drm_device.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct innolux_panelstruct panel_descstruct innolux_panelfunction innolux_panel_unpreparefunction innolux_panel_preparefunction innolux_panel_write_multifunction innolux_p097pfg_initfunction innolux_panel_get_modesfunction innolux_panel_addfunction innolux_panel_delfunction innolux_panel_probefunction innolux_panel_remove
Annotated Snippet
struct panel_desc {
const struct drm_display_mode *mode;
unsigned int bpc;
struct {
unsigned int width;
unsigned int height;
} size;
unsigned long flags;
enum mipi_dsi_pixel_format format;
int (*init)(struct innolux_panel *innolux);
unsigned int lanes;
const char * const *supply_names;
unsigned int num_supplies;
unsigned int sleep_mode_delay;
unsigned int power_down_delay;
};
struct innolux_panel {
struct drm_panel base;
struct mipi_dsi_device *link;
const struct panel_desc *desc;
struct regulator_bulk_data *supplies;
struct gpio_desc *enable_gpio;
};
static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
{
return container_of(panel, struct innolux_panel, base);
}
static int innolux_panel_unprepare(struct drm_panel *panel)
{
struct innolux_panel *innolux = to_innolux_panel(panel);
int err;
err = mipi_dsi_dcs_set_display_off(innolux->link);
if (err < 0)
dev_err(panel->dev, "failed to set display off: %d\n", err);
err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
if (err < 0) {
dev_err(panel->dev, "failed to enter sleep mode: %d\n", err);
return err;
}
if (innolux->desc->sleep_mode_delay)
msleep(innolux->desc->sleep_mode_delay);
gpiod_set_value_cansleep(innolux->enable_gpio, 0);
if (innolux->desc->power_down_delay)
msleep(innolux->desc->power_down_delay);
err = regulator_bulk_disable(innolux->desc->num_supplies,
innolux->supplies);
if (err < 0)
return err;
return 0;
}
static int innolux_panel_prepare(struct drm_panel *panel)
{
struct innolux_panel *innolux = to_innolux_panel(panel);
int err;
gpiod_set_value_cansleep(innolux->enable_gpio, 0);
err = regulator_bulk_enable(innolux->desc->num_supplies,
innolux->supplies);
if (err < 0)
return err;
/* p079zca: t2 (20ms), p097pfg: t4 (15ms) */
usleep_range(20000, 21000);
gpiod_set_value_cansleep(innolux->enable_gpio, 1);
/* p079zca: t4, p097pfg: t5 */
usleep_range(20000, 21000);
if (innolux->desc->init) {
err = innolux->desc->init(innolux);
if (err < 0)
goto poweroff;
}
err = mipi_dsi_dcs_exit_sleep_mode(innolux->link);
Annotation
- Immediate include surface: `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`, `drm/drm_device.h`.
- Detected declarations: `struct innolux_panel`, `struct panel_desc`, `struct innolux_panel`, `function innolux_panel_unprepare`, `function innolux_panel_prepare`, `function innolux_panel_write_multi`, `function innolux_p097pfg_init`, `function innolux_panel_get_modes`, `function innolux_panel_add`, `function innolux_panel_del`.
- 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.