[PATCH 0/3] Embed drm_device and eliminate use of dev_private (v2)

Luben Tuikov luben.tuikov at amd.com
Wed Aug 19 05:00:39 UTC 2020


As per the comments in include/drm/drm_device.h, struct
drm_device::dev_private seems to be obsolete and it's
recommended that drivers embed struct drm_device into their
larger per-device structure.

This patchset embeds struct drm_device into struct
amdgpu_device, adds inline functions to access both
structures from one another, adds a DRM driver release
callback to free the container struct amdgpu_device, and
eliminates using struct drm_device::dev_private.

v2: Split out patch 2/2 into two patches.

Luben Tuikov (3):
  drm/amdgpu: drm_device to amdgpu_device by inline-f (v2)
  drm/amdgpu: Get DRM dev from adev by inline-f
  drm/amdgpu: Embed drm_device into amdgpu_device (v2)

 drivers/gpu/drm/amd/amdgpu/amdgpu.h           |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c    |   8 +-
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c  |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c   |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 186 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    |  61 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |  42 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  53 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_encoders.c  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        |  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c       |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c   |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c       |  14 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c        |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c       |  20 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |  36 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c    |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c      |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c     |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c     |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c      |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c  |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c      |   6 +-
 drivers/gpu/drm/amd/amdgpu/atombios_crtc.c    |  22 +-
 drivers/gpu/drm/amd/amdgpu/atombios_dp.c      |   6 +-
 .../gpu/drm/amd/amdgpu/atombios_encoders.c    |  36 +--
 drivers/gpu/drm/amd/amdgpu/atombios_i2c.c     |   2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c        |  94 +++---
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c        |  96 +++---
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c         | 104 +++----
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c         |  94 +++---
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c      |  40 +--
 drivers/gpu/drm/amd/amdgpu/df_v3_6.c          |   2 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 145 +++++----
 .../amd/display/amdgpu_dm/amdgpu_dm_color.c   |   3 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c |   2 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c |   8 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c |   4 +-
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   |   8 +-
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c           |   6 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 274 +++++++++---------
 54 files changed, 774 insertions(+), 768 deletions(-)

-- 
2.28.0.215.g878e727637



More information about the amd-gfx mailing list