All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [linux-sunxi] [PATCH] drm/sun4i: Unbind components before releasing DRM and mem at master unbind
Date: Tue, 23 Apr 2019 19:16:23 +0200	[thread overview]
Message-ID: <4dc994f9d015e25572f8ed6ce9e809695ee49bc5.camel@bootlin.com> (raw)
In-Reply-To: <CAGb2v65n2KVUi8YQoo92bQAWUehzMisahah28VtQoJZd3WbC6w@mail.gmail.com>

Hi,

Le mardi 23 avril 2019 à 10:14 -0700, Chen-Yu Tsai a écrit :
> On Tue, Apr 23, 2019 at 10:06 AM Paul Kocialkowski
> <paul.kocialkowski@bootlin.com> wrote:
> > Hi,
> > 
> > Le vendredi 19 avril 2019 à 19:10 +0200, Paul Kocialkowski a écrit :
> > > Hi,
> > > 
> > > On Fri, 2019-04-19 at 09:02 -0700, Chen-Yu Tsai wrote:
> > > > On Fri, Apr 19, 2019 at 1:03 AM Paul Kocialkowski
> > > > <paul.kocialkowski@bootlin.com> wrote:
> > > > > Our components may still be using the DRM device driver (if only to
> > > > > access our driver's private data), so make sure to unbind them before
> > > > > the final drm_dev_put.
> > > > > 
> > > > > Also release our resserved memory adter unbind to match reverse
> > > > 
> > > > typos...
> > > 
> > > I'll probably spin up a v2 to fix them, they annoy me as well.
> > > 
> > > > > creation order.
> > > > > 
> > > > > Fixes: f5a9ed867c83 ("drm/sun4i: Fix component unbinding and component master deletion")
> > > > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > > > > ---
> > > > >  drivers/gpu/drm/sun4i/sun4i_drv.c | 5 +++--
> > > > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > index 843b86661833..29258b404e54 100644
> > > > > --- a/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > @@ -149,10 +149,11 @@ static void sun4i_drv_unbind(struct device *dev)
> > > > >         drm_kms_helper_poll_fini(drm);
> > > > >         drm_atomic_helper_shutdown(drm);
> > > > >         drm_mode_config_cleanup(drm);
> > > > > -       of_reserved_mem_device_release(dev);
> > > > > -       drm_dev_put(drm);
> > > > > 
> > > > >         component_unbind_all(dev, NULL);
> > > > > +       of_reserved_mem_device_release(dev);
> > > > 
> > > > You should probably mention this change in the commit log as well.
> > > 
> > > That's what I meant with the line that has typos. Maybe I should make
> > > it slightly more explicit as:
> > > 
> > > Also released our reserved memory after component unbind instead of
> > > before to match reverse creation order.
> > > 
> > > What do you think?
> 
> Forgot to reply ...
> 
> Looking again, the original already made sense. I'm not sure what I
> was doing ...

I like the improved description better anyway so I'll go with that :)

> > > > Otherwise,
> > > > 
> > > > Reviewed-by: Chen-Yu Tsai <wens@csie.org>
> > > 
> > > Thanks for the review!
> > 
> > Unless you have objections at this point, I'll send out the patch with
> > your Reviewed-by soon to get the patch out ASAP.
> 
> Works for me. Thanks!

Great, thanks!

Cheers,

Paul

> ChenYu
> 
> > Cheers,
> > 
> > Paul
> > 
> > > Cheers,
> > > 
> > > Paul
> > > 
> > > > > +
> > > > > +       drm_dev_put(drm);
> > > > >  }
> > > > > 
> > > > >  static const struct component_master_ops sun4i_drv_master_ops = {
> > > > > --
> > > > > 2.21.0
> > > > > 
> > > > > --
> > > > > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> > > > > For more options, visit https://groups.google.com/d/optout.
> > 
> > --
> > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.


WARNING: multiple messages have this Message-ID (diff)
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	David Airlie <airlied@linux.ie>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [linux-sunxi] [PATCH] drm/sun4i: Unbind components before releasing DRM and mem at master unbind
Date: Tue, 23 Apr 2019 19:16:23 +0200	[thread overview]
Message-ID: <4dc994f9d015e25572f8ed6ce9e809695ee49bc5.camel@bootlin.com> (raw)
In-Reply-To: <CAGb2v65n2KVUi8YQoo92bQAWUehzMisahah28VtQoJZd3WbC6w@mail.gmail.com>

Hi,

Le mardi 23 avril 2019 à 10:14 -0700, Chen-Yu Tsai a écrit :
> On Tue, Apr 23, 2019 at 10:06 AM Paul Kocialkowski
> <paul.kocialkowski@bootlin.com> wrote:
> > Hi,
> > 
> > Le vendredi 19 avril 2019 à 19:10 +0200, Paul Kocialkowski a écrit :
> > > Hi,
> > > 
> > > On Fri, 2019-04-19 at 09:02 -0700, Chen-Yu Tsai wrote:
> > > > On Fri, Apr 19, 2019 at 1:03 AM Paul Kocialkowski
> > > > <paul.kocialkowski@bootlin.com> wrote:
> > > > > Our components may still be using the DRM device driver (if only to
> > > > > access our driver's private data), so make sure to unbind them before
> > > > > the final drm_dev_put.
> > > > > 
> > > > > Also release our resserved memory adter unbind to match reverse
> > > > 
> > > > typos...
> > > 
> > > I'll probably spin up a v2 to fix them, they annoy me as well.
> > > 
> > > > > creation order.
> > > > > 
> > > > > Fixes: f5a9ed867c83 ("drm/sun4i: Fix component unbinding and component master deletion")
> > > > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > > > > ---
> > > > >  drivers/gpu/drm/sun4i/sun4i_drv.c | 5 +++--
> > > > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > index 843b86661833..29258b404e54 100644
> > > > > --- a/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > @@ -149,10 +149,11 @@ static void sun4i_drv_unbind(struct device *dev)
> > > > >         drm_kms_helper_poll_fini(drm);
> > > > >         drm_atomic_helper_shutdown(drm);
> > > > >         drm_mode_config_cleanup(drm);
> > > > > -       of_reserved_mem_device_release(dev);
> > > > > -       drm_dev_put(drm);
> > > > > 
> > > > >         component_unbind_all(dev, NULL);
> > > > > +       of_reserved_mem_device_release(dev);
> > > > 
> > > > You should probably mention this change in the commit log as well.
> > > 
> > > That's what I meant with the line that has typos. Maybe I should make
> > > it slightly more explicit as:
> > > 
> > > Also released our reserved memory after component unbind instead of
> > > before to match reverse creation order.
> > > 
> > > What do you think?
> 
> Forgot to reply ...
> 
> Looking again, the original already made sense. I'm not sure what I
> was doing ...

I like the improved description better anyway so I'll go with that :)

> > > > Otherwise,
> > > > 
> > > > Reviewed-by: Chen-Yu Tsai <wens@csie.org>
> > > 
> > > Thanks for the review!
> > 
> > Unless you have objections at this point, I'll send out the patch with
> > your Reviewed-by soon to get the patch out ASAP.
> 
> Works for me. Thanks!

Great, thanks!

Cheers,

Paul

> ChenYu
> 
> > Cheers,
> > 
> > Paul
> > 
> > > Cheers,
> > > 
> > > Paul
> > > 
> > > > > +
> > > > > +       drm_dev_put(drm);
> > > > >  }
> > > > > 
> > > > >  static const struct component_master_ops sun4i_drv_master_ops = {
> > > > > --
> > > > > 2.21.0
> > > > > 
> > > > > --
> > > > > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> > > > > For more options, visit https://groups.google.com/d/optout.
> > 
> > --
> > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Paul Kocialkowski <paul.kocialkowski-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
To: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Cc: dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	linux-arm-kernel
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	linux-kernel
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-sunxi <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>,
	Thomas Petazzoni
	<thomas.petazzoni-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH] drm/sun4i: Unbind components before releasing DRM and mem at master unbind
Date: Tue, 23 Apr 2019 19:16:23 +0200	[thread overview]
Message-ID: <4dc994f9d015e25572f8ed6ce9e809695ee49bc5.camel@bootlin.com> (raw)
In-Reply-To: <CAGb2v65n2KVUi8YQoo92bQAWUehzMisahah28VtQoJZd3WbC6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi,

Le mardi 23 avril 2019 à 10:14 -0700, Chen-Yu Tsai a écrit :
> On Tue, Apr 23, 2019 at 10:06 AM Paul Kocialkowski
> <paul.kocialkowski-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> wrote:
> > Hi,
> > 
> > Le vendredi 19 avril 2019 à 19:10 +0200, Paul Kocialkowski a écrit :
> > > Hi,
> > > 
> > > On Fri, 2019-04-19 at 09:02 -0700, Chen-Yu Tsai wrote:
> > > > On Fri, Apr 19, 2019 at 1:03 AM Paul Kocialkowski
> > > > <paul.kocialkowski-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org> wrote:
> > > > > Our components may still be using the DRM device driver (if only to
> > > > > access our driver's private data), so make sure to unbind them before
> > > > > the final drm_dev_put.
> > > > > 
> > > > > Also release our resserved memory adter unbind to match reverse
> > > > 
> > > > typos...
> > > 
> > > I'll probably spin up a v2 to fix them, they annoy me as well.
> > > 
> > > > > creation order.
> > > > > 
> > > > > Fixes: f5a9ed867c83 ("drm/sun4i: Fix component unbinding and component master deletion")
> > > > > Signed-off-by: Paul Kocialkowski <paul.kocialkowski-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
> > > > > ---
> > > > >  drivers/gpu/drm/sun4i/sun4i_drv.c | 5 +++--
> > > > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > index 843b86661833..29258b404e54 100644
> > > > > --- a/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
> > > > > @@ -149,10 +149,11 @@ static void sun4i_drv_unbind(struct device *dev)
> > > > >         drm_kms_helper_poll_fini(drm);
> > > > >         drm_atomic_helper_shutdown(drm);
> > > > >         drm_mode_config_cleanup(drm);
> > > > > -       of_reserved_mem_device_release(dev);
> > > > > -       drm_dev_put(drm);
> > > > > 
> > > > >         component_unbind_all(dev, NULL);
> > > > > +       of_reserved_mem_device_release(dev);
> > > > 
> > > > You should probably mention this change in the commit log as well.
> > > 
> > > That's what I meant with the line that has typos. Maybe I should make
> > > it slightly more explicit as:
> > > 
> > > Also released our reserved memory after component unbind instead of
> > > before to match reverse creation order.
> > > 
> > > What do you think?
> 
> Forgot to reply ...
> 
> Looking again, the original already made sense. I'm not sure what I
> was doing ...

I like the improved description better anyway so I'll go with that :)

> > > > Otherwise,
> > > > 
> > > > Reviewed-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
> > > 
> > > Thanks for the review!
> > 
> > Unless you have objections at this point, I'll send out the patch with
> > your Reviewed-by soon to get the patch out ASAP.
> 
> Works for me. Thanks!

Great, thanks!

Cheers,

Paul

> ChenYu
> 
> > Cheers,
> > 
> > Paul
> > 
> > > Cheers,
> > > 
> > > Paul
> > > 
> > > > > +
> > > > > +       drm_dev_put(drm);
> > > > >  }
> > > > > 
> > > > >  static const struct component_master_ops sun4i_drv_master_ops = {
> > > > > --
> > > > > 2.21.0
> > > > > 
> > > > > --
> > > > > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > > > > For more options, visit https://groups.google.com/d/optout.
> > 
> > --
> > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2019-04-23 17:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  8:02 [PATCH] drm/sun4i: Unbind components before releasing DRM and mem at master unbind Paul Kocialkowski
2019-04-19  8:02 ` Paul Kocialkowski
2019-04-19  8:02 ` Paul Kocialkowski
2019-04-19 16:02 ` [linux-sunxi] " Chen-Yu Tsai
2019-04-19 16:02   ` Chen-Yu Tsai
2019-04-19 16:02   ` [linux-sunxi] " Chen-Yu Tsai
2019-04-19 17:10   ` Paul Kocialkowski
2019-04-19 17:10     ` Paul Kocialkowski
2019-04-19 17:10     ` [linux-sunxi] " Paul Kocialkowski
2019-04-23 17:06     ` Paul Kocialkowski
2019-04-23 17:06       ` Paul Kocialkowski
2019-04-23 17:14       ` Chen-Yu Tsai
2019-04-23 17:14         ` Chen-Yu Tsai
2019-04-23 17:16         ` Paul Kocialkowski [this message]
2019-04-23 17:16           ` Paul Kocialkowski
2019-04-23 17:16           ` [linux-sunxi] " Paul Kocialkowski

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=4dc994f9d015e25572f8ed6ce9e809695ee49bc5.camel@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@csie.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 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.