Skip to content

more drm de-midlayering

Daniel Vetter dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest50 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/50drm/rcar: call drm_put_dev directly in the ->remove hookdrivers/gpu/drm/rcar-du/rcar_du_drv.c+3 -10 replies
2/50drm/exynos: call drm_put_dev directly from ->removedrivers/gpu/drm/exynos/exynos_drm_drv.c+3 -10 replies
3/50drm/imx: directly call drm_put_dev in ->removedrivers/staging/imx-drm/imx-drm-core.c+3 -10 replies
4/50drm/tilcdc: call drm_put_dev directly from ->removedrivers/gpu/drm/tilcdc/tilcdc_drv.c+1 -11 reply
5/50drm/omap: call drm_put_dev directly in ->removedrivers/gpu/drm/omapdrm/omap_drv.c+2 -23 replies
6/50drm/shmob: call drm_put_dev directly from ->remove hookdrivers/gpu/drm/shmobile/shmob_drm_drv.c+3 -11 reply
7/50drm/armada: directly call drm_put_dev in ->removedrivers/gpu/drm/armada/armada_drv.c+2 -10 replies
8/50drm/msm: call drm_put_dev directly in ->removedrivers/gpu/drm/msm/msm_drv.c+1 -11 reply
9/50drm: rip out drm_platform_exitdrivers/gpu/drm/drm_platform.c include/drm/drmP.h+0 -120 replies
10/50drm: restrict the device list for shadow attached driversdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_platform.c drivers/gpu/drm/drm_stub.c +3 more+13 -120 replies
11/50drm/bufs: remove handling of _DRM_GEM mappingsdrivers/gpu/drm/drm_bufs.c drivers/gpu/drm/drm_vm.c include/uapi/drm/drm.h+0 -100 replies
12/50drm: kill DRIVER_REQUIRE_AGPdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/i810/i810_dma.c drivers/gpu/drm/i810/i810_drv.c +3 more+12 -100 replies
13/50drm: ->agp_init can't faildrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_stub.c include/drm/drmP.h+4 -80 replies
14/50drm: rip out drm_core_has_AGPdrivers/gpu/drm/drm_agpsupport.c drivers/gpu/drm/drm_bufs.c drivers/gpu/drm/drm_memory.c +4 more+11 -260 replies
15/50drm: remove agp_init() bus callbackdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_stub.c include/drm/drmP.h+10 -110 replies
16/50drm: inline drm_agp_destroydrivers/gpu/drm/drm_agpsupport.c drivers/gpu/drm/drm_pci.c include/drm/drm_agpsupport.h+4 -210 replies
17/50drm: kill the ->agp_destroy callbackdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_stub.c include/drm/drmP.h+5 -70 replies
18/50drm: remove global_mutex locking around agp_initdrivers/gpu/drm/drm_pci.c+0 -40 replies
19/50drm: rip out DRM_AGP_MEM and DRM_AGP_KERNdrivers/gpu/drm/drm_agpsupport.c drivers/gpu/drm/drm_memory.c include/drm/drmP.h +2 more+18 -310 replies
20/50drm: Kill DRM_HZdrivers/gpu/drm/drm_irq.c drivers/gpu/drm/exynos/exynos_mixer.c drivers/gpu/drm/gma500/accel_2d.c +11 more+20 -220 replies
21/50drm: Kill DRM_IRQ_ARGSdrivers/gpu/drm/cirrus/cirrus_drv.h drivers/gpu/drm/gma500/psb_drv.h drivers/gpu/drm/gma500/psb_irq.c +21 more+24 -270 replies
22/50drm: Kill DRM_WAKUP and DRM_INIT_WAITQUEUEdrivers/gpu/drm/drm_irq.c drivers/gpu/drm/exynos/exynos_drm_fimd.c drivers/gpu/drm/exynos/exynos_mixer.c +7 more+21 -240 replies
23/50drm: Kill DRM_COPY_(TO|FROM)_USERdrivers/gpu/drm/drm_buffer.c drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/mga/mga_dma.c +18 more+64 -710 replies
24/50drm: Kill DRM_*MEMORYBARRIERdrivers/gpu/drm/gma500/psb_irq.c drivers/gpu/drm/mga/mga_drv.h drivers/gpu/drm/nouveau/nouveau_dma.c +9 more+14 -210 replies
25/50drm: Kill DRM_SUSERdrivers/gpu/drm/ttm/ttm_bo_util.c drivers/gpu/drm/via/via_dma.c include/drm/drm_os_linux.h+3 -40 replies
26/50drm/gma500: Remove dead codedrivers/gpu/drm/gma500/psb_irq.c+0 -151 reply
27/50drm/irq: Replace DRM_WAIT_ON with wait_eventdrivers/gpu/drm/drm_irq.c+8 -60 replies
28/50drm: Remove DRM_WAIT_ON from all driversdrivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/mga/mga_irq.c drivers/gpu/drm/radeon/radeon_irq.c +4 more+62 -463 replies
29/50drm/irq: simplify irq checks in drm_wait_vblankdrivers/gpu/drm/drm_irq.c+1 -14 replies
30/50drm/pci: fold in irq_by_busid supportdrivers/gpu/drm/drm_irq.c drivers/gpu/drm/drm_pci.c include/drm/drmP.h+38 -300 replies
31/50drm/irq: drm_control is a legacy ioctl, so pci devices onlydrivers/gpu/drm/drm_irq.c+8 -80 replies
32/50drm/irq: remove cargo-culted locking from irq_install/unistalldrivers/gpu/drm/drm_irq.c drivers/gpu/drm/i915/i915_drv.c drivers/gpu/drm/i915/i915_gem.c+21 -190 replies
33/50drm: remove drm_dev_to_irq from driversdrivers/gpu/drm/drm_irq.c drivers/gpu/drm/mga/mga_state.c drivers/gpu/drm/r128/r128_state.c +2 more+8 -80 replies
34/50drm: kill drm_bus->bus_typedrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_platform.c drivers/gpu/drm/drm_usb.c +2 more+0 -100 replies
35/50drm: Rip out totally bogus vga_switcheroo->can_switch lockingdrivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/nouveau/nouveau_vga.c drivers/gpu/drm/radeon/radeon_device.c +1 more+16 -70 replies
36/50drm: rename dev->count_lock to dev->buf_lockdrivers/gpu/drm/drm_bufs.c drivers/gpu/drm/drm_stub.c include/drm/drmP.h+20 -184 replies
37/50drm/irq: track the irq installed in drm_irq_install in dev->irqdrivers/gpu/drm/drm_irq.c+11 -72 replies
38/50drm/irq: Look up the pci irq directly in the drm_control ioctldrivers/gpu/drm/drm_irq.c+4 -20 replies
39/50drm: pass the irq explicitly to drm_irq_installDocumentation/DocBook/drm.tmpl drivers/gpu/drm/armada/armada_drv.c drivers/gpu/drm/drm_irq.c +11 more+17 -320 replies
40/50drm: remove bus->get_irq implementationsdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_platform.c drivers/gpu/drm/drm_usb.c +1 more+0 -190 replies
41/50drm: inline drm_pci_set_uniquedrivers/gpu/drm/drm_ioctl.c drivers/gpu/drm/drm_pci.c include/drm/drmP.h+20 -90 replies
42/50drm: rip out dev->devnamedrivers/gpu/drm/drm_ioctl.c drivers/gpu/drm/drm_irq.c drivers/gpu/drm/drm_pci.c +4 more+1 -610 replies
43/50drm: remove drm_bus->get_namedrivers/gpu/drm/drm_info.c drivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_platform.c +2 more+2 -240 replies
44/50drm: Remove dev->kdriverdrivers/gpu/drm/drm_pci.c drivers/gpu/drm/drm_platform.c drivers/gpu/drm/drm_usb.c +1 more+0 -80 replies
45/50drm/<drivers>: don't set driver->dev_priv_size to 0drivers/gpu/drm/ast/ast_drv.c drivers/gpu/drm/qxl/qxl_drv.c drivers/gpu/drm/radeon/radeon_drv.c+0 -31 reply
46/50drm: store the gem vma offset manager in a typed pointerdrivers/gpu/drm/drm_gem.c drivers/gpu/drm/gma500/psb_intel_drv.h drivers/gpu/drm/msm/msm_drv.c +3 more+21 -316 replies
47/50drm: rip out dev->ioctl_count trackingdrivers/gpu/drm/drm_drv.c drivers/gpu/drm/drm_fops.c include/drm/drmP.h+1 -100 replies
48/50drm: Kill file_priv->ioctl_count trackingdrivers/gpu/drm/drm_drv.c drivers/gpu/drm/drm_fops.c drivers/gpu/drm/drm_info.c +1 more+3 -70 replies
49/50drm: remove dev->vma_countdrivers/gpu/drm/drm_fops.c drivers/gpu/drm/drm_info.c drivers/gpu/drm/drm_vm.c +1 more+7 -90 replies
50/50drm: use memdup_user() as a cleanupdrivers/gpu/drm/r128/r128_state.c+12 -340 replies

