]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge airlied/drm-next into drm-misc-next
authorSean Paul <seanpaul@chromium.org>
Wed, 21 Mar 2018 13:40:55 +0000 (09:40 -0400)
committerSean Paul <seanpaul@chromium.org>
Wed, 21 Mar 2018 13:40:55 +0000 (09:40 -0400)
Refresh -misc-next

Signed-off-by: Sean Paul <seanpaul@chromium.org>
1  2 
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/drm_plane.c
drivers/gpu/drm/i915/intel_color.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/qxl/qxl_object.c

Simple merge
index 768f1c26080e91f3388434597e189e5f0fcbfd4d,89ab0f70aa2203827933313c0c16d1a828e7b79a..c6a7beabd58d1f636af7f3fb53a16214b4a7e6a1
@@@ -140,20 -140,28 +140,27 @@@ static void ilk_load_csc_matrix(struct 
        int i, pipe = intel_crtc->pipe;
        uint16_t coeffs[9] = { 0, };
        struct intel_crtc_state *intel_crtc_state = to_intel_crtc_state(crtc_state);
+       bool limited_color_range = false;
+       /*
+        * FIXME if there's a gamma LUT after the CSC, we should
+        * do the range compression using the gamma LUT instead.
+        */
+       if (INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv))
+               limited_color_range = intel_crtc_state->limited_color_range;
  
        if (intel_crtc_state->ycbcr420) {
-               i9xx_load_ycbcr_conversion_matrix(intel_crtc);
+               ilk_load_ycbcr_conversion_matrix(intel_crtc);
                return;
        } else if (crtc_state->ctm) {
 -              struct drm_color_ctm *ctm =
 -                      (struct drm_color_ctm *)crtc_state->ctm->data;
 +              struct drm_color_ctm *ctm = crtc_state->ctm->data;
-               uint64_t input[9] = { 0, };
+               const u64 *input;
+               u64 temp[9];
  
-               if (intel_crtc_state->limited_color_range) {
-                       ctm_mult_by_limited(input, ctm->matrix);
-               } else {
-                       for (i = 0; i < ARRAY_SIZE(input); i++)
-                               input[i] = ctm->matrix[i];
-               }
+               if (limited_color_range)
+                       input = ctm_mult_by_limited(temp, ctm->matrix);
+               else
+                       input = ctm->matrix;
  
                /*
                 * Convert fixed point S31.32 input to format supported by the
Simple merge
Simple merge