[Nouveau] [PATCH] drm/nouveau: split nouveau_drm_postclose back in pre/postclose

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Wed Jul 12 22:00:35 UTC 2017


Mike,

sorry i forgot to add: Can you plase test this patch?


Thanks,

tobias

On 7/12/17 11:56 PM, Tobias Klausmann wrote:
> This patch brings back the old nouveau_drm_preclose and nouveau_drm_postclose
> functions for closing down a drm device
>
> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
> ---
>   drivers/gpu/drm/nouveau/nouveau_drm.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index 90757af9bc73..0ca2b65bdc4f 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -877,7 +877,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
>   }
>   
>   static void
> -nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
> +nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv)
>   {
>   	struct nouveau_cli *cli = nouveau_cli(fpriv);
>   	struct nouveau_drm *drm = nouveau_drm(dev);
> @@ -892,7 +892,12 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
>   	mutex_lock(&drm->client.mutex);
>   	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);
> @@ -964,6 +969,7 @@ 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,
>   


More information about the Nouveau mailing list