All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Cc: airlied@linux.ie, liviu.dudau@arm.com,
	dri-devel@lists.freedesktop.org, nd@arm.com
Subject: Re: [PATCH] drm/atomic: Set current atomic state in drm_private_state
Date: Fri, 15 Jun 2018 23:38:44 +0300	[thread overview]
Message-ID: <20180615203844.GX20518@intel.com> (raw)
In-Reply-To: <20180530202227.GU23723@intel.com>

On Wed, May 30, 2018 at 11:22:27PM +0300, Ville Syrjälä wrote:
> On Wed, May 30, 2018 at 06:30:52PM +0100, Alexandru Gheorghe wrote:
> > drm_private_state has a back pointer to the drm_atomic_state,
> > however that was not initialized in drm_atomic_get_private_obj_state
> > after duplication, as it is the case for other drm atomic getters
> > 
> > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
> > ---
> >  drivers/gpu/drm/drm_atomic.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index 7d25c42..249aaf8 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -1108,6 +1108,7 @@ drm_atomic_get_private_obj_state(struct drm_atomic_state *state,
> >  	state->private_objs[index].old_state = obj->state;
> >  	state->private_objs[index].new_state = obj_state;
> >  	state->private_objs[index].ptr = obj;
> > +	obj_state->state = state;
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

And finally pushed to frm-misc-next. Almost forgot about this one.

Thanks for the patch.

> 
> I guess no one ever used that pointer. Should we add some WARNs
> to drm_atomic_helper_swap_state() to make sure these are correct?
> 
> I think in general life might be nicer if we didn't even have these
> pointers at all. As it stands it's pretty easy to accidentally
> use them when you're not supposed to (eg. after swap_state() try
> to use the new_state->state). But there's tons of code that would
> need to be touched to eliminate them so not a very pleasant project.
> 
> >  
> >  	state->num_private_objs = num_objs;
> >  
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Ville Syrjälä
> Intel

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-06-15 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 17:30 [PATCH] drm/atomic: Set current atomic state in drm_private_state Alexandru Gheorghe
2018-05-30 20:22 ` Ville Syrjälä
2018-05-31  9:56   ` Alexandru-Cosmin Gheorghe
2018-06-15 20:38   ` Ville Syrjälä [this message]
2018-06-17  8:23     ` Alexandru-Cosmin Gheorghe

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=20180615203844.GX20518@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=alexandru-cosmin.gheorghe@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=liviu.dudau@arm.com \
    --cc=nd@arm.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.