diff options
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0973-drm-amd-dal-Add-new-gamma-ramp-interface-to-dc.patch')
-rw-r--r-- | meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0973-drm-amd-dal-Add-new-gamma-ramp-interface-to-dc.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0973-drm-amd-dal-Add-new-gamma-ramp-interface-to-dc.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0973-drm-amd-dal-Add-new-gamma-ramp-interface-to-dc.patch new file mode 100644 index 00000000..dd7147b2 --- /dev/null +++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0973-drm-amd-dal-Add-new-gamma-ramp-interface-to-dc.patch @@ -0,0 +1,73 @@ +From e577793146a1d3f3b92267c348963da6502af7e2 Mon Sep 17 00:00:00 2001 +From: Jun Lei <Jun.Lei@amd.com> +Date: Wed, 16 Dec 2015 14:41:31 -0500 +Subject: [PATCH 0973/1050] drm/amd/dal: Add new gamma ramp interface to dc + +Change-Id: Idbde3da01e31f5b2cd2baab7b03f872113c9d374 +Signed-off-by: Jun Lei <Jun.Lei@amd.com> +Acked-by: Jordan Lazare <Jordan.Lazare@amd.com> +--- + drivers/gpu/drm/amd/dal/dc/dc.h | 3 ++- + drivers/gpu/drm/amd/dal/dc/dc_types.h | 32 ++++++++++++++++++++++++++++++++ + 2 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h +index 264b428..c9cdd9c 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc.h +@@ -75,7 +75,8 @@ struct dc_surface { + enum dc_rotation_angle rotation; + enum plane_stereo_format stereo_format; + +- struct gamma_ramp gamma_correction; ++ struct gamma_ramp gamma_correction; /* deprecated */ ++ struct dc_gamma_ramp gamma; + }; + + /* +diff --git a/drivers/gpu/drm/amd/dal/dc/dc_types.h b/drivers/gpu/drm/amd/dal/dc/dc_types.h +index b6526e9..1834fe0 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc_types.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc_types.h +@@ -665,6 +665,38 @@ enum dc_connection_type { + dc_connection_active_dongle + }; + ++/* ++ * Gamma ramp representation in DC ++ * ++ * A gamma ramp is just a curve defined within the range of [min, max] with ++ * arbitrary precision. ++ * ++ * DM is responsible for providing DC with an interface to obtain any y value ++ * within that range with a selected precision. ++ * ++ * bit32 ------------------------------------------------- bit 0 ++ * [ padding ][ exponent bits ][ fraction bits ] ++ * ++ * DC specifies the input x value and precision to the callback function ++ * get_gamma_value as well as providing the context and DM returns the y ++ * value. ++ * ++ * If fraction_bits + exponent_bits exceed width of 32 bits, get_gamma_value ++ * returns 0. If x is outside the bounds of [min, max], get_gamma_value ++ * returns 0. ++ * ++ */ ++struct dc_gamma_ramp { ++ uint32_t (*get_gamma_value) ( ++ void *context, ++ uint8_t exponent_bits, ++ uint8_t fraction_bits, ++ uint32_t x); ++ void *context; ++ uint32_t min; ++ uint32_t max; ++}; ++ + struct dc_csc_adjustments { + struct fixed31_32 contrast; + struct fixed31_32 saturation; +-- +1.9.1 + |