Commit 0128e89a authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/color: Use per-device debugs

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240208151720.7866-5-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent ca93f9f3
...@@ -2111,7 +2111,8 @@ static u32 intel_degamma_lut_size(const struct intel_crtc_state *crtc_state) ...@@ -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; 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; int len;
...@@ -2120,8 +2121,8 @@ static int check_lut_size(const struct drm_property_blob *lut, int expected) ...@@ -2120,8 +2121,8 @@ static int check_lut_size(const struct drm_property_blob *lut, int expected)
len = drm_color_lut_size(lut); len = drm_color_lut_size(lut);
if (len != expected) { if (len != expected) {
DRM_DEBUG_KMS("Invalid LUT size; got %d, expected %d\n", drm_dbg_kms(&i915->drm, "Invalid LUT size; got %d, expected %d\n",
len, expected); len, expected);
return -EINVAL; return -EINVAL;
} }
...@@ -2146,8 +2147,8 @@ static int _check_luts(const struct intel_crtc_state *crtc_state, ...@@ -2146,8 +2147,8 @@ static int _check_luts(const struct intel_crtc_state *crtc_state,
degamma_length = intel_degamma_lut_size(crtc_state); degamma_length = intel_degamma_lut_size(crtc_state);
gamma_length = intel_gamma_lut_size(crtc_state); gamma_length = intel_gamma_lut_size(crtc_state);
if (check_lut_size(degamma_lut, degamma_length) || if (check_lut_size(i915, degamma_lut, degamma_length) ||
check_lut_size(gamma_lut, gamma_length)) check_lut_size(i915, gamma_lut, gamma_length))
return -EINVAL; return -EINVAL;
if (drm_color_lut_check(degamma_lut, degamma_tests) || if (drm_color_lut_check(degamma_lut, degamma_tests) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment