[Intel-gfx] [PATCH] drm/i915: reset drm state backpointer in crtc_state
Konduru, Chandra
chandra.konduru at intel.com
Tue Apr 7 11:48:15 PDT 2015
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula at linux.intel.com]
> Sent: Tuesday, April 07, 2015 2:02 AM
> To: Konduru, Chandra; intel-gfx at lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: reset drm state backpointer in
> crtc_state
>
> On Mon, 06 Apr 2015, Chandra Konduru <chandra.konduru at intel.com> wrote:
> > At end of intel_crtc_set_config, reset crtc_state's drm_state back
> > pointer to null.
>
> This does not tell me anything that reading the patch already didn't. Please
> explain *why* this is needed in the commit message. What breaks without it? If
> this fixes a regression, please indicate which commit regressed.
Once atomic transaction is done, live crtc_state (i.e., intel_crtc->config) is
carrying back pointer to drm_atomic_state which is freed. When a new
non-atomic transaction is made (crtc_disable triggered off from set_mode),
this stale pointer is carried into that transaction.
Depending on timing, this causes issue to scaler feature that I am working
if panel fit to be disabled during crtc_disable.
It has potential to cause issues to wm work that Matt is doing, but not sure.
>
> BR,
> Jani.
>
> >
> > Signed-off-by: Chandra Konduru <chandra.konduru at intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index c84926b..f9c2e4d 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -12451,8 +12451,10 @@ fail:
> > }
> >
> > out_config:
> > - if (state)
> > + if (state) {
> > drm_atomic_state_free(state);
> > + to_intel_crtc(set->crtc)->config->base.state = NULL;
> > + }
> >
> > intel_set_config_free(config);
> > return ret;
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list