dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	m.felsch@pengutronix.de,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call
Date: Mon, 02 Mar 2020 17:13:31 -0300	[thread overview]
Message-ID: <1583180011.3.8@crapouillou.net> (raw)
In-Reply-To: <20200227181522.2711142-32-daniel.vetter@ffwll.ch>

Hi Daniel,


Le jeu., févr. 27, 2020 at 19:15, Daniel Vetter 
<daniel.vetter@ffwll.ch> a écrit :
> Allows us to drop the drm_driver.release callback.
> 
> This is made possible by a preceeding patch which added a drmm_
> cleanup action to drm_mode_config_init(), hence all we need to do to
> ensure that drm_mode_config_cleanup() is run on final drm_device
> cleanup is check the new error code for _init().
> 
> v2: Explain why this cleanup is possible (Laurent).
> 
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Paul Cercueil <paul@crapouillou.net>

Reviewed-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul

> ---
>  drivers/gpu/drm/ingenic/ingenic-drm.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c 
> b/drivers/gpu/drm/ingenic/ingenic-drm.c
> index 192aaa4421a3..f5689521428e 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
> @@ -489,11 +489,6 @@ static irqreturn_t ingenic_drm_irq_handler(int 
> irq, void *arg)
>  	return IRQ_HANDLED;
>  }
> 
> -static void ingenic_drm_release(struct drm_device *drm)
> -{
> -	drm_mode_config_cleanup(drm);
> -}
> -
>  static int ingenic_drm_enable_vblank(struct drm_crtc *crtc)
>  {
>  	struct ingenic_drm *priv = drm_crtc_get_priv(crtc);
> @@ -537,7 +532,6 @@ static struct drm_driver ingenic_drm_driver_data 
> = {
>  	.gem_prime_mmap		= drm_gem_cma_prime_mmap,
> 
>  	.irq_handler		= ingenic_drm_irq_handler,
> -	.release		= ingenic_drm_release,
>  };
> 
>  static const struct drm_plane_funcs ingenic_drm_primary_plane_funcs 
> = {
> @@ -638,7 +632,10 @@ static int ingenic_drm_probe(struct 
> platform_device *pdev)
>  	}
>  	drmm_add_final_kfree(drm, priv);
> 
> -	drm_mode_config_init(drm);
> +	ret = drm_mode_config_init(drm);
> +	if (ret)
> +		return ret;
> +
>  	drm->mode_config.min_width = 0;
>  	drm->mode_config.min_height = 0;
>  	drm->mode_config.max_width = soc_info->max_width;
> --
> 2.24.1
> 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-03-03  8:25 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 18:14 [PATCH 00/51] drm managed resources, v3 Daniel Vetter
2020-02-27 18:14 ` [PATCH 01/51] mm/sl[uo]b: export __kmalloc_track(_node)_caller Daniel Vetter
2020-02-27 18:14 ` [PATCH 02/51] drm/i915: Don't clear drvdata in ->release Daniel Vetter
2020-02-27 18:14 ` [PATCH 03/51] drm: add managed resources tied to drm_device Daniel Vetter
2020-02-28 22:45   ` Sam Ravnborg
2020-02-28 23:14     ` Daniel Vetter
2020-02-29 11:17       ` Sam Ravnborg
2020-02-29 11:28         ` Daniel Vetter
2020-03-02  9:22           ` Jani Nikula
2020-03-02  9:36             ` Daniel Vetter
2020-03-02  9:39             ` Daniel Vetter
2020-03-02 16:34               ` Sam Ravnborg
2020-02-27 18:14 ` [PATCH 04/51] drm: Set final_kfree in drm_dev_alloc Daniel Vetter
2020-02-27 18:14 ` [PATCH 05/51] drm/mipi_dbi: Use drmm_add_final_kfree in all drivers Daniel Vetter
2020-02-27 20:55   ` Sam Ravnborg
2020-02-27 18:14 ` [PATCH 06/51] drm/udl: Use drmm_add_final_kfree Daniel Vetter
2020-02-27 20:57   ` Sam Ravnborg
2020-02-27 18:14 ` [PATCH 07/51] drm/qxl: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 08/51] drm/i915: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 09/51] drm/cirrus: " Daniel Vetter
2020-02-27 21:01   ` Sam Ravnborg
2020-02-27 18:14 ` [PATCH 10/51] drm/v3d: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 11/51] drm/tidss: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 12/51] drm/mcde: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 13/51] drm/vgem: " Daniel Vetter
2020-02-27 21:02   ` Sam Ravnborg
2020-02-27 18:14 ` [PATCH 14/51] drm/vkms: " Daniel Vetter
2020-02-27 18:59   ` Rodrigo Siqueira
2020-02-27 18:14 ` [PATCH 15/51] drm/repaper: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 16/51] drm/inigenic: " Daniel Vetter
2020-03-02 20:12   ` Paul Cercueil
2020-02-27 18:14 ` [PATCH 17/51] drm/gm12u320: " Daniel Vetter
2020-02-27 18:14 ` [PATCH 18/51] drm/<drivers>: " Daniel Vetter
2020-02-27 18:35   ` Liviu Dudau
2020-02-27 18:14 ` [PATCH 19/51] drm: Cleanups after drmm_add_final_kfree rollout Daniel Vetter
2020-02-27 18:14 ` [PATCH 20/51] drm: Handle dev->unique with drmm_ Daniel Vetter
2020-02-27 18:14 ` [PATCH 21/51] drm: Use drmm_ for drm_dev_init cleanup Daniel Vetter
2020-02-27 18:14 ` [PATCH 22/51] drm: manage drm_minor cleanup with drmm_ Daniel Vetter
2020-02-27 18:14 ` [PATCH 23/51] drm: Manage drm_gem_init " Daniel Vetter
2020-02-27 18:14 ` [PATCH 24/51] drm: Manage drm_vblank_cleanup " Daniel Vetter
2020-02-27 18:14 ` [PATCH 25/51] drm: Garbage collect drm_dev_fini Daniel Vetter
2020-02-27 18:14 ` [PATCH 26/51] drm: Manage drm_mode_config_init with drmm_ Daniel Vetter
2020-02-28  7:30   ` Thomas Zimmermann
2020-02-28  8:43     ` Daniel Vetter
2020-02-28  9:56       ` Thomas Zimmermann
2020-02-28 20:26   ` Sam Ravnborg
2020-02-28 23:11     ` Daniel Vetter
2020-02-29 10:59       ` Sam Ravnborg
2020-03-02 14:09       ` Daniel Vetter
2020-02-27 18:14 ` [PATCH 27/51] drm/bochs: Remove leftover drm_atomic_helper_shutdown Daniel Vetter
2020-02-27 18:14 ` [PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup Daniel Vetter
2020-02-27 18:15 ` [PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-02-28 20:32   ` Sam Ravnborg
2020-02-27 18:15 ` [PATCH 30/51] drm/cirrus: Fully embrace devm_ Daniel Vetter
2020-02-27 18:15 ` [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-03-02 20:13   ` Paul Cercueil [this message]
2020-02-27 18:15 ` [PATCH 32/51] drm/mcde: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 33/51] drm/mcde: More devm_drm_dev_init Daniel Vetter
2020-02-27 18:15 ` [PATCH 34/51] drm/meson: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-02-27 18:15 ` [PATCH 35/51] drm/pl111: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 36/51] drm/rcar-du: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 37/51] drm/rockchip: " Daniel Vetter
2020-02-28 21:19   ` kbuild test robot
2020-02-28 23:34     ` Daniel Vetter
2020-02-29  1:53   ` kbuild test robot
2020-02-27 18:15 ` [PATCH 38/51] drm/stm: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 39/51] drm/shmob: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 40/51] drm/mtk: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 41/51] drm/tidss: " Daniel Vetter
2020-02-27 18:15 ` [PATCH 42/51] drm/gm12u320: More drmm_ Daniel Vetter
2020-02-27 18:15 ` [PATCH 43/51] drm/gm12u320: Use devm_drm_dev_init Daniel Vetter
2020-02-27 18:15 ` [PATCH 44/51] drm/gm12u320: Use helpers for shutdown/suspend/resume Daniel Vetter
2020-02-27 18:15 ` [PATCH 45/51] drm/gm12u320: Simplify upload work Daniel Vetter
2020-02-27 19:04   ` Hans de Goede
2020-02-27 18:15 ` [PATCH 46/51] drm/repaper: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-02-27 18:15 ` [PATCH 47/51] drm/mipi-dbi: Move drm_mode_config_init into mipi library Daniel Vetter
2020-02-28 20:34   ` Sam Ravnborg
2020-02-27 18:15 ` [PATCH 48/51] drm/mipi-dbi: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-02-28 20:36   ` Sam Ravnborg
2020-02-27 18:15 ` [PATCH 49/51] drm/udl: " Daniel Vetter
2020-02-28 20:37   ` Sam Ravnborg
2020-02-27 18:15 ` [PATCH 50/51] drm/udl: drop drm_driver.release hook Daniel Vetter
2020-02-28  7:43   ` Thomas Zimmermann
2020-02-28  8:40     ` Daniel Vetter
2020-02-28 11:46       ` Thomas Zimmermann
2020-02-28 17:43         ` Daniel Vetter
2020-03-02  8:14           ` Thomas Zimmermann
2020-03-02  9:01             ` Daniel Vetter
2020-02-27 18:15 ` [PATCH 51/51] drm: Add docs for managed resources Daniel Vetter
2020-02-27 20:53   ` Sam Ravnborg
  -- strict thread matches above, loose matches on Subject: below --
2020-03-23 14:48 [PATCH 00/51] drm_device managed resources, v5 Daniel Vetter
2020-03-23 14:49 ` [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-03-02 22:25 [PATCH 00/51] drm_device managed resources, v4 Daniel Vetter
2020-03-02 22:26 ` [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-03-06 20:17   ` Sam Ravnborg
2020-02-21 21:02 [PATCH 00/51] drm managed resources, v2 Daniel Vetter
2020-02-21 21:02 ` [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call 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=1583180011.3.8@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=m.felsch@pengutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).