All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix logic fumble in rotation vs. ccs check
@ 2018-09-18 13:10 Ville Syrjala
  2018-09-18 13:43 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ville Syrjala @ 2018-09-18 13:10 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dan Carpenter

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Smatch reports:
../drivers/gpu/drm/i915/intel_sprite.c:1192 skl_plane_check_fb() warn: was || intended here instead of &&?

Obviously smatch is correct here since we're trying to check if we're
using either of the ccs modifiers. Since we now have is_ccs_modifier()
let's use it to fix this.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: e21c2d331018 ("drm/i915: Move skl plane fb related checks into a better place")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 8821e59b70ea..d4c8e10fc90b 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1190,8 +1190,7 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
 		return 0;
 
 	if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) &&
-	    (fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS &&
-	     fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS)) {
+	    is_ccs_modifier(fb->modifier)) {
 		DRM_DEBUG_KMS("RC support only with 0/180 degree rotation (%x)\n",
 			      rotation);
 		return -EINVAL;
-- 
2.16.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-18 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18 13:10 [PATCH] drm/i915: Fix logic fumble in rotation vs. ccs check Ville Syrjala
2018-09-18 13:43 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-18 14:38 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-18 15:05 ` [PATCH] " Tvrtko Ursulin
2018-09-18 15:17   ` Ville Syrjälä
2018-09-18 17:22 ` Souza, Jose

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.