Commit 3cb1b695 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Skip intel_crtc_state_dump() if debugs aren't enabled



intel_crtc_state_dump() does a whole boatload of string formatting
which is all wasted energy if the debugs aren't even enabled. Skip
the whole thing in that case.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240215164055.30585-10-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 2522ed5b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -192,6 +192,9 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config,
	char buf[64];
	int i;

	if (!drm_debug_enabled(DRM_UT_KMS))
		return;

	p = drm_dbg_printer(&i915->drm, DRM_UT_KMS, NULL);

	drm_printf(&p, "[CRTC:%d:%s] enable: %s [%s]\n",