diff options
author | Anthony Koo <Anthony.Koo@amd.com> | 2017-08-03 09:59:23 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:16:20 -0400 |
commit | d66cf5f5013a4268057bcb92d301d010268ea27f (patch) | |
tree | 3bad6df8f6eb551dacb8963036701f03f677a54d /drivers/gpu/drm/amd/display/dc/dc_hw_types.h | |
parent | 665da60f23d8c6bda5431529a73be49b3b9d97cb (diff) | |
download | linux-d66cf5f5013a4268057bcb92d301d010268ea27f.tar.bz2 |
drm/amd/display: implement DXGI Gamma Ramps
Support for gamma correction ramp in Floating Point format
Signed-off-by: Anthony Koo <anthony.koo@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_hw_types.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h index 778bd5555c7a..8d1504668ec7 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h @@ -409,20 +409,31 @@ struct dc_cursor_mi_param { /* IPP related types */ enum { - INPUT_LUT_ENTRIES = 256 + GAMMA_RGB_256_ENTRIES = 256, + GAMMA_RGB_FLOAT_1024_ENTRIES = 1024, + GAMMA_MAX_ENTRIES = 1024 +}; + +enum dc_gamma_type { + GAMMA_RGB_256 = 1, + GAMMA_RGB_FLOAT_1024 = 2 }; struct dc_gamma { - uint16_t red[INPUT_LUT_ENTRIES]; - uint16_t green[INPUT_LUT_ENTRIES]; - uint16_t blue[INPUT_LUT_ENTRIES]; + enum dc_gamma_type type; + unsigned int num_entries; + + struct dc_gamma_entries { + struct fixed31_32 red[GAMMA_MAX_ENTRIES]; + struct fixed31_32 green[GAMMA_MAX_ENTRIES]; + struct fixed31_32 blue[GAMMA_MAX_ENTRIES]; + } entries; /* private to DC core */ struct dc_context *ctx; /* private to dc_surface.c */ int ref_count; - }; /* Used by both ipp amd opp functions*/ |