STRUCT HX8279_DIGITAL_GAMMA(9)
π NAME π
struct hx8279_digital_gamma β Digital Gamma Adjustment β¨ (it's a Linux kernel API page, bestie, from the struct hx8279_digital_gamma(9) manual π
)
β¨ SYNOPSIS β¨
okay so here's the actual struct, no cap, copied exactly:
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];
};
π Members π
rβ the adjustment for the red component πgβ the adjustment for the green component πbβ the adjustment for the blue component π¦
π Description π
So the tea is: the layout of this struct literally follows the register layout, and that's on purpose β it makes both the handling and the declaration of those values in the driver way simpler. Iconic design choice, honestly. π
Gamma correction is internally done with a 24 segment piecewise linear interpolation, and 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 π (yes, it's giving chaotic but that's the layout, iykyk)
And periodt, the 24 segments refer to these 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
π¦ SEE ALSO π¦
Go look at the kernel file ./drivers/gpu/drm/panel/panel-himax-hx8279.c, plus struct hx8279_goa_mux(9) and struct hx8279_analog_gamma(9) π«Ά
okay that's the whole page, you ate that π
mwah! this gem lives over in ./drivers/gpu/drm/panel, it's dated October 2026, and it's filed under struct hx8279_digital_gamma(9) πΈπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms