diff mbox

[2/2] drm/i915: frontbuffer invalidate at flip schedule

Message ID 1434015515-21209-2-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C June 11, 2015, 9:38 a.m. UTC
After scheduling a flip for obj, frontbuffer should be invalidated.
Hence intel_frontbuffer_invalidate is invoked at flip preparation.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
References: https://bugs.freedesktop.org/show_bug.cgi?id=90418
---
 drivers/gpu/drm/i915/intel_frontbuffer.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Chris Wilson June 11, 2015, 9:56 a.m. UTC | #1
On Thu, Jun 11, 2015 at 03:08:35PM +0530, Ramalingam C wrote:
> After scheduling a flip for obj, frontbuffer should be invalidated.
> Hence intel_frontbuffer_invalidate is invoked at flip preparation.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=90418
> ---
>  drivers/gpu/drm/i915/intel_frontbuffer.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_frontbuffer.c b/drivers/gpu/drm/i915/intel_frontbuffer.c
> index 4cea589..07147a7 100644
> --- a/drivers/gpu/drm/i915/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_frontbuffer.c
> @@ -268,6 +268,7 @@ void intel_frontbuffer_flip_prepare(struct drm_device *dev,
>  	dev_priv->fb_tracking.busy_bits &= ~frontbuffer_bits;
>  	mutex_unlock(&dev_priv->fb_tracking.lock);
>  
> +	intel_frontbuffer_invalidate(dev, NULL, ORIGIN_FLIP, frontbuffer_bits);
>  	intel_psr_single_frame_update(dev);

This then has the side effect of calling psr_invalidate (psr_exit)
followed by the single-shot psr update, which doesn't seem desirable.
-Chris
Ramalingam C June 11, 2015, 10:57 a.m. UTC | #2
True.

Chris and Vivi,

I am trying to understand the PSR exit and entry along with SFU 
requirement here.
AFAIK in existing code also
         on rendering start fb_obj_invalidate is calling the 
psr_invalidate(psr_exit)
         on flip prepare single frame update is done
         on flip complete frontbuffer_invalidate is calling 
psr_flush(psr_reenable)
         on rendering complete fb_obj_flush is calling the 
psr_flush(psr_reenable)

On Every rendering start if we exit the PSR, then there is no advantage 
of setting SFU at flip prepare.
Please correct me if I am wrong.

On Thursday 11 June 2015 03:26 PM, Chris Wilson wrote:
> On Thu, Jun 11, 2015 at 03:08:35PM +0530, Ramalingam C wrote:
>> After scheduling a flip for obj, frontbuffer should be invalidated.
>> Hence intel_frontbuffer_invalidate is invoked at flip preparation.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=90418
>> ---
>>   drivers/gpu/drm/i915/intel_frontbuffer.c |    1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_frontbuffer.c b/drivers/gpu/drm/i915/intel_frontbuffer.c
>> index 4cea589..07147a7 100644
>> --- a/drivers/gpu/drm/i915/intel_frontbuffer.c
>> +++ b/drivers/gpu/drm/i915/intel_frontbuffer.c
>> @@ -268,6 +268,7 @@ void intel_frontbuffer_flip_prepare(struct drm_device *dev,
>>   	dev_priv->fb_tracking.busy_bits &= ~frontbuffer_bits;
>>   	mutex_unlock(&dev_priv->fb_tracking.lock);
>>   
>> +	intel_frontbuffer_invalidate(dev, NULL, ORIGIN_FLIP, frontbuffer_bits);
>>   	intel_psr_single_frame_update(dev);
> This then has the side effect of calling psr_invalidate (psr_exit)
> followed by the single-shot psr update, which doesn't seem desirable.
> -Chris
>
Shuang He June 14, 2015, 8:59 p.m. UTC | #3
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6569
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  276/276              276/276
ILK                                  303/303              303/303
SNB                                  312/312              312/312
IVB                                  343/343              343/343
BYT                                  287/287              287/287
BDW                                  321/321              321/321
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
Note: You need to pay more attention to line start with '*'
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_frontbuffer.c b/drivers/gpu/drm/i915/intel_frontbuffer.c
index 4cea589..07147a7 100644
--- a/drivers/gpu/drm/i915/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/intel_frontbuffer.c
@@ -268,6 +268,7 @@  void intel_frontbuffer_flip_prepare(struct drm_device *dev,
 	dev_priv->fb_tracking.busy_bits &= ~frontbuffer_bits;
 	mutex_unlock(&dev_priv->fb_tracking.lock);
 
+	intel_frontbuffer_invalidate(dev, NULL, ORIGIN_FLIP, frontbuffer_bits);
 	intel_psr_single_frame_update(dev);
 }