drivers/gpu/drm/amd/display/modules/color/color_gamma.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/modules/color/color_gamma.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/modules/color/color_gamma.h- Extension
.h- Size
- 4042 bytes
- Lines
- 119
- 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
color_table.h
Detected Declarations
struct dc_transfer_funcstruct dc_gammastruct dc_transfer_func_distributed_pointsstruct dc_rgb_fixedstruct dc_color_capsstruct regamma_rampstruct regamma_coeffstruct regamma_lutstruct hdr_tm_paramsstruct calculate_bufferstruct translate_from_linear_space_argsenum dc_transfer_func_predefined
Annotated Snippet
struct regamma_ramp {
unsigned short gamma[256*3]; // gamma ramp packed in same way as OS windows ,r , g & b
};
struct regamma_coeff {
int gamma[3];
int A0[3];
int A1[3];
int A2[3];
int A3[3];
};
struct regamma_lut {
union regamma_flags flags;
union {
struct regamma_ramp ramp;
struct regamma_coeff coeff;
};
};
struct hdr_tm_params {
unsigned int sdr_white_level;
unsigned int min_content; // luminance in 1/10000 nits
unsigned int max_content; // luminance in nits
unsigned int min_display; // luminance in 1/10000 nits
unsigned int max_display; // luminance in nits
unsigned int skip_tm; // skip tm
};
struct calculate_buffer {
int buffer_index;
struct fixed31_32 buffer[NUM_PTS_IN_REGION];
struct fixed31_32 gamma_of_2;
};
struct translate_from_linear_space_args {
struct fixed31_32 arg;
struct fixed31_32 a0;
struct fixed31_32 a1;
struct fixed31_32 a2;
struct fixed31_32 a3;
struct fixed31_32 gamma;
struct calculate_buffer *cal_buffer;
};
void setup_x_points_distribution(void);
void log_x_points_distribution(struct dal_logger *logger);
void precompute_pq(void);
void precompute_de_pq(void);
bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
const struct dc_gamma *ramp, bool mapUserRamp, bool canRomBeUsed,
const struct hdr_tm_params *fs_params,
struct calculate_buffer *cal_buffer);
bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
struct dc_transfer_func *output_tf,
const struct dc_gamma *ramp, bool mapUserRamp);
#endif /* COLOR_MOD_COLOR_GAMMA_H_ */
Annotation
- Immediate include surface: `color_table.h`.
- Detected declarations: `struct dc_transfer_func`, `struct dc_gamma`, `struct dc_transfer_func_distributed_points`, `struct dc_rgb_fixed`, `struct dc_color_caps`, `struct regamma_ramp`, `struct regamma_coeff`, `struct regamma_lut`, `struct hdr_tm_params`, `struct calculate_buffer`.
- 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.