All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	 dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 0/5] drm/gma500: Managed cleanup
Date: Wed, 22 Sep 2021 16:17:18 +0200	[thread overview]
Message-ID: <CAMeQTsY0R2TuUNr_rCRx4Wbu3RxCYEbTy7WUqFGxT-axps69cg@mail.gmail.com> (raw)
In-Reply-To: <20210920141051.30988-1-tzimmermann@suse.de>

On Mon, Sep 20, 2021 at 4:10 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> Switch gma500 to managed cleanup and remove the manual cleanup
> code from the driver's PCI callbacks.
>
> Managed cleanup involves embedding the DRM device structure in the
> driver's structure. In preparation, patch 1 replaces references all
> references to dev_private with a helper function.
>
> Patch 2 adds managed cleanup for pci_enable_device().
>
> Patches 3 and 4 embed struct drm_device in struct_drm_psb_private. The
> structure's memory is being automatically released.
>
> Patch 5 adds managed cleanup for the device resources. Instead of
> calling the large, monolithic function psb_driver_unload(), the release
> code could be split up split into smaller helpers and reuse exising
> functionality from devres.
>
> Future work: for a number of drivers, the PCI remove callback contains
> only a single call to drm_device_unregister(). In a later patchset,
> this could be implemented as another shared helper within DRM.
>
> Tested on Atom N2800 hardware.

Thanks for the patches!

For the entire series:
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

I'll let you apply this to drm-misc-next yourself

Cheers
Patrik

>
> Thomas Zimmermann (5):
>   drm/gma500: Replace references to dev_private with helper function
>   drm/gma500: Disable PCI device during shutdown
>   drm/gma500: Embed struct drm_device in struct drm_psb_private
>   drm/gma500: Remove dev_priv branch from unload function
>   drm/gma500: Managed device release
>
>  drivers/gpu/drm/gma500/backlight.c         |  12 +-
>  drivers/gpu/drm/gma500/cdv_device.c        |  24 ++--
>  drivers/gpu/drm/gma500/cdv_intel_display.c |  10 +-
>  drivers/gpu/drm/gma500/cdv_intel_dp.c      |  12 +-
>  drivers/gpu/drm/gma500/cdv_intel_lvds.c    |  22 +--
>  drivers/gpu/drm/gma500/framebuffer.c       |  16 +--
>  drivers/gpu/drm/gma500/gem.c               |   2 +-
>  drivers/gpu/drm/gma500/gma_device.c        |   2 +-
>  drivers/gpu/drm/gma500/gma_display.c       |  14 +-
>  drivers/gpu/drm/gma500/gtt.c               |  18 +--
>  drivers/gpu/drm/gma500/intel_bios.c        |  10 +-
>  drivers/gpu/drm/gma500/intel_gmbus.c       |  12 +-
>  drivers/gpu/drm/gma500/mid_bios.c          |  11 +-
>  drivers/gpu/drm/gma500/mmu.c               |  12 +-
>  drivers/gpu/drm/gma500/oaktrail_crtc.c     |   8 +-
>  drivers/gpu/drm/gma500/oaktrail_device.c   |  20 +--
>  drivers/gpu/drm/gma500/oaktrail_hdmi.c     |  18 +--
>  drivers/gpu/drm/gma500/oaktrail_lvds.c     |  14 +-
>  drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c |   2 +-
>  drivers/gpu/drm/gma500/opregion.c          |  14 +-
>  drivers/gpu/drm/gma500/power.c             |  20 +--
>  drivers/gpu/drm/gma500/psb_device.c        |  16 +--
>  drivers/gpu/drm/gma500/psb_drv.c           | 147 ++++++++++-----------
>  drivers/gpu/drm/gma500/psb_drv.h           |  24 ++--
>  drivers/gpu/drm/gma500/psb_intel_display.c |  10 +-
>  drivers/gpu/drm/gma500/psb_intel_lvds.c    |  31 ++---
>  drivers/gpu/drm/gma500/psb_intel_sdvo.c    |  10 +-
>  drivers/gpu/drm/gma500/psb_irq.c           |  26 ++--
>  drivers/gpu/drm/gma500/psb_lid.c           |   2 +-
>  29 files changed, 261 insertions(+), 278 deletions(-)
>
> --
> 2.33.0
>

      parent reply	other threads:[~2021-09-22 14:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 14:10 [PATCH 0/5] drm/gma500: Managed cleanup Thomas Zimmermann
2021-09-20 14:10 ` [PATCH 1/5] drm/gma500: Replace references to dev_private with helper function Thomas Zimmermann
2021-09-20 14:10 ` [PATCH 2/5] drm/gma500: Disable PCI device during shutdown Thomas Zimmermann
2021-09-20 14:10 ` [PATCH 3/5] drm/gma500: Embed struct drm_device in struct drm_psb_private Thomas Zimmermann
2021-09-20 14:10 ` [PATCH 4/5] drm/gma500: Remove dev_priv branch from unload function Thomas Zimmermann
2021-09-20 14:10 ` [PATCH 5/5] drm/gma500: Managed device release Thomas Zimmermann
2021-09-22 14:17 ` Patrik Jakobsson [this message]

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=CAMeQTsY0R2TuUNr_rCRx4Wbu3RxCYEbTy7WUqFGxT-axps69cg@mail.gmail.com \
    --to=patrik.r.jakobsson@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tzimmermann@suse.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 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.