[Intel-gfx] [PATCH] drm/i915/skl: Bypass debug message if scalers are not requested

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Aug 5 07:14:30 PDT 2015


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

The loop below does nothing if scaler_users has no bits set so
it is safe to bail out early in order to avoid dmesg spam, on
for example cursor updates.

v2: Commit message and rebase.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Chandra Konduru <chandra.konduru at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/intel_atomic.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index e2531cf59266..523afd21cf87 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -148,6 +148,10 @@ int intel_atomic_setup_scalers(struct drm_device *dev,
 	int num_scalers_need;
 	int i, j;
 
+
+	if (scaler_state->scaler_users == 0)
+		return 0;
+
 	num_scalers_need = hweight32(scaler_state->scaler_users);
 	DRM_DEBUG_KMS("crtc_state = %p need = %d avail = %d scaler_users = 0x%x\n",
 		crtc_state, num_scalers_need, intel_crtc->num_scalers,
-- 
2.4.6



More information about the Intel-gfx mailing list