All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] drm/gma500: Managed cleanup
@ 2021-09-20 14:10 Thomas Zimmermann
  2021-09-20 14:10 ` [PATCH 1/5] drm/gma500: Replace references to dev_private with helper function Thomas Zimmermann
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Thomas Zimmermann @ 2021-09-20 14:10 UTC (permalink / raw)
  To: patrik.r.jakobsson, airlied, daniel; +Cc: dri-devel, Thomas Zimmermann

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.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-22 14:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 0/5] drm/gma500: Managed cleanup Patrik Jakobsson

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.