diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-09-18 09:10:59 -0400 |
|---|---|---|
| committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-09-18 11:12:12 -0400 |
| commit | 1ee516ffa73107f96c1355cce5880b6c38d22d51 (patch) | |
| tree | 3e4bff2ca91491c68c59de9f0ad4a071182aa612 /drivers | |
| parent | 21c62a9d16252725ec1f26707bf7db6b8ec59c7f (diff) | |
drm/i915: Fix logic fumble in rotation vs. ccs check
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20180918131059.793-1-ville.syrjala@linux.intel.com
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 3 |
1 files changed, 1 insertions, 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, | |||
| 1190 | return 0; | 1190 | return 0; |
| 1191 | 1191 | ||
| 1192 | if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) && | 1192 | if (rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180) && |
| 1193 | (fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS && | 1193 | is_ccs_modifier(fb->modifier)) { |
| 1194 | fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS)) { | ||
| 1195 | DRM_DEBUG_KMS("RC support only with 0/180 degree rotation (%x)\n", | 1194 | DRM_DEBUG_KMS("RC support only with 0/180 degree rotation (%x)\n", |
| 1196 | rotation); | 1195 | rotation); |
| 1197 | return -EINVAL; | 1196 | return -EINVAL; |
