Daniel Vetter
2017-May-08 08:26 UTC
[Nouveau] [PATCH RESEND 1/4] drm/nouveau: Merge pre/postclose hooks
Again no apparent explanation for the split except hysterical raisins.
Merging them also makes it a bit more obviuos what's going on wrt the
runtime pm refdancing.
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: nouveau at lists.freedesktop.org
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Liviu Dudau <Liviu.Dudau at arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c
b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2b6ac24ce690..ec719df619a6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -881,7 +881,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file
*fpriv)
}
static void
-nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv)
+nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
{
struct nouveau_cli *cli = nouveau_cli(fpriv);
struct nouveau_drm *drm = nouveau_drm(dev);
@@ -897,12 +897,6 @@ nouveau_drm_preclose(struct drm_device *dev, struct
drm_file *fpriv)
list_del(&cli->head);
mutex_unlock(&drm->client.mutex);
-}
-
-static void
-nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
-{
- struct nouveau_cli *cli = nouveau_cli(fpriv);
nouveau_cli_fini(cli);
kfree(cli);
pm_runtime_mark_last_busy(dev->dev);
@@ -974,7 +968,6 @@ driver_stub = {
.load = nouveau_drm_load,
.unload = nouveau_drm_unload,
.open = nouveau_drm_open,
- .preclose = nouveau_drm_preclose,
.postclose = nouveau_drm_postclose,
.lastclose = nouveau_vga_lastclose,
--
2.11.0
Daniel Vetter
2017-May-08 08:28 UTC
[Nouveau] [PATCH RESEND 1/4] drm/nouveau: Merge pre/postclose hooks
On Mon, May 08, 2017 at 10:26:30AM +0200, Daniel Vetter wrote:> Again no apparent explanation for the split except hysterical raisins. > Merging them also makes it a bit more obviuos what's going on wrt the > runtime pm refdancing. > > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: nouveau at lists.freedesktop.org > Reviewed-by: Sean Paul <seanpaul at chromium.org> > Reviewed-by: Liviu Dudau <Liviu.Dudau at arm.com> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>Forgot the cover letter: I'm resending the patches that didn't find an owner last time around. I'll smash them all into drm-misc later so I can apply the final patch. Thanks, Daniel> --- > drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c > index 2b6ac24ce690..ec719df619a6 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c > @@ -881,7 +881,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) > } > > static void > -nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) > +nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) > { > struct nouveau_cli *cli = nouveau_cli(fpriv); > struct nouveau_drm *drm = nouveau_drm(dev); > @@ -897,12 +897,6 @@ nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) > list_del(&cli->head); > mutex_unlock(&drm->client.mutex); > > -} > - > -static void > -nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) > -{ > - struct nouveau_cli *cli = nouveau_cli(fpriv); > nouveau_cli_fini(cli); > kfree(cli); > pm_runtime_mark_last_busy(dev->dev); > @@ -974,7 +968,6 @@ driver_stub = { > .load = nouveau_drm_load, > .unload = nouveau_drm_unload, > .open = nouveau_drm_open, > - .preclose = nouveau_drm_preclose, > .postclose = nouveau_drm_postclose, > .lastclose = nouveau_vga_lastclose, > > -- > 2.11.0 >-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Maybe Matching Threads
- [PATCH 14/24] drm/nouveau: Merge pre/postclose hooks
- [PATCH] drm/nouveau: split nouveau_drm_postclose back in pre/postclose
- [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335
- [PATCH 0/3] drm/nouveau: fix a use-after-free in postclose()
- [PATCH 08/13] drm/nouveau: drop DRM_AUTH from DRM_RENDER_ALLOW ioctls