Reviews trailers per patch

17 of 50 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLaurent PinchartInki DaeSascha HauerDavid HerrmannPatrik JakobssonRob ClarkJakob BornecrantzThierry RedingDamien Lespiau
SeriesR-b
1/50A-b
2/50A-b
3/50A-b
4/50R-b
5/50R-b
6/50A-b
7/50
8/50R-b
9/50
10/50
11/50R-b
12/50
13/50R-b
14/50
15/50
16/50R-b
17/50R-b
18/50
19/50
20/50
21/50
22/50
23/50
24/50
25/50
26/50A-b
27/50
28/50
29/50R-b
30/50
31/50
32/50
33/50
34/50
35/50
36/50R-b
37/50R-b
38/50
39/50
40/50
41/50
42/50
43/50
44/50
45/50R-b
46/50A-b
47/50
48/50
49/50
50/50

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 9 reviewers.

Read the v1 thread

Cover letter [PATCH 00/50] more drm de-midlayering

Hi all,

This series almost removes drm_bus, the last thing remaining is the ->setversion callback. Unfortunately we can't kill that completely since we need the backwards compat cruft for pci domain bonghits on alpha/ppc.

I've also shot at a few easy marks on the road while at it.

My plan is to tackle the setversion mess in 3.15 with a Gross Hack. And then convert a few drivers to allocate struct drm_device themselves and so complete the demidlayering in the driver load paths. For simplicity that'd probably be udl or the arm drivers due to lack of legacy baggage. That should allow us to ditch drm_usb.c and drm_platform.c from the tree.

My real long-term goal is to eventually use devres.c and similar cool stuff to clean up the setup/teardown hell we have in i915.ko. Hence also why I've deprecated the legacy agp/ums support in i915 in the hope that I'll get to deal with less cruft. Also maybe we can sort out the lifetime issues around sysfs and debugfs at driver/module unload time eventually ... just let me dream ;-)

Also a cleanup from Dan on top. All the little fixes for Wu Fengguang reported are squashed in - he's now also doing some arm builds!

Dan Carpenter (1):
drm: use memdup_user() as a cleanup

Daniel Vetter (49):
drm/rcar: call drm_put_dev directly in the ->remove hook drm/exynos: call drm_put_dev directly from ->remove drm/imx: directly call drm_put_dev in ->remove drm/tilcdc: call drm_put_dev directly from ->remove drm/omap: call drm_put_dev directly in ->remove drm/shmob: call drm_put_dev directly from ->remove hook drm/armada: directly call drm_put_dev in ->remove drm/msm: call drm_put_dev directly in ->remove
drm: rip out drm_platform_exit
drm: restrict the device list for shadow attached drivers drm/bufs: remove handling of _DRM_GEM mappings
drm: kill DRIVER_REQUIRE_AGP
drm: ->agp_init can't fail
drm: rip out drm_core_has_AGP
drm: remove agp_init() bus callback
drm: inline drm_agp_destroy
drm: kill the ->agp_destroy callback
drm: remove global_mutex locking around agp_init
drm: rip out DRM_AGP_MEM and DRM_AGP_KERN
drm: Kill DRM_HZ
drm: Kill DRM_IRQ_ARGS
drm: Kill DRM_WAKUP and DRM_INIT_WAITQUEUE
drm: Kill DRM_COPY_(TO|FROM)_USER
drm: Kill DRM_*MEMORYBARRIER
drm: Kill DRM_SUSER
drm/gma500: Remove dead code
drm/irq: Replace DRM_WAIT_ON with wait_event
drm: Remove DRM_WAIT_ON from all drivers
drm/irq: simplify irq checks in drm_wait_vblank drm/pci: fold in irq_by_busid support
drm/irq: drm_control is a legacy ioctl, so pci devices only drm/irq: remove cargo-culted locking from irq_install/unistall
drm: remove drm_dev_to_irq from drivers
drm: kill drm_bus->bus_type
drm: Rip out totally bogus vga_switcheroo->can_switch locking
drm: rename dev->count_lock to dev->buf_lock
drm/irq: track the irq installed in drm_irq_install in dev->irq drm/irq: Look up the pci irq directly in the drm_control ioctl
drm: pass the irq explicitly to drm_irq_install
drm: remove bus->get_irq implementations
drm: inline drm_pci_set_unique
drm: rip out dev->devname
drm: remove drm_bus->get_name
drm: Remove dev->kdriver
drm/<drivers>: don't set driver->dev_priv_size to 0
drm: store the gem vma offset manager in a typed pointer
drm: rip out dev->ioctl_count tracking
drm: Kill file_priv->ioctl_count tracking
drm: remove dev->vma_count

 Documentation/DocBook/drm.tmpl           |  10 +--
 drivers/gpu/drm/armada/armada_drv.c      |   5 +-
 drivers/gpu/drm/ast/ast_drv.c            |   1 -
 drivers/gpu/drm/cirrus/cirrus_drv.h      |   2 +-
 drivers/gpu/drm/drm_agpsupport.c         |  28 ++-----
 drivers/gpu/drm/drm_buffer.c             |   2 +-
 drivers/gpu/drm/drm_bufs.c               |  42 +++++-----
 drivers/gpu/drm/drm_drv.c                |   4 -
 drivers/gpu/drm/drm_fops.c               |  11 +--
 drivers/gpu/drm/drm_gem.c                |  27 +++----
 drivers/gpu/drm/drm_info.c               |  22 +++---
 drivers/gpu/drm/drm_ioctl.c              |  13 +--
 drivers/gpu/drm/drm_irq.c                | 125 +++++++++++------------------
 drivers/gpu/drm/drm_memory.c             |  15 ++--
 drivers/gpu/drm/drm_pci.c                | 132 ++++++++++++++++---------------
 drivers/gpu/drm/drm_platform.c           |  37 ---------
 drivers/gpu/drm/drm_stub.c               |  25 +-----
 drivers/gpu/drm/drm_usb.c                |  15 ----
 drivers/gpu/drm/drm_vm.c                 |  10 +--
 drivers/gpu/drm/exynos/exynos_drm_drv.c  |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   2 +-
 drivers/gpu/drm/exynos/exynos_mixer.c    |   6 +-
 drivers/gpu/drm/gma500/accel_2d.c        |   2 +-
 drivers/gpu/drm/gma500/psb_drv.c         |   2 +-
 drivers/gpu/drm/gma500/psb_drv.h         |   8 +-
 drivers/gpu/drm/gma500/psb_intel_drv.h   |   5 --
 drivers/gpu/drm/gma500/psb_irq.c         |  19 +----
 drivers/gpu/drm/gma500/psb_irq.h         |   2 +-
 drivers/gpu/drm/i810/i810_dma.c          |   4 +
 drivers/gpu/drm/i810/i810_drv.c          |   2 +-
 drivers/gpu/drm/i915/i915_dma.c          |  31 ++++++--
 drivers/gpu/drm/i915/i915_drv.c          |  14 ++--
 drivers/gpu/drm/i915/i915_gem.c          |   7 +-
 drivers/gpu/drm/mga/mga_dma.c            |   4 +-
 drivers/gpu/drm/mga/mga_drv.h            |   4 +-
 drivers/gpu/drm/mga/mga_irq.c            |  18 +++--
 drivers/gpu/drm/mga/mga_state.c          |   4 +-
 drivers/gpu/drm/msm/msm_drv.c            |   8 +-
 drivers/gpu/drm/nouveau/nouveau_dma.c    |   2 +-
 drivers/gpu/drm/nouveau/nouveau_dma.h    |   2 +-
 drivers/gpu/drm/nouveau/nouveau_fence.c  |   2 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c    |   4 +-
 drivers/gpu/drm/nouveau/nouveau_vga.c    |   7 +-
 drivers/gpu/drm/omapdrm/omap_debugfs.c   |   2 +-
 drivers/gpu/drm/omapdrm/omap_drv.c       |   4 +-
 drivers/gpu/drm/omapdrm/omap_drv.h       |   2 +-
 drivers/gpu/drm/omapdrm/omap_irq.c       |   4 +-
 drivers/gpu/drm/qxl/qxl_drv.c            |   1 -
 drivers/gpu/drm/qxl/qxl_drv.h            |   2 +-
 drivers/gpu/drm/qxl/qxl_ioctl.c          |   4 +-
 drivers/gpu/drm/qxl/qxl_irq.c            |   4 +-
 drivers/gpu/drm/r128/r128_cce.c          |   4 +-
 drivers/gpu/drm/r128/r128_drv.h          |   4 +-
 drivers/gpu/drm/r128/r128_irq.c          |   2 +-
 drivers/gpu/drm/r128/r128_state.c        |  68 ++++++----------
 drivers/gpu/drm/radeon/r300_cmdbuf.c     |   8 +-
 drivers/gpu/drm/radeon/r600_cp.c         |   4 +-
 drivers/gpu/drm/radeon/r600_cs.c         |   2 +-
 drivers/gpu/drm/radeon/radeon_cp.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_cs.c       |  10 +--
 drivers/gpu/drm/radeon/radeon_device.c   |   7 +-
 drivers/gpu/drm/radeon/radeon_drv.c      |   3 +-
 drivers/gpu/drm/radeon/radeon_drv.h      |   2 +-
 drivers/gpu/drm/radeon/radeon_irq.c      |  19 +++--
 drivers/gpu/drm/radeon/radeon_irq_kms.c  |   6 +-
 drivers/gpu/drm/radeon/radeon_kms.c      |  10 +--
 drivers/gpu/drm/radeon/radeon_mem.c      |   2 +-
 drivers/gpu/drm/radeon/radeon_ring.c     |   2 +-
 drivers/gpu/drm/radeon/radeon_state.c    |  20 ++---
 drivers/gpu/drm/radeon/radeon_ttm.c      |   2 +-
 drivers/gpu/drm/rcar-du/rcar_du_drv.c    |   4 +-
 drivers/gpu/drm/savage/savage_bci.c      |  10 +--
 drivers/gpu/drm/savage/savage_state.c    |   8 +-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c |   6 +-
 drivers/gpu/drm/sis/sis_mm.c             |   2 +-
 drivers/gpu/drm/tegra/bus.c              |  12 ---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c      |   8 +-
 drivers/gpu/drm/ttm/ttm_bo_util.c        |   2 +-
 drivers/gpu/drm/via/via_dma.c            |  12 +--
 drivers/gpu/drm/via/via_dmablit.c        |  39 +++++----
 drivers/gpu/drm/via/via_drv.h            |   2 +-
 drivers/gpu/drm/via/via_irq.c            |  21 +++--
 drivers/gpu/drm/via/via_video.c          |  18 +++--
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c      |   2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h      |   2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_irq.c      |   2 +-
 drivers/staging/imx-drm/imx-drm-core.c   |   4 +-
 include/drm/drmP.h                       |  60 ++++----------
 include/drm/drm_agpsupport.h             |  33 ++------
 include/drm/drm_os_linux.h               |  61 --------------
 include/uapi/drm/drm.h                   |   1 -
 91 files changed, 485 insertions(+), 717 deletions(-)
Signature · 1 line
1.8.4.3