drm/i915/skl: Bypass debug message if scalers are not requested
diff mbox

Message ID 1438784070-7430-1-git-send-email-tvrtko.ursulin@linux.intel.com
State New
Headers show

Commit Message

Tvrtko Ursulin Aug. 5, 2015, 2:14 p.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@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@intel.com>
Cc: Chandra Konduru <chandra.konduru@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_atomic.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Shuang He Aug. 12, 2015, 5:49 a.m. UTC | #1
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 7070
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
ILK                 -1              302/302              301/302
SNB                                  315/315              315/315
IVB                                  336/336              336/336
BYT                                  283/283              283/283
HSW                                  378/378              378/378
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*ILK  igt@kms_flip@rcs-wf_vblank-vs-dpms-interruptible      PASS(1)      DMESG_WARN(1)
Note: You need to pay more attention to line start with '*'

Patch
diff mbox

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,