From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Arthur Grillo <arthurgrillo@riseup.net>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
mairacanal@riseup.net, andrealmeid@riseup.net,
tales.aparecida@gmail.com, daniel@ffwll.ch, airlied@gmail.com,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com,
lucas.demarchi@intel.com
Subject: Re: [PATCH v2] drm/i915/overlay: Remove redundant drm_rect_visible() use
Date: Mon, 4 Mar 2024 13:13:03 +0200 [thread overview]
Message-ID: <ZeWsv4xbEWGyBgFo@intel.com> (raw)
In-Reply-To: <20230325172719.92102-1-arthurgrillo@riseup.net>
On Sat, Mar 25, 2023 at 02:27:19PM -0300, Arthur Grillo wrote:
> The drm_rect_intersect() already returns if the intersection is visible
> or not, so the use of drm_rect_visible() is duplicate.
>
> Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Sorry, looks like I completely missed this.
Now push the drm-intel-next. Thanks.
> ---
> v1->v2: https://lore.kernel.org/all/20230324142533.6357-1-arthurgrillo@riseup.net/
> - Split the if condition.
> ---
> drivers/gpu/drm/i915/display/intel_overlay.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
> index c12bdca8da9b..d55153587cae 100644
> --- a/drivers/gpu/drm/i915/display/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/display/intel_overlay.c
> @@ -966,10 +966,11 @@ static int check_overlay_dst(struct intel_overlay *overlay,
> rec->dst_width, rec->dst_height);
>
> clipped = req;
> - drm_rect_intersect(&clipped, &crtc_state->pipe_src);
>
> - if (!drm_rect_visible(&clipped) ||
> - !drm_rect_equals(&clipped, &req))
> + if (!drm_rect_intersect(&clipped, &crtc_state->pipe_src))
> + return -EINVAL;
> +
> + if (!drm_rect_equals(&clipped, &req))
> return -EINVAL;
>
> return 0;
> --
> 2.39.2
--
Ville Syrjälä
Intel
prev parent reply other threads:[~2024-03-04 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 17:27 [Intel-gfx] [PATCH v2] drm/i915/overlay: Remove redundant drm_rect_visible() use Arthur Grillo
2023-03-25 18:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/overlay: Remove redundant drm_rect_visible() use (rev2) Patchwork
2024-03-04 11:13 ` Ville Syrjälä [this message]
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=ZeWsv4xbEWGyBgFo@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@gmail.com \
--cc=andrealmeid@riseup.net \
--cc=arthurgrillo@riseup.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=lucas.demarchi@intel.com \
--cc=mairacanal@riseup.net \
--cc=rodrigo.vivi@intel.com \
--cc=tales.aparecida@gmail.com \
--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