]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/color: Use per-device debugs
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Feb 2024 15:17:11 +0000 (17:17 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 9 Feb 2024 12:31:30 +0000 (14:31 +0200)
Switch to drm_dbg_kms() in the LUT validation code so we see
which device generated the debugs. Need to plumb i915 a bit
deeper to make that happen.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240208151720.7866-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_color.c

index c5092b7e87d52b1801fa776500d7f2817aac7374..ca7112b32cb3efd4d71bbeeb3753f5afacefd125 100644 (file)
@@ -2111,7 +2111,8 @@ static u32 intel_degamma_lut_size(const struct intel_crtc_state *crtc_state)
        return DISPLAY_INFO(i915)->color.degamma_lut_size;
 }
 
-static int check_lut_size(const struct drm_property_blob *lut, int expected)
+static int check_lut_size(struct drm_i915_private *i915,
+                         const struct drm_property_blob *lut, int expected)
 {
        int len;
 
@@ -2120,8 +2121,8 @@ static int check_lut_size(const struct drm_property_blob *lut, int expected)
 
        len = drm_color_lut_size(lut);
        if (len != expected) {
-               DRM_DEBUG_KMS("Invalid LUT size; got %d, expected %d\n",
-                             len, expected);
+               drm_dbg_kms(&i915->drm, "Invalid LUT size; got %d, expected %d\n",
+                           len, expected);
                return -EINVAL;
        }
 
@@ -2146,8 +2147,8 @@ static int _check_luts(const struct intel_crtc_state *crtc_state,
        degamma_length = intel_degamma_lut_size(crtc_state);
        gamma_length = intel_gamma_lut_size(crtc_state);
 
-       if (check_lut_size(degamma_lut, degamma_length) ||
-           check_lut_size(gamma_lut, gamma_length))
+       if (check_lut_size(i915, degamma_lut, degamma_length) ||
+           check_lut_size(i915, gamma_lut, gamma_length))
                return -EINVAL;
 
        if (drm_color_lut_check(degamma_lut, degamma_tests) ||