drivers/gpu/drm/panel/panel-himax-hx8279.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-himax-hx8279.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-himax-hx8279.c- Extension
.c- Size
- 38495 bytes
- Lines
- 1297
- 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/bitfield.hlinux/delay.hlinux/gpio/consumer.hlinux/module.hlinux/of.hlinux/of_graph.hlinux/regulator/consumer.hdrm/drm_connector.hdrm/drm_crtc.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct hx8279struct hx8279_panel_modestruct hx8279_goa_muxstruct hx8279_analog_gammastruct hx8279_digital_gammastruct hx8279_panel_descfunction hx8279_set_pagefunction hx8279_set_module_configfunction hx8279_set_gmuxfunction hx8279_set_analog_gammafunction hx8279_set_goa_timingfunction hx8279_set_goa_cfgfunction hx8279_set_mipi_cfgfunction hx8279_set_adv_cfgfunction hx8279_set_digital_gammafunction hx8279_onfunction hx8279_power_offfunction hx8279_disablefunction hx8279_enablefunction hx8279_preparefunction hx8279_unpreparefunction hx8279_get_modesfunction hx8279_init_vregsfunction hx8279_check_gmux_configfunction hx8279_check_goa_configfunction hx8279_check_dig_gammafunction hx8279_check_paramsfunction hx8279_probefunction hx8279_remove
Annotated Snippet
struct hx8279 {
struct drm_panel panel;
struct mipi_dsi_device *dsi[2];
struct regulator_bulk_data vregs[2];
struct gpio_desc *enable_gpio;
struct gpio_desc *reset_gpio;
const struct hx8279_panel_desc *desc;
u8 last_page;
bool skip_voltage_config;
bool skip_goa_config;
bool skip_goa_timing;
bool skip_goa_even_timing;
bool skip_mipi_timing;
};
struct hx8279_panel_mode {
const struct drm_display_mode mode;
u8 bpc;
bool is_video_mode;
};
/**
* struct hx8279_goa_mux - Gate driver On Array Muxer
* @gout_l: Mux GOA signal to GOUT Left pin
* @gout_r: Mux GOA signal to GOUT Right pin
*/
struct hx8279_goa_mux {
u8 gout_l[20];
u8 gout_r[20];
};
/**
* struct hx8279_analog_gamma - Analog Gamma Adjustment
* @pos: Positive gamma op's input voltage, adjusted by VGP(H/L)
* @neg: Negative gamma op's input voltage, adjusted by VGN(H/L)
*
* Analog Gamma correction is performed with 17+17 reference voltages,
* changed with resistor streams, and defined with 17 register values
* for positive and 17 for negative.
*
* Each register holds resistance values, in 8.5ohms per unit, for the
* following gamma levels:
* 0, 8, 16, 28, 40, 56, 80, 128, 176, 200, 216, 228, 240, 248, 252, 255.
*/
struct hx8279_analog_gamma {
u8 pos[17];
u8 neg[17];
};
/**
* struct hx8279_digital_gamma - Digital Gamma Adjustment
* @r: Adjustment for red component
* @g: Adjustment for green component
* @b: Adjustment for blue component
*
* The layout of this structure follows the register layout to simplify
* both the handling and the declaration of those values in the driver.
* Gamma correction is internally done with a 24 segment piecewise
* linear interpolation; those segments are defined with 24 ten bits
* values of which:
* - The LOW eight bits for the first 24 registers start at the first
* register (at 0xb1) of the Digital Gamma Adjustment page;
* - The HIGH two bits for each of the 24 registers are contained
* in the last six registers;
* - The last six registers contain four groups of two-bits HI values
* for each of the first 24 registers, but in an inverted fashion,
* this means that the first two bits relate to the last register
* of a set of four.
*
* The 24 segments refer to the following gamma levels:
* 0, 1, 3, 7, 11, 15, 23, 31, 47, 63, 95, 127, 128, 160,
* 192, 208, 224, 232, 240, 244, 248, 252, 254, 255
*/
struct hx8279_digital_gamma {
u8 r[HX8279_PG_DGAMMA_NUM_LO_BYTES + HX8279_PG_DGAMMA_NUM_HI_BYTES];
u8 g[HX8279_PG_DGAMMA_NUM_LO_BYTES + HX8279_PG_DGAMMA_NUM_HI_BYTES];
u8 b[HX8279_PG_DGAMMA_NUM_LO_BYTES + HX8279_PG_DGAMMA_NUM_HI_BYTES];
};
struct hx8279_panel_desc {
const struct mipi_dsi_device_info dsi_info;
const struct hx8279_panel_mode *mode_data;
u8 num_lanes;
u8 num_modes;
/* Page 0 */
unsigned int vgh_mv;
unsigned int vgl_mv;
unsigned int vgph_mv;
unsigned int vgnh_mv;
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `linux/of_graph.h`, `linux/regulator/consumer.h`, `drm/drm_connector.h`.
- Detected declarations: `struct hx8279`, `struct hx8279_panel_mode`, `struct hx8279_goa_mux`, `struct hx8279_analog_gamma`, `struct hx8279_digital_gamma`, `struct hx8279_panel_desc`, `function hx8279_set_page`, `function hx8279_set_module_config`, `function hx8279_set_gmux`, `function hx8279_set_analog_gamma`.
- 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.