diff mbox

drm/i915: Skip fence installation for objects with rotated views (v2)

Message ID 1442627868-25290-1-git-send-email-vivek.kasireddy@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kasireddy, Vivek Sept. 19, 2015, 1:57 a.m. UTC
v2:
Look at the object's map_and_fenceable flag to determine whether to
install a fence or not (Chris).

v1:
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.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel Vetter Sept. 23, 2015, 8:46 a.m. UTC | #1
On Fri, Sep 18, 2015 at 06:57:48PM -0700, Vivek Kasireddy wrote:
> v2:
> Look at the object's map_and_fenceable flag to determine whether to
> install a fence or not (Chris).
> 
> v1:
> 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.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>

Where's the igt testcase for this bug that Tvrtko suggested?
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 52fb3f2..108c000 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2357,7 +2357,8 @@ 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 (obj->map_and_fenceable)
> +		ret = i915_gem_object_get_fence(obj);
>  	if (ret == -EDEADLK) {
>  		/*
>  		 * -EDEADLK means there are no free fences
> -- 
> 2.4.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Kasireddy, Vivek Sept. 24, 2015, 2:19 a.m. UTC | #2
On Wed, 23 Sep 2015 10:46:39 +0200
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Fri, Sep 18, 2015 at 06:57:48PM -0700, Vivek Kasireddy wrote:
> > v2:
> > Look at the object's map_and_fenceable flag to determine whether to
> > install a fence or not (Chris).
> > 
> > v1:
> > 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.
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
> 
> Where's the igt testcase for this bug that Tvrtko suggested?
> -Daniel
Hi Daniel,
I'll submit it in the next few days.


Thanks,
Vivek

> 
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c index 52fb3f2..108c000 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -2357,7 +2357,8 @@ 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 (obj->map_and_fenceable)
> > +		ret = i915_gem_object_get_fence(obj);
> >  	if (ret == -EDEADLK) {
> >  		/*
> >  		 * -EDEADLK means there are no free fences
> > -- 
> > 2.4.3
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
Tvrtko Ursulin Oct. 26, 2015, 10:25 a.m. UTC | #3
Hi,

On 19/09/15 02:57, Vivek Kasireddy wrote:
> v2:
> Look at the object's map_and_fenceable flag to determine whether to
> install a fence or not (Chris).
>
> v1:
> 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.
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 52fb3f2..108c000 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2357,7 +2357,8 @@ 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 (obj->map_and_fenceable)
> +		ret = i915_gem_object_get_fence(obj);
>   	if (ret == -EDEADLK) {
>   		/*
>   		 * -EDEADLK means there are no free fences
>

Looks correct to me. Ideally someone with perspective on old platforms, 
like Chris or Daniel could also R-B ?

But the commit message is unusual, v1 block should probably become the 
top section, without the v1 marking.

Regards,

Tvrtko
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 52fb3f2..108c000 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2357,7 +2357,8 @@  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 (obj->map_and_fenceable)
+		ret = i915_gem_object_get_fence(obj);
 	if (ret == -EDEADLK) {
 		/*
 		 * -EDEADLK means there are no free fences