Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] drm/i915: Fix logic fumble in rotation vs. ccs check
Date: Tue, 18 Sep 2018 18:17:14 +0300	[thread overview]
Message-ID: <20180918151714.GT5565@intel.com> (raw)
In-Reply-To: <b995a81a-9820-68cd-0b27-80cecf8b06e8@linux.intel.com>

On Tue, Sep 18, 2018 at 04:05:58PM +0100, Tvrtko Ursulin wrote:
> 
> On 18/09/2018 14:10, Ville Syrjala wrote:
> > 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;
> > 
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Just a drive by on a trivial one. :)

Thanks. Pushed.

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

  reply	other threads:[~2018-09-18 15:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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ä [this message]
2018-09-18 17:22 ` Souza, Jose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180918151714.GT5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox