All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Keep physical cursors pinned while in use
Date: Wed, 22 Aug 2018 15:35:52 +0300	[thread overview]
Message-ID: <20180822123552.GA5565@intel.com> (raw)
In-Reply-To: <20180817082405.755-1-chris@chris-wilson.co.uk>

On Fri, Aug 17, 2018 at 09:24:05AM +0100, Chris Wilson wrote:
> The optimisation inherent in commit 6a2c4232ece1 ("drm/i915: Make the
> physical object coherent with GTT") relies on that once we allocated a
> cursor we would have coherent, zero overhead access to the scanout plane
> holding the cursor. That is we could then do the very frequent cursor
> updates X enjoys with no indirection or kernel involvement. However,
> that all hinges on the GGTT mmap of the cursor being pinned and not
> require refaulting on each access -- handling such a page fault likely
> requires the busy GGTT to be rearranged causing a stall. A very simple
> fix is then to handle the physical cursor exactly like other cursors and
> keep its vma pinned while active.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107600

I guess this wasn't the thing we wanted. But seems quite harmless to
me anyway, so 

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

in case you still want to land it.

> References: 6a2c4232ece1 ("drm/i915: Make the physical object coherent with GTT")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 592b847db88e..d47ec9fd4af4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12966,8 +12966,11 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state)
>  	    INTEL_INFO(dev_priv)->cursor_needs_physical) {
>  		struct drm_i915_gem_object *obj = intel_fb_obj(fb);
>  		const int align = intel_cursor_alignment(dev_priv);
> +		int err;
>  
> -		return i915_gem_object_attach_phys(obj, align);
> +		err = i915_gem_object_attach_phys(obj, align);
> +		if (err)
> +			return err;
>  	}
>  
>  	vma = intel_pin_and_fence_fb_obj(fb,
> -- 
> 2.18.0

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

  parent reply	other threads:[~2018-08-22 12:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17  8:24 [PATCH] drm/i915: Keep physical cursors pinned while in use Chris Wilson
2018-08-17  8:29 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-08-17  8:47 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-17 11:04 ` ✓ Fi.CI.IGT: " Patchwork
2018-08-22 12:35 ` Ville Syrjälä [this message]
2018-08-31  7:57   ` [PATCH] " Chris Wilson

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=20180822123552.GA5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 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.