Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [RFC PATCH v2 0/3] Split code between common and platform specific
@ 2023-03-14 15:51 Francois Dugast
  2023-03-14 15:51 ` [Intel-xe] [RFC PATCH v2 1/3] drm/xe: Introduce function pointers in xe_gt.c with local structure Francois Dugast
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Francois Dugast @ 2023-03-14 15:51 UTC (permalink / raw)
  To: intel-xe

This patch series explores a code split between common code and
platform specific code. The minimal hardware abstraction layer is
implemented with a structure of function pointers, similarly to what
is done in accel/habanalabs and in drm/amd/amdgpu.

The objective is to ease the addition of new platforms by limiting
the need to modify the common code and centralizing specific code in
separate functions, potentially in their own file.

v2:
  - Remove platform files and leave platform specific code along common
    code to ease the use of helpers
  - Break down global function pointer structure into smaller
    structures defined and initialized locally per area / compilation unit
    in order to limit exposure of inner details
  - Refactor functions in xe_guc_pc.c to provide more examples
  - Add fake new platform to show impact on code

Francois Dugast (3):
  drm/xe: Introduce function pointers in xe_gt.c with local structure
  drm/xe: Introduce function pointers in xe_guc_pc.c with local
    structure
  drm/xe: Add platform specific functions for a new platform

 drivers/gpu/drm/xe/Makefile            |  1 +
 drivers/gpu/drm/xe/xe_device_types.h   |  2 ++
 drivers/gpu/drm/xe/xe_gt.c             | 50 ++++++++++++++++++--------
 drivers/gpu/drm/xe/xe_guc_pc.c         | 48 ++++++++++++++++++++-----
 drivers/gpu/drm/xe/xe_newplatform.c    | 21 +++++++++++
 drivers/gpu/drm/xe/xe_newplatform.h    | 15 ++++++++
 drivers/gpu/drm/xe/xe_platform_types.h |  1 +
 7 files changed, 115 insertions(+), 23 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_newplatform.c
 create mode 100644 drivers/gpu/drm/xe/xe_newplatform.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-15  9:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14 15:51 [Intel-xe] [RFC PATCH v2 0/3] Split code between common and platform specific Francois Dugast
2023-03-14 15:51 ` [Intel-xe] [RFC PATCH v2 1/3] drm/xe: Introduce function pointers in xe_gt.c with local structure Francois Dugast
2023-03-15  9:52   ` Jani Nikula
2023-03-14 15:51 ` [Intel-xe] [RFC PATCH v2 2/3] drm/xe: Introduce function pointers in xe_guc_pc.c " Francois Dugast
2023-03-14 15:51 ` [Intel-xe] [RFC PATCH v2 3/3] drm/xe: Add platform specific functions for a new platform Francois Dugast
2023-03-14 20:58 ` [Intel-xe] ✓ CI.Patch_applied: success for Split code between common and platform specific (rev2) Patchwork
2023-03-14 20:59 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-03-14 21:03 ` [Intel-xe] ✓ CI.Build: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox