Skip to content

DRM: Remove gem_init_object() and friends

David Herrmann dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/ast: remove unused driver_private accessdrivers/gpu/drm/ast/ast_ttm.c+0 -10 replies
2/7drm/mgag200: remove unused driver_private accessdrivers/gpu/drm/mgag200/mgag200_ttm.c+0 -10 replies
3/7drm/cirrus: remove unused driver_private accessdrivers/gpu/drm/cirrus/cirrus_ttm.c+0 -10 replies
4/7drm/qxl: remove unused object_pin/unpin() helpersdrivers/gpu/drm/qxl/qxl_drv.h drivers/gpu/drm/qxl/qxl_gem.c drivers/gpu/drm/qxl/qxl_object.c+0 -300 replies
5/7drm/radeon: remove stale gem->driver_private accessdrivers/gpu/drm/radeon/radeon_object.c drivers/gpu/drm/radeon/radeon_prime.c+0 -21 reply
6/7drm/nouveau: embed gem object in nouveau_bodrivers/gpu/drm/nouveau/nouveau_abi16.c drivers/gpu/drm/nouveau/nouveau_bo.c drivers/gpu/drm/nouveau/nouveau_bo.h +5 more+37 -345 replies
7/7drm: kill ->gem_init_object() and friendsdrivers/gpu/drm/ast/ast_drv.c drivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_main.c +31 more+0 -1240 replies

Reviews trailers per patch

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

PatchAlex DeucherDaniel VetterMaarten LankhorstBen Skeggs
SeriesR-b
1/7
2/7
3/7
4/7
5/7R-b
6/7A-b R-b
7/7

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

Read the v1 thread

Cover letter [PATCH 0/7] DRM: Remove gem_init_object() and friends

Hi

This series removes any access to gem_obj->driver_private from all drivers and then drops drm_gem_object_alloc() with its ->gem_init_object() driver callback.

All this is only needed if a gem object is not embedded into the driver's bo. However, all drivers (except for nouveau, see patch #6) embed the objects. No need to allow dynamic allocations, anymore.

Patches #1 to #5 are trivial and only remove dead code. Patch #6 converts nouveau to embed gem objects into nouveau_bo. I tested this on my nv50 and it runs fine. Patch #7 drops gem_init_object() from all drivers as it is unused and the callbacks are all empty (or BUG()).

And the diff-stat looks pretty nice, too.

Cheers
David

David Herrmann (7):
drm/ast: remove unused driver_private access drm/mgag200: remove unused driver_private access drm/cirrus: remove unused driver_private access drm/qxl: remove unused object_pin/unpin() helpers drm/radeon: remove stale gem->driver_private access drm/nouveau: embed gem object in nouveau_bo
drm: kill ->gem_init_object() and friends

 drivers/gpu/drm/ast/ast_drv.c             |  1 -
 drivers/gpu/drm/ast/ast_drv.h             |  1 -
 drivers/gpu/drm/ast/ast_main.c            |  6 -----
 drivers/gpu/drm/ast/ast_ttm.c             |  1 -
 drivers/gpu/drm/cirrus/cirrus_drv.c       |  1 -
 drivers/gpu/drm/cirrus/cirrus_drv.h       |  1 -
 drivers/gpu/drm/cirrus/cirrus_main.c      |  6 -----
 drivers/gpu/drm/cirrus/cirrus_ttm.c       |  1 -
 drivers/gpu/drm/drm_gem.c                 | 29 ---------------------
 drivers/gpu/drm/exynos/exynos_drm_drv.c   |  1 -
 drivers/gpu/drm/exynos/exynos_drm_gem.c   |  5 ----
 drivers/gpu/drm/exynos/exynos_drm_gem.h   |  3 ---
 drivers/gpu/drm/gma500/gem.c              |  5 ----
 drivers/gpu/drm/gma500/psb_drv.c          |  1 -
 drivers/gpu/drm/gma500/psb_drv.h          |  1 -
 drivers/gpu/drm/i915/i915_drv.c           |  1 -
 drivers/gpu/drm/i915/i915_drv.h           |  1 -
 drivers/gpu/drm/i915/i915_gem.c           |  7 ------
 drivers/gpu/drm/mgag200/mgag200_drv.c     |  1 -
 drivers/gpu/drm/mgag200/mgag200_drv.h     |  1 -
 drivers/gpu/drm/mgag200/mgag200_main.c    |  6 -----
 drivers/gpu/drm/mgag200/mgag200_ttm.c     |  1 -
 drivers/gpu/drm/nouveau/nouveau_abi16.c   |  4 +--
 drivers/gpu/drm/nouveau/nouveau_bo.c      |  2 +-
 drivers/gpu/drm/nouveau/nouveau_bo.h      |  5 +++-
 drivers/gpu/drm/nouveau/nouveau_display.c | 10 ++++----
 drivers/gpu/drm/nouveau/nouveau_drm.c     |  1 -
 drivers/gpu/drm/nouveau/nouveau_fbcon.c   |  2 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c     | 42 +++++++++++++------------------
 drivers/gpu/drm/nouveau/nouveau_gem.h     |  3 +--
 drivers/gpu/drm/nouveau/nouveau_prime.c   | 10 +++++---
 drivers/gpu/drm/omapdrm/omap_drv.c        |  1 -
 drivers/gpu/drm/omapdrm/omap_drv.h        |  1 -
 drivers/gpu/drm/omapdrm/omap_gem.c        |  5 ----
 drivers/gpu/drm/qxl/qxl_drv.c             |  1 -
 drivers/gpu/drm/qxl/qxl_drv.h             |  4 ---
 drivers/gpu/drm/qxl/qxl_gem.c             | 32 -----------------------
 drivers/gpu/drm/qxl/qxl_object.c          |  1 -
 drivers/gpu/drm/radeon/radeon_drv.c       |  2 --
 drivers/gpu/drm/radeon/radeon_gem.c       |  7 ------
 drivers/gpu/drm/radeon/radeon_object.c    |  1 -
 drivers/gpu/drm/radeon/radeon_prime.c     |  1 -
 drivers/gpu/drm/udl/udl_drv.c             |  1 -
 drivers/gpu/drm/udl/udl_drv.h             |  1 -
 drivers/gpu/drm/udl/udl_gem.c             |  7 ------
 include/drm/drmP.h                        |  5 ----
 46 files changed, 37 insertions(+), 193 deletions(-)
Signature · 1 line
1.8.3.4