From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Skip fence installation for objects with rotated views (v4)
Date: Thu, 05 Nov 2015 14:01:28 +0200 [thread overview]
Message-ID: <87h9l0mz8n.fsf@intel.com> (raw)
In-Reply-To: <20151030094451.GB4437@intel.com>
On Fri, 30 Oct 2015, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Oct 29, 2015 at 06:54:38PM -0700, Vivek Kasireddy wrote:
>> While pinning a fb object to the display plane, only install a fence
>> if the object is using a normal view. This corresponds with the
>> behavior found in i915_gem_object_do_pin() where the fencability
>> criteria is determined only for objects with normal views.
>>
>> v2:
>> Look at the object's map_and_fenceable flag to determine whether to
>> install a fence or not (Chris).
>>
>> v3:
>> Pin and unpin a fence only if the current view type is normal.
>>
>> v4:
>> Extend the "view type is normal" check for pin_fence as well.
>>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
>> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
>
> lgtm
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Pushed to drm-intel-next-fixes, thanks for the patch and review.
BR,
Jani.
>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 36 ++++++++++++++++++++----------------
>> 1 file changed, 20 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 2fdfca1..9c80968 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -2419,22 +2419,24 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane,
>> * framebuffer compression. For simplicity, we always install
>> * a fence as the cost is not that onerous.
>> */
>> - ret = i915_gem_object_get_fence(obj);
>> - if (ret == -EDEADLK) {
>> - /*
>> - * -EDEADLK means there are no free fences
>> - * no pending flips.
>> - *
>> - * This is propagated to atomic, but it uses
>> - * -EDEADLK to force a locking recovery, so
>> - * change the returned error to -EBUSY.
>> - */
>> - ret = -EBUSY;
>> - goto err_unpin;
>> - } else if (ret)
>> - goto err_unpin;
>> + if (view.type == I915_GGTT_VIEW_NORMAL) {
>> + ret = i915_gem_object_get_fence(obj);
>> + if (ret == -EDEADLK) {
>> + /*
>> + * -EDEADLK means there are no free fences
>> + * no pending flips.
>> + *
>> + * This is propagated to atomic, but it uses
>> + * -EDEADLK to force a locking recovery, so
>> + * change the returned error to -EBUSY.
>> + */
>> + ret = -EBUSY;
>> + goto err_unpin;
>> + } else if (ret)
>> + goto err_unpin;
>>
>> - i915_gem_object_pin_fence(obj);
>> + i915_gem_object_pin_fence(obj);
>> + }
>>
>> dev_priv->mm.interruptible = true;
>> intel_runtime_pm_put(dev_priv);
>> @@ -2460,7 +2462,9 @@ static void intel_unpin_fb_obj(struct drm_framebuffer *fb,
>> ret = intel_fill_fb_ggtt_view(&view, fb, plane_state);
>> WARN_ONCE(ret, "Couldn't get view from plane state!");
>>
>> - i915_gem_object_unpin_fence(obj);
>> + if (view.type == I915_GGTT_VIEW_NORMAL)
>> + i915_gem_object_unpin_fence(obj);
>> +
>> i915_gem_object_unpin_from_display_plane(obj, &view);
>> }
>>
>> --
>> 2.4.3
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-11-05 11:57 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-12 1:44 [PATCH] drm/i915: Make sure fb objects with rotated views are also fenceable Vivek Kasireddy
2015-09-12 7:49 ` Chris Wilson
2015-09-15 1:38 ` Vivek Kasireddy
2015-09-14 9:08 ` Tvrtko Ursulin
2015-09-15 2:09 ` Vivek Kasireddy
2015-09-15 9:29 ` Tvrtko Ursulin
2015-09-16 1:38 ` Vivek Kasireddy
2015-09-16 2:05 ` [PATCH] drm/i915: Skip fence installation for objects with rotated views Vivek Kasireddy
2015-09-16 8:03 ` Chris Wilson
2015-09-16 17:36 ` Vivek Kasireddy
2015-09-17 10:25 ` Tvrtko Ursulin
2015-09-19 1:56 ` Vivek Kasireddy
2015-09-19 1:57 ` [PATCH] drm/i915: Skip fence installation for objects with rotated views (v2) Vivek Kasireddy
2015-09-23 8:46 ` Daniel Vetter
2015-09-24 2:19 ` Vivek
2015-10-26 10:25 ` Tvrtko Ursulin
2015-10-27 1:23 ` Vivek Kasireddy
2015-10-27 10:35 ` Tvrtko Ursulin
2015-10-27 12:51 ` Ville Syrjälä
2015-10-27 13:34 ` Tvrtko Ursulin
2015-10-27 13:48 ` Ville Syrjälä
2015-10-27 14:26 ` Tvrtko Ursulin
2015-10-27 18:03 ` Chris Wilson
2015-10-27 18:35 ` Ville Syrjälä
2015-10-27 18:47 ` Chris Wilson
2015-10-27 18:58 ` Ville Syrjälä
2015-10-28 10:17 ` Tvrtko Ursulin
2015-10-29 1:24 ` [PATCH] drm/i915: Skip fence installation for objects with rotated views (v3) Vivek Kasireddy
2015-10-29 10:31 ` Tvrtko Ursulin
2015-10-29 13:20 ` Ville Syrjälä
2015-10-29 13:33 ` Tvrtko Ursulin
2015-10-30 1:54 ` [PATCH] drm/i915: Skip fence installation for objects with rotated views (v4) Vivek Kasireddy
2015-10-30 9:44 ` Ville Syrjälä
2015-11-05 12:01 ` Jani Nikula [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=87h9l0mz8n.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
--cc=vivek.kasireddy@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