From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 14/14] drm/i915: Fix cursor visibility checks also for the right/bottom screen edges
Date: Mon, 16 Sep 2013 23:52:17 +0200 [thread overview]
Message-ID: <20130916215217.GH32145@phenom.ffwll.local> (raw)
In-Reply-To: <1378308331-21388-15-git-send-email-ville.syrjala@linux.intel.com>
On Wed, Sep 04, 2013 at 06:25:31PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> First of all we should not be looking at fb->{width,height} as those do
> not tell us what the actual pipe size is. Second of all we need to use
> >= for the comparison.
>
> So fix the comparison, and make use of the new pipe_src_{w,h} to
> determine the real pipe source dimensions.
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Merged the entire series to dinq, thanks for patches&review. I've also
made a small note that we should have an igt testcase for these cursor
corner-cases somewhere ...
Cheers, Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 20f373b..44e0a84 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7000,19 +7000,16 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
> int pipe = intel_crtc->pipe;
> int x = intel_crtc->cursor_x;
> int y = intel_crtc->cursor_y;
> - u32 base, pos;
> + u32 base = 0, pos = 0;
> bool visible;
>
> - pos = 0;
> -
> - if (on && crtc->enabled && crtc->fb) {
> + if (on)
> base = intel_crtc->cursor_addr;
> - if (x > (int) crtc->fb->width)
> - base = 0;
>
> - if (y > (int) crtc->fb->height)
> - base = 0;
> - } else
> + if (x >= intel_crtc->config.pipe_src_w)
> + base = 0;
> +
> + if (y >= intel_crtc->config.pipe_src_h)
> base = 0;
>
> if (x < 0) {
> --
> 1.8.1.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-09-16 21:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 15:25 [PATCH 0/14] drm/i915: pipe_config, adjusted_mode vs. requested_mode, etc. v2 ville.syrjala
2013-09-04 15:25 ` [PATCH v2 01/14] drm/i915: Grab the pixel clock from adjusted_mode not requested_mode ville.syrjala
2013-09-10 14:27 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 02/14] drm/i915: Use adjusted_mode->clock in lpt_program_iclkip ville.syrjala
2013-09-10 14:41 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 03/14] drm/i915: Use adjusted_mode in HDMI 12bpc clock check ville.syrjala
2013-09-10 14:42 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 04/14] drm/i915: Use adjusted_mode in intel_update_fbc() ville.syrjala
2013-09-10 14:45 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 05/14] drm/i915: Use adjusted_mode appropriately when computing watermarks ville.syrjala
2013-09-10 15:00 ` Damien Lespiau
2013-09-10 15:04 ` Ville Syrjälä
2013-09-10 16:08 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 06/14] drm/i915: Check the clock from adjusted mode in intel_crtc_active() ville.syrjala
2013-09-10 15:00 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 07/14] drm/i915: Use adjusted_mode when checking conditions for PSR ville.syrjala
2013-09-10 16:42 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH v2 08/14] drm/i915: Make intel_crtc_active() available outside intel_pm.c ville.syrjala
2013-09-10 16:43 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 09/14] drm/i915: Use pipe config in sprite code ville.syrjala
2013-09-10 16:44 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 10/14] drm/i915: Use adjusted_mode in DSI PLL calculations ville.syrjala
2013-09-10 16:45 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH v2 11/14] drm/i915: Add explicit pipe src size to pipe config ville.syrjala
2013-09-10 17:02 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 12/14] drm/i915: Document the inteded use of requested_mode ville.syrjala
2013-09-10 17:07 ` Damien Lespiau
2013-09-10 17:17 ` Ville Syrjälä
2013-09-10 17:49 ` Daniel Vetter
2013-09-10 17:10 ` Damien Lespiau
2013-09-04 15:25 ` [PATCH 13/14] drm/i915: Fix cursor visibility check with negative coordinates ville.syrjala
2013-09-04 15:25 ` [PATCH 14/14] drm/i915: Fix cursor visibility checks also for the right/bottom screen edges ville.syrjala
2013-09-16 21:52 ` Daniel Vetter [this message]
2013-09-17 9:56 ` Ville Syrjälä
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=20130916215217.GH32145@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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