diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2019-01-30 10:10:22 -0800 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2019-01-30 17:09:45 -0800 |
commit | e4c0d5314dede34ac48257cbdd4b3a046b2415df (patch) | |
tree | faba29a4ad5b8a3c4a4bae85a2322831b40903a6 /drivers/gpu/drm/i915/intel_device_info.h | |
parent | c0550305fcbd82c0b0d094e385551d9c63fc8852 (diff) | |
download | linux-stable-e4c0d5314dede34ac48257cbdd4b3a046b2415df.tar.gz linux-stable-e4c0d5314dede34ac48257cbdd4b3a046b2415df.tar.bz2 linux-stable-e4c0d5314dede34ac48257cbdd4b3a046b2415df.zip |
drm/i915: Apply LUT validation checks to platforms more accurately (v3)
Use of the new DRM_COLOR_LUT_NON_DECREASING test was a bit over-zealous;
it doesn't actually need to be applied to the degamma on "bdw-style"
platforms. Likewise, we overlooked the fact that CHV should have that
test applied to the gamma LUT as well as the degamma LUT.
Rather than adding more complicated platform checking to
intel_color_check(), let's just store the appropriate set of LUT
validation flags for each platform in the intel_device_info structure.
v2:
- Shuffle around LUT size tests so that the hardware-specific tests
won't be applied to legacy gamma tables. (Ville)
- Add a debug message so that it will be easier to understand why an
atomic transaction involving incorrectly-sized LUT's got rejected
by the driver.
v3:
- Switch size_t's to int's. (Ville)
Fixes: 85e2d61e4976 ("drm/i915: Validate userspace-provided color management LUT's (v4)")
References: https://lists.freedesktop.org/archives/intel-gfx/2019-January/187634.html
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190130181022.4291-1-matthew.d.roper@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_device_info.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_device_info.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_device_info.h b/drivers/gpu/drm/i915/intel_device_info.h index 957c6527f76b..7bf09cef591a 100644 --- a/drivers/gpu/drm/i915/intel_device_info.h +++ b/drivers/gpu/drm/i915/intel_device_info.h @@ -189,6 +189,8 @@ struct intel_device_info { struct color_luts { u16 degamma_lut_size; u16 gamma_lut_size; + u32 degamma_lut_tests; + u32 gamma_lut_tests; } color; }; |