summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2023-04-07 02:56:21 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:31:40 +0300
commit21cc8aadddf9feca921389beafaad40224f8d219 (patch)
treedc35a98e32efde37f2ede201ec9941a444b0c85b
parent3713ed52ef2bc9272afdd195fe24b011a4dcd44d (diff)
downloadlinux-21cc8aadddf9feca921389beafaad40224f8d219.tar.xz
drm/xe: Clean up xe_device_desc
Now that most of the characteristics of a device are associated with the graphics and media IPs, the remaining contents of xe_device_desc can be cleaned up a bit: * 'gt' is unused; drop it * DEV_INFO_FOR_EACH_FLAG only covers two flags and is only used in this one file; drop the unnecessary macro complexity * Convert .has_4tile to a single bitfield bit so that it can be packed with the other feature flags * Move 'platform' lower in the structure for better packing Cc: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20230406235621.1914492-10-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_pci.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 7dab489cb5e8..2524ee1c73e3 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -24,11 +24,6 @@
#include "xe_pm.h"
#include "xe_step.h"
-#define DEV_INFO_FOR_EACH_FLAG(func) \
- func(require_force_probe); \
- func(is_dgfx); \
- /* Keep has_* in alphabetical order */ \
-
struct xe_subplatform_desc {
enum xe_subplatform subplatform;
const char *name;
@@ -46,23 +41,20 @@ struct xe_device_desc {
const struct xe_graphics_desc *graphics;
const struct xe_media_desc *media;
- enum xe_platform platform;
const char *platform_name;
const struct xe_subplatform_desc *subplatforms;
const struct xe_gt_desc *extra_gts;
- u8 gt; /* GT number, 0 if undefined */
-
-#define DEFINE_FLAG(name) u8 name:1
- DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
-#undef DEFINE_FLAG
+ enum xe_platform platform;
+ u8 require_force_probe:1;
+ u8 is_dgfx:1;
/*
* FIXME: Xe doesn't care about presence/lack of 4tile since we can
* already determine that from the graphics IP version. This flag
* should eventually move entirely into the display code's own logic.
*/
- bool has_4tile;
+ u8 has_4tile:1;
};
#define PLATFORM(x) \