This patch series refactors amdgpu.h by moving several structures and their
associated helpers into dedicated or existing header files. This improves
code organization and makes the structure easier to parse.

Notes:

Patches 0002 and 0003:
Functions amdgpu_device_wb_get()/free(), amdgpu_device_set_uid()/get_uid() are 
still defined
in amdgpu_device.c rather than being moved into new amdgpu_wb.c/amdgpu_uid.c 
files. I wasn't
sure if I was supposed to move them or not.

Patch 07:
I created a new amdgpu_acpi.h file rather than moving the definitions into the 
existing
amd_acpi.h, since there are amdgpu specific functions that group naturally into 
this file.

Patch 08:
I moved struct amdgpu_clock into the existing amdgpu_mode.h. I'm not sure if 
this is the right call.

Patch 09:
I moved struct amdgpu_allowed_register_entry into the existing 
amdgpu_reg_access.h.
I'm not entirely sure this is the right place either.

Patch 11:
I wasn't sure whether to create separate headers for every small struct that 
amdgpu_device.h
depends on. Since these structs are only used in amdgpu_device.c, I left them 
in amdgpu_device.h.

Shahyan Soltani (11):
  drm/amdgpu: move struct amdgpu_sa from amdgpu.h into its own header
    file
  drm/amdgpu: move struct amdgpu_wb and helpers into separate header
    file
  drm/amdgpu: move struct amdgpu_uid and helpers into header file
  drm/amdgpu: move struct amdgpu_video_codecs and helpers into header
    file
  drm/amdgpu: move struct amdgpu_mqd and helpers into header file
  drm/amdgpu: move struct amdgpu_init_level and helpers into header file
  drm/amdgpu: move amdgpu_acpi helpers into new header
  drm/amdgpu: move struct amdgpu_clock into amdgpu_mode.h
  drm/amdgpu: move amdgpu_allowed_register_entry into
    amdgpu_reg_access.h
  drm/amdgpu: move amdgpu_asic helpers into new header
  drm/amdgpu: move struct amdgpu_device and helpers into new header

 drivers/gpu/drm/amd/amdgpu/amdgpu.h           | 973 +-----------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.h      | 151 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_asic.h      | 160 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.h    | 586 +++++++++++
 .../gpu/drm/amd/amdgpu/amdgpu_init_level.h    |  51 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h      |  14 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_mqd.h       |  75 ++
 .../gpu/drm/amd/amdgpu/amdgpu_reg_access.h    |   8 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_sa.h        |  61 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_uid.h       |  50 +
 .../gpu/drm/amd/amdgpu/amdgpu_video_codecs.h  |  47 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_wb.h        | 100 ++
 12 files changed, 1315 insertions(+), 961 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_asic.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_device.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_init_level.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_mqd.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_sa.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_uid.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_video_codecs.h
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_wb.h

-- 
2.54.0

Reply via email to