XenevaOS
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
drm_color_mgmt.h File Reference
#include <linux/ctype.h>
#include <linux/math64.h>
#include <drm/drm_property.h>
Include dependency graph for drm_color_mgmt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* drm_crtc_set_lut_func) (struct drm_crtc *, unsigned int, u16, u16, u16)
 

Enumerations

enum  drm_color_encoding { DRM_COLOR_YCBCR_BT601 , DRM_COLOR_YCBCR_BT709 , DRM_COLOR_YCBCR_BT2020 , DRM_COLOR_ENCODING_MAX }
 
enum  drm_color_range { DRM_COLOR_YCBCR_LIMITED_RANGE , DRM_COLOR_YCBCR_FULL_RANGE , DRM_COLOR_RANGE_MAX }
 
enum  drm_color_lut_tests { DRM_COLOR_LUT_EQUAL_CHANNELS = BIT(0) , DRM_COLOR_LUT_NON_DECREASING = BIT(1) }
 

Functions

u64 drm_color_ctm_s31_32_to_qm_n (u64 user_input, u32 m, u32 n)
 
void drm_crtc_enable_color_mgmt (struct drm_crtc *crtc, uint degamma_lut_size, bool has_ctm, uint gamma_lut_size)
 
int drm_mode_crtc_set_gamma_size (struct drm_crtc *crtc, int gamma_size)
 
int drm_plane_create_color_properties (struct drm_plane *plane, u32 supported_encodings, u32 supported_ranges, enum drm_color_encoding default_encoding, enum drm_color_range default_range)
 
int drm_color_lut_check (const struct drm_property_blob *lut, u32 tests)
 
void drm_crtc_load_gamma_888 (struct drm_crtc *crtc, const struct drm_color_lut *lut, drm_crtc_set_lut_func set_gamma)
 
void drm_crtc_load_gamma_565_from_888 (struct drm_crtc *crtc, const struct drm_color_lut *lut, drm_crtc_set_lut_func set_gamma)
 
void drm_crtc_load_gamma_555_from_888 (struct drm_crtc *crtc, const struct drm_color_lut *lut, drm_crtc_set_lut_func set_gamma)
 
void drm_crtc_fill_gamma_888 (struct drm_crtc *crtc, drm_crtc_set_lut_func set_gamma)
 
void drm_crtc_fill_gamma_565 (struct drm_crtc *crtc, drm_crtc_set_lut_func set_gamma)
 
void drm_crtc_fill_gamma_555 (struct drm_crtc *crtc, drm_crtc_set_lut_func set_gamma)
 
void drm_crtc_load_palette_8 (struct drm_crtc *crtc, const struct drm_color_lut *lut, drm_crtc_set_lut_func set_palette)
 
void drm_crtc_fill_palette_332 (struct drm_crtc *crtc, drm_crtc_set_lut_func set_palette)
 
void drm_crtc_fill_palette_8 (struct drm_crtc *crtc, drm_crtc_set_lut_func set_palette)
 
int drm_color_lut32_check (const struct drm_property_blob *lut, u32 tests)
 

Typedef Documentation

◆ drm_crtc_set_lut_func

typedef void(* drm_crtc_set_lut_func) (struct drm_crtc *, unsigned int, u16, u16, u16)

Enumeration Type Documentation

◆ drm_color_encoding

Enumerator
DRM_COLOR_YCBCR_BT601 
DRM_COLOR_YCBCR_BT709 
DRM_COLOR_YCBCR_BT2020 
DRM_COLOR_ENCODING_MAX 

◆ drm_color_lut_tests

enum drm_color_lut_tests - hw-specific LUT tests to perform

The drm_color_lut_check() function takes a bitmask of the values here to determine which tests to apply to a userspace-provided LUT.

Enumerator
DRM_COLOR_LUT_EQUAL_CHANNELS 

@DRM_COLOR_LUT_EQUAL_CHANNELS:

Checks whether the entries of a LUT all have equal values for the red, green, and blue channels. Intended for hardware that only accepts a single value per LUT entry and assumes that value applies to all three color components.

DRM_COLOR_LUT_NON_DECREASING 

@DRM_COLOR_LUT_NON_DECREASING:

Checks whether the entries of a LUT are always flat or increasing (never decreasing).

◆ drm_color_range

Enumerator
DRM_COLOR_YCBCR_LIMITED_RANGE 
DRM_COLOR_YCBCR_FULL_RANGE 
DRM_COLOR_RANGE_MAX 

Function Documentation

◆ drm_color_ctm_s31_32_to_qm_n()

u64 drm_color_ctm_s31_32_to_qm_n ( u64  user_input,
u32  m,
u32  n 
)

◆ drm_color_lut32_check()

int drm_color_lut32_check ( const struct drm_property_blob *  lut,
u32  tests 
)

◆ drm_color_lut_check()

int drm_color_lut_check ( const struct drm_property_blob *  lut,
u32  tests 
)

◆ drm_crtc_enable_color_mgmt()

void drm_crtc_enable_color_mgmt ( struct drm_crtc *  crtc,
uint  degamma_lut_size,
bool  has_ctm,
uint  gamma_lut_size 
)

◆ drm_crtc_fill_gamma_555()

void drm_crtc_fill_gamma_555 ( struct drm_crtc *  crtc,
drm_crtc_set_lut_func  set_gamma 
)

◆ drm_crtc_fill_gamma_565()

void drm_crtc_fill_gamma_565 ( struct drm_crtc *  crtc,
drm_crtc_set_lut_func  set_gamma 
)

◆ drm_crtc_fill_gamma_888()

void drm_crtc_fill_gamma_888 ( struct drm_crtc *  crtc,
drm_crtc_set_lut_func  set_gamma 
)

◆ drm_crtc_fill_palette_332()

void drm_crtc_fill_palette_332 ( struct drm_crtc *  crtc,
drm_crtc_set_lut_func  set_palette 
)

◆ drm_crtc_fill_palette_8()

void drm_crtc_fill_palette_8 ( struct drm_crtc *  crtc,
drm_crtc_set_lut_func  set_palette 
)

◆ drm_crtc_load_gamma_555_from_888()

void drm_crtc_load_gamma_555_from_888 ( struct drm_crtc *  crtc,
const struct drm_color_lut *  lut,
drm_crtc_set_lut_func  set_gamma 
)

◆ drm_crtc_load_gamma_565_from_888()

void drm_crtc_load_gamma_565_from_888 ( struct drm_crtc *  crtc,
const struct drm_color_lut *  lut,
drm_crtc_set_lut_func  set_gamma 
)

◆ drm_crtc_load_gamma_888()

void drm_crtc_load_gamma_888 ( struct drm_crtc *  crtc,
const struct drm_color_lut *  lut,
drm_crtc_set_lut_func  set_gamma 
)

◆ drm_crtc_load_palette_8()

void drm_crtc_load_palette_8 ( struct drm_crtc *  crtc,
const struct drm_color_lut *  lut,
drm_crtc_set_lut_func  set_palette 
)

◆ drm_mode_crtc_set_gamma_size()

int drm_mode_crtc_set_gamma_size ( struct drm_crtc *  crtc,
int  gamma_size 
)

◆ drm_plane_create_color_properties()

int drm_plane_create_color_properties ( struct drm_plane *  plane,
u32  supported_encodings,
u32  supported_ranges,
enum drm_color_encoding  default_encoding,
enum drm_color_range  default_range 
)