[Intel-gfx] [PATCH 4/7] drm: Add Gamma correction structure

Daniel Stone daniel at fooishbar.org
Tue Jun 2 04:35:15 PDT 2015


Hi,

On 2 June 2015 at 12:25, Jindal, Sonika <sonika.jindal at intel.com> wrote:
> On 6/2/2015 1:22 AM, Kausal Malladi wrote:
>> struct drm_intel_gamma {
>>         __u32 flags;
>>         (The flag variable will indicate if the property to be set/get
>>         is Gamma or DeGamma)
>>         __u32 gamma_level;
>>         (The gamma_level variable indicates if the Gamma correction is to
>> be
>>         applied on Pipe/plane)
>>         __u32 gamma_precision;
>>         (The Gamma precision indicates the Gamma mode to be applied)
>>
>>         Supported precisions are -
>>         #define I915_GAMMA_PRECISION_UNKNOWN    0
>>         #define I915_GAMMA_PRECISION_CURRENT    0xFFFFFFFF
>>         #define I915_GAMMA_PRECISION_LEGACY     (1 << 0)
>>         #define I915_GAMMA_PRECISION_10BIT      (1 << 1)
>>         #define I915_GAMMA_PRECISION_12BIT      (1 << 2)
>>         #define I915_GAMMA_PRECISION_14BIT      (1 << 3)
>>         #define I915_GAMMA_PRECISION_16BIT      (1 << 4)
>>
>>         __u32 num_samples;
>>         (The num_samples indicates the number of Gamma correction
>>         coefficients)
>>         __u32 reserved;
>>         __u64 gamma_ptr;
>>         (Points to the raw Gamma color correction values)
>> };

Please use the atomic interface and blob properties for this instead.
A user-created blob property can replace the contents of gamma_ptr,
you can replace gamma_level by choosing whether you apply the
properties to a CRTC (pipe) or plane, and then you just need separate
properties for precision and num_samples.

Cheers,
Daniel


More information about the dri-devel mailing list