File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -161,22 +161,28 @@ static void ilk_load_ycbcr_conversion_matrix(struct intel_crtc *crtc)
161
161
}
162
162
}
163
163
164
+ static bool ilk_csc_limited_range (const struct intel_crtc_state * crtc_state )
165
+ {
166
+ struct drm_i915_private * dev_priv = to_i915 (crtc_state -> base .crtc -> dev );
167
+
168
+ /*
169
+ * FIXME if there's a gamma LUT after the CSC, we should
170
+ * do the range compression using the gamma LUT instead.
171
+ */
172
+ return crtc_state -> limited_color_range &&
173
+ (IS_HASWELL (dev_priv ) || IS_BROADWELL (dev_priv ) ||
174
+ IS_GEN_RANGE (dev_priv , 9 , 10 ));
175
+ }
176
+
164
177
static void ilk_load_csc_matrix (const struct intel_crtc_state * crtc_state )
165
178
{
166
179
struct intel_crtc * crtc = to_intel_crtc (crtc_state -> base .crtc );
167
180
struct drm_i915_private * dev_priv = to_i915 (crtc -> base .dev );
168
- bool limited_color_range = false ;
181
+ bool limited_color_range = ilk_csc_limited_range ( crtc_state ) ;
169
182
enum pipe pipe = crtc -> pipe ;
170
183
u16 coeffs [9 ] = {};
171
184
int i ;
172
185
173
- /*
174
- * FIXME if there's a gamma LUT after the CSC, we should
175
- * do the range compression using the gamma LUT instead.
176
- */
177
- if (INTEL_GEN (dev_priv ) >= 8 || IS_HASWELL (dev_priv ))
178
- limited_color_range = crtc_state -> limited_color_range ;
179
-
180
186
if (crtc_state -> output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ||
181
187
crtc_state -> output_format == INTEL_OUTPUT_FORMAT_YCBCR444 ) {
182
188
ilk_load_ycbcr_conversion_matrix (crtc );
You can’t perform that action at this time.
0 commit comments