drivers/gpu/drm/panel/panel-renesas-r61307.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-renesas-r61307.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-renesas-r61307.c- Extension
.c- Size
- 7768 bytes
- Lines
- 300
- 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/array_size.hlinux/delay.hlinux/err.hlinux/gpio/consumer.hlinux/mod_devicetable.hlinux/module.hlinux/property.hlinux/regulator/consumer.hvideo/mipi_display.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.hdrm/drm_probe_helper.h
Detected Declarations
struct renesas_r61307function renesas_r61307_resetfunction renesas_r61307_preparefunction renesas_r61307_enablefunction renesas_r61307_disablefunction renesas_r61307_unpreparefunction renesas_r61307_get_modesfunction renesas_r61307_probefunction renesas_r61307_remove
Annotated Snippet
struct renesas_r61307 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct regulator *vcc_supply;
struct regulator *iovcc_supply;
struct gpio_desc *reset_gpio;
bool dig_cont_adj;
bool inversion;
u32 gamma;
};
static const u8 gamma_setting[][25] = {
{ /* sentinel */ },
{
R61307_GAMMA_SET_A,
0x00, 0x06, 0x0a, 0x0f,
0x14, 0x1f, 0x1f, 0x17,
0x12, 0x0c, 0x09, 0x06,
0x00, 0x06, 0x0a, 0x0f,
0x14, 0x1f, 0x1f, 0x17,
0x12, 0x0c, 0x09, 0x06
},
{
R61307_GAMMA_SET_A,
0x00, 0x05, 0x0b, 0x0f,
0x11, 0x1d, 0x20, 0x18,
0x18, 0x09, 0x07, 0x06,
0x00, 0x05, 0x0b, 0x0f,
0x11, 0x1d, 0x20, 0x18,
0x18, 0x09, 0x07, 0x06
},
{
R61307_GAMMA_SET_A,
0x0b, 0x0d, 0x10, 0x14,
0x13, 0x1d, 0x20, 0x18,
0x12, 0x09, 0x07, 0x06,
0x0a, 0x0c, 0x10, 0x14,
0x13, 0x1d, 0x20, 0x18,
0x12, 0x09, 0x07, 0x06
},
};
static inline struct renesas_r61307 *to_renesas_r61307(struct drm_panel *panel)
{
return container_of(panel, struct renesas_r61307, panel);
}
static void renesas_r61307_reset(struct renesas_r61307 *priv)
{
gpiod_set_value_cansleep(priv->reset_gpio, 1);
usleep_range(10000, 11000);
gpiod_set_value_cansleep(priv->reset_gpio, 0);
usleep_range(2000, 3000);
}
static int renesas_r61307_prepare(struct drm_panel *panel)
{
struct renesas_r61307 *priv = to_renesas_r61307(panel);
struct device *dev = &priv->dsi->dev;
int ret;
ret = regulator_enable(priv->vcc_supply);
if (ret) {
dev_err(dev, "failed to enable vcc power supply\n");
return ret;
}
usleep_range(2000, 3000);
ret = regulator_enable(priv->iovcc_supply);
if (ret) {
dev_err(dev, "failed to enable iovcc power supply\n");
return ret;
}
usleep_range(2000, 3000);
renesas_r61307_reset(priv);
return 0;
}
static int renesas_r61307_enable(struct drm_panel *panel)
{
struct renesas_r61307 *priv = to_renesas_r61307(panel);
struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/delay.h`, `linux/err.h`, `linux/gpio/consumer.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/property.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct renesas_r61307`, `function renesas_r61307_reset`, `function renesas_r61307_prepare`, `function renesas_r61307_enable`, `function renesas_r61307_disable`, `function renesas_r61307_unprepare`, `function renesas_r61307_get_modes`, `function renesas_r61307_probe`, `function renesas_r61307_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.