diff mbox series

drm/i915: Disable frontbuffer tracking

Message ID 20200908052540.26905-1-animesh.manna@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Disable frontbuffer tracking | expand

Commit Message

Manna, Animesh Sept. 8, 2020, 5:25 a.m. UTC
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_frontbuffer.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jani Nikula Sept. 10, 2020, 1:26 p.m. UTC | #1
On Tue, 08 Sep 2020, Animesh Manna <animesh.manna@intel.com> wrote:
> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>

The "why" would go here.

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Please add your own Signed-off-by when you send someone else's patches.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/display/intel_frontbuffer.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index d898b370d7a4..0f1d7a34dcf7 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -166,6 +166,9 @@ void __intel_fb_invalidate(struct intel_frontbuffer *front,
>  {
>  	struct drm_i915_private *i915 = to_i915(front->obj->base.dev);
>  
> +	if (origin != ORIGIN_FLIP)
> +		return;
> +
>  	if (origin == ORIGIN_CS) {
>  		spin_lock(&i915->fb_tracking.lock);
>  		i915->fb_tracking.busy_bits |= frontbuffer_bits;
> @@ -185,6 +188,9 @@ void __intel_fb_flush(struct intel_frontbuffer *front,
>  {
>  	struct drm_i915_private *i915 = to_i915(front->obj->base.dev);
>  
> +	if (origin != ORIGIN_FLIP)
> +		return;
> +
>  	if (origin == ORIGIN_CS) {
>  		spin_lock(&i915->fb_tracking.lock);
>  		/* Filter out new bits since rendering started. */
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index d898b370d7a4..0f1d7a34dcf7 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -166,6 +166,9 @@  void __intel_fb_invalidate(struct intel_frontbuffer *front,
 {
 	struct drm_i915_private *i915 = to_i915(front->obj->base.dev);
 
+	if (origin != ORIGIN_FLIP)
+		return;
+
 	if (origin == ORIGIN_CS) {
 		spin_lock(&i915->fb_tracking.lock);
 		i915->fb_tracking.busy_bits |= frontbuffer_bits;
@@ -185,6 +188,9 @@  void __intel_fb_flush(struct intel_frontbuffer *front,
 {
 	struct drm_i915_private *i915 = to_i915(front->obj->base.dev);
 
+	if (origin != ORIGIN_FLIP)
+		return;
+
 	if (origin == ORIGIN_CS) {
 		spin_lock(&i915->fb_tracking.lock);
 		/* Filter out new bits since rendering started. */