dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/atomic: Remove pointless private object NULL state check
Date: Mon, 3 Jul 2017 20:39:57 +0300	[thread overview]
Message-ID: <20170703173957.GH12629@intel.com> (raw)
In-Reply-To: <20170703165338.ydxr7ydqzgiza4st@phenom.ffwll.local>

On Mon, Jul 03, 2017 at 06:53:38PM +0200, Daniel Vetter wrote:
> On Mon, Jul 03, 2017 at 04:43:35PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > We will never add private objects with a NULL state into the atomic
> > state, hence checking for that is pointless.
> > 
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> For patches 1&2, feels a bit overengineered to me, I think the other one
> was simpler.

I had to do the same thing for private objects, hence I figure why not
share the code and avoid putting in slightly different bugs for
different type object.

> Not objecting, you just need to find someone else to
> like&review it.
> -Daniel
> 
> > ---
> >  drivers/gpu/drm/drm_atomic.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > index 1663ec3626a1..a61e396b11a8 100644
> > --- a/drivers/gpu/drm/drm_atomic.c
> > +++ b/drivers/gpu/drm/drm_atomic.c
> > @@ -1019,8 +1019,7 @@ drm_atomic_get_private_obj_state(struct drm_atomic_state *state, void *obj,
> >  	struct __drm_private_objs_state *arr;
> >  
> >  	for (i = 0; i < state->num_private_objs; i++)
> > -		if (obj == state->private_objs[i].obj &&
> > -		    state->private_objs[i].obj_state)
> > +		if (obj == state->private_objs[i].obj)
> >  			return state->private_objs[i].obj_state;
> >  
> >  	num_objs = state->num_private_objs + 1;
> > -- 
> > 2.13.0
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

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

  reply	other threads:[~2017-07-03 17:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 13:43 [PATCH 0/5] drm/atomic: drm_dynarray and private obj cleanup ville.syrjala
2017-07-03 13:43 ` [PATCH 1/5] drm: Add drm_dynarray ville.syrjala
2017-07-03 13:43 ` [PATCH 2/5] drm/atomic: Convert state->connectors to drm_dynarray ville.syrjala
2017-07-03 13:43 ` [PATCH 3/5] drm/atomic: Remove pointless private object NULL state check ville.syrjala
2017-07-03 16:53   ` Daniel Vetter
2017-07-03 17:39     ` Ville Syrjälä [this message]
2017-07-03 13:43 ` [PATCH 4/5] drm/atomic: Convert private_objs to drm_dynarray ville.syrjala
2017-07-03 13:43 ` [PATCH 5/5] drm/atomic: Make private objs proper objects ville.syrjala
2017-07-03 17:00   ` 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=20170703173957.GH12629@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox