drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c- Extension
.c- Size
- 5846 bytes
- Lines
- 247
- 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/module.hlinux/of.hlinux/regulator/consumer.hvideo/mipi_display.hdrm/drm_crtc.hdrm/drm_device.hdrm/drm_mipi_dsi.hdrm/drm_panel.h
Detected Declarations
struct wuxga_nt_panelfunction wuxga_nt_panel_onfunction wuxga_nt_panel_disablefunction wuxga_nt_panel_unpreparefunction wuxga_nt_panel_preparefunction wuxga_nt_panel_get_modesfunction wuxga_nt_panel_addfunction wuxga_nt_panel_delfunction wuxga_nt_panel_probefunction wuxga_nt_panel_remove
Annotated Snippet
struct wuxga_nt_panel {
struct drm_panel base;
struct mipi_dsi_device *dsi;
struct regulator *supply;
ktime_t earliest_wake;
const struct drm_display_mode *mode;
};
static inline struct wuxga_nt_panel *to_wuxga_nt_panel(struct drm_panel *panel)
{
return container_of(panel, struct wuxga_nt_panel, base);
}
static int wuxga_nt_panel_on(struct wuxga_nt_panel *wuxga_nt)
{
struct mipi_dsi_multi_context dsi_ctx = {
.dsi = wuxga_nt->dsi
};
mipi_dsi_turn_on_peripheral_multi(&dsi_ctx);
return dsi_ctx.accum_err;
}
static int wuxga_nt_panel_disable(struct drm_panel *panel)
{
struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
struct mipi_dsi_multi_context dsi_ctx = {
.dsi = wuxga_nt->dsi
};
mipi_dsi_shutdown_peripheral_multi(&dsi_ctx);
return dsi_ctx.accum_err;
}
static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
{
struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
regulator_disable(wuxga_nt->supply);
wuxga_nt->earliest_wake = ktime_add_ms(ktime_get_real(), MIN_POFF_MS);
return 0;
}
static int wuxga_nt_panel_prepare(struct drm_panel *panel)
{
struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
int ret;
s64 enablewait;
/*
* If the user re-enabled the panel before the required off-time then
* we need to wait the remaining period before re-enabling regulator
*/
enablewait = ktime_ms_delta(wuxga_nt->earliest_wake, ktime_get_real());
/* Sanity check, this should never happen */
if (enablewait > MIN_POFF_MS)
enablewait = MIN_POFF_MS;
if (enablewait > 0)
msleep(enablewait);
ret = regulator_enable(wuxga_nt->supply);
if (ret < 0)
return ret;
/*
* A minimum delay of 250ms is required after power-up until commands
* can be sent
*/
msleep(250);
ret = wuxga_nt_panel_on(wuxga_nt);
if (ret < 0)
regulator_disable(wuxga_nt->supply);
return ret;
}
static const struct drm_display_mode default_mode = {
.clock = 164402,
.hdisplay = 1920,
.hsync_start = 1920 + 152,
.hsync_end = 1920 + 152 + 52,
.htotal = 1920 + 152 + 52 + 20,
.vdisplay = 1200,
Annotation
- Immediate include surface: `linux/delay.h`, `linux/module.h`, `linux/of.h`, `linux/regulator/consumer.h`, `video/mipi_display.h`, `drm/drm_crtc.h`, `drm/drm_device.h`, `drm/drm_mipi_dsi.h`.
- Detected declarations: `struct wuxga_nt_panel`, `function wuxga_nt_panel_on`, `function wuxga_nt_panel_disable`, `function wuxga_nt_panel_unprepare`, `function wuxga_nt_panel_prepare`, `function wuxga_nt_panel_get_modes`, `function wuxga_nt_panel_add`, `function wuxga_nt_panel_del`, `function wuxga_nt_panel_probe`, `function wuxga_nt_panel_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.