Skip to content

drm/gma500: Managed cleanup

Thomas Zimmermann dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/gma500: Replace references to dev_private with helper functiondrivers/gpu/drm/gma500/backlight.c drivers/gpu/drm/gma500/cdv_device.c drivers/gpu/drm/gma500/cdv_intel_display.c +25 more+178 -1840 replies
2/5drm/gma500: Disable PCI device during shutdowndrivers/gpu/drm/gma500/psb_drv.c+3 -70 replies
3/5drm/gma500: Embed struct drm_device in struct drm_psb_privatedrivers/gpu/drm/gma500/cdv_device.c drivers/gpu/drm/gma500/intel_bios.c drivers/gpu/drm/gma500/intel_gmbus.c +6 more+26 -350 replies
4/5drm/gma500: Remove dev_priv branch from unload functiondrivers/gpu/drm/gma500/psb_drv.c+46 -470 replies
5/5drm/gma500: Managed device releasedrivers/gpu/drm/gma500/psb_drv.c+11 -80 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPatrik Jakobsson
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] drm/gma500: Managed cleanup

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