All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Konduru, Chandra" <chandra.konduru@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: reset drm state backpointer in	crtc_state
Date: Tue, 7 Apr 2015 18:48:15 +0000	[thread overview]
Message-ID: <76A9B330A4D78C4D99CB292C4CC06C0E36F96813@fmsmsx101.amr.corp.intel.com> (raw)
In-Reply-To: <871tjwl3aa.fsf@intel.com>


> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> Sent: Tuesday, April 07, 2015 2:02 AM
> To: Konduru, Chandra; intel-gfx@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@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@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@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> --
> Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-04-07 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 18:30 [PATCH] drm/i915: reset drm state backpointer in crtc_state Chandra Konduru
2015-04-06 20:52 ` shuang.he
2015-04-07  9:02 ` Jani Nikula
2015-04-07 18:48   ` Konduru, Chandra [this message]
2015-04-08  8:19     ` Daniel Vetter
2015-04-08 16:26       ` Konduru, Chandra
2015-04-08  8:22 ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76A9B330A4D78C4D99CB292C4CC06C0E36F96813@fmsmsx101.amr.corp.intel.com \
    --to=chandra.konduru@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.