Re: [Intel-gfx] [PATCH] drm/i915/display: Warn if the FBC is still writing to stolen on removal

2020-05-07 Thread Chris Wilson
Quoting Jani Nikula (2020-05-07 09:49:15)
> On Sun, 03 May 2020, Chris Wilson  wrote:
> > If the FBC is still writing into stolen, it will overwrite any future
> > users of that stolen region. Check before release.
> >
> > References: https://gitlab.freedesktop.org/drm/intel/-/issues/1635
> > Signed-off-by: Chris Wilson 
> > ---
> >  drivers/gpu/drm/i915/display/intel_fbc.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
> > b/drivers/gpu/drm/i915/display/intel_fbc.c
> > index c6afa10e814c..37244ed92ae4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> > @@ -540,6 +540,9 @@ static void __intel_fbc_cleanup_cfb(struct 
> > drm_i915_private *dev_priv)
> >  {
> >   struct intel_fbc *fbc = _priv->fbc;
> >  
> > + if (WARN_ON(intel_fbc_hw_is_active(dev_priv)))
> 
> drm_WARN_ON() ;)

I'm hoping that by the time you get around to it, we will have a drm-tip
idle run which will tell us whether or not this is barking up the wrong
tree.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/display: Warn if the FBC is still writing to stolen on removal

2020-05-07 Thread Jani Nikula
On Sun, 03 May 2020, Chris Wilson  wrote:
> If the FBC is still writing into stolen, it will overwrite any future
> users of that stolen region. Check before release.
>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/1635
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
> b/drivers/gpu/drm/i915/display/intel_fbc.c
> index c6afa10e814c..37244ed92ae4 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -540,6 +540,9 @@ static void __intel_fbc_cleanup_cfb(struct 
> drm_i915_private *dev_priv)
>  {
>   struct intel_fbc *fbc = _priv->fbc;
>  
> + if (WARN_ON(intel_fbc_hw_is_active(dev_priv)))

drm_WARN_ON() ;)

> + return;
> +
>   if (!drm_mm_node_allocated(>compressed_fb))
>   return;

-- 
Jani Nikula, Intel Open Source Graphics Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/display: Warn if the FBC is still writing to stolen on removal

2020-05-04 Thread Chris Wilson
Quoting Ville Syrjälä (2020-05-04 14:49:28)
> On Sun, May 03, 2020 at 07:00:34PM +0100, Chris Wilson wrote:
> > If the FBC is still writing into stolen, it will overwrite any future
> > users of that stolen region. Check before release.
> > 
> > References: https://gitlab.freedesktop.org/drm/intel/-/issues/1635
> > Signed-off-by: Chris Wilson 
> > ---
> >  drivers/gpu/drm/i915/display/intel_fbc.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
> > b/drivers/gpu/drm/i915/display/intel_fbc.c
> > index c6afa10e814c..37244ed92ae4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> > @@ -540,6 +540,9 @@ static void __intel_fbc_cleanup_cfb(struct 
> > drm_i915_private *dev_priv)
> >  {
> >   struct intel_fbc *fbc = _priv->fbc;
> >  
> > + if (WARN_ON(intel_fbc_hw_is_active(dev_priv)))
> > + return;
> > +
> 
> Can't immediately see how that would hapoen, but no harm in checking.

I'm clutching at straws to explain how come fi-bxt-dsi is overwriting

<7> [592.789844] heartbeat [] f0101011 f12ff12f f12ff12f f12ff12f f12ff12f 
f12ff12f f12ff12f f12ff12f
<7> [592.789853] heartbeat [0020] f12ff12f f12ff12f f12ff12f f12ff12f f12ff12f 
f12ff12f f12ff12f f12ff12f
<7> [592.789860] heartbeat *
<7> [592.789869] heartbeat [0060] f12ff12f f12ff12f f12ff12f f12ff12f c12ff12f 
f10f f12ff12f f12ff12f

into sensitive locations. My theory is that it is stolen memory being
clobbers with what looks like some odd pixel data. FBC being a suspect,
hence getting something like this check in place for the idle runs and
see what turns up.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/display: Warn if the FBC is still writing to stolen on removal

2020-05-04 Thread Ville Syrjälä
On Sun, May 03, 2020 at 07:00:34PM +0100, Chris Wilson wrote:
> If the FBC is still writing into stolen, it will overwrite any future
> users of that stolen region. Check before release.
> 
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/1635
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
> b/drivers/gpu/drm/i915/display/intel_fbc.c
> index c6afa10e814c..37244ed92ae4 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -540,6 +540,9 @@ static void __intel_fbc_cleanup_cfb(struct 
> drm_i915_private *dev_priv)
>  {
>   struct intel_fbc *fbc = _priv->fbc;
>  
> + if (WARN_ON(intel_fbc_hw_is_active(dev_priv)))
> + return;
> +

Can't immediately see how that would hapoen, but no harm in checking.

Reviewed-by: Ville Syrjälä 

>   if (!drm_mm_node_allocated(>compressed_fb))
>   return;
>  
> -- 
> 2.20.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


[Intel-gfx] [PATCH] drm/i915/display: Warn if the FBC is still writing to stolen on removal

2020-05-03 Thread Chris Wilson
If the FBC is still writing into stolen, it will overwrite any future
users of that stolen region. Check before release.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/1635
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c 
b/drivers/gpu/drm/i915/display/intel_fbc.c
index c6afa10e814c..37244ed92ae4 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -540,6 +540,9 @@ static void __intel_fbc_cleanup_cfb(struct drm_i915_private 
*dev_priv)
 {
struct intel_fbc *fbc = _priv->fbc;
 
+   if (WARN_ON(intel_fbc_hw_is_active(dev_priv)))
+   return;
+
if (!drm_mm_node_allocated(>compressed_fb))
return;
 
-- 
2.20.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx