@@ -31,6 +31,7 @@ struct stepping_desc {
.step_info.size = ARRAY_SIZE(_map)
struct subplatform_desc {
+ struct intel_display_platforms platforms;
enum intel_display_platform subplatform;
const char *name;
const u16 *pciidlist;
@@ -38,10 +39,12 @@ struct subplatform_desc {
};
#define SUBPLATFORM(_platform, _subplatform) \
+ .platforms._platform##_##_subplatform = 1, \
.subplatform = (INTEL_DISPLAY_##_platform##_##_subplatform), \
.name = #_subplatform
struct platform_desc {
+ struct intel_display_platforms platforms;
enum intel_display_platform platform;
const char *name;
const struct subplatform_desc *subplatforms;
@@ -50,6 +53,7 @@ struct platform_desc {
};
#define PLATFORM(_platform) \
+ .platforms._platform = 1, \
.platform = (INTEL_DISPLAY_##_platform), \
.name = #_platform
@@ -6,6 +6,7 @@
#ifndef __INTEL_DISPLAY_DEVICE_H__
#define __INTEL_DISPLAY_DEVICE_H__
+#include <linux/bitops.h>
#include <linux/types.h>
#include "intel_display_conversion.h"
@@ -106,6 +107,24 @@ enum intel_display_platform {
#undef __ENUM
+#define __MEMBER(name) unsigned long name:1;
+#define __COUNT(x) 1 +
+
+#define __NUM_PLATFORMS (INTEL_DISPLAY_PLATFORMS(__COUNT) 0)
+
+struct intel_display_platforms {
+ union {
+ struct {
+ INTEL_DISPLAY_PLATFORMS(__MEMBER);
+ };
+ DECLARE_BITMAP(bitmap, __NUM_PLATFORMS);
+ };
+};
+
+#undef __MEMBER
+#undef __COUNT
+#undef __NUM_PLATFORMS
+
#define DEV_INFO_DISPLAY_FOR_EACH_FLAG(func) \
/* Keep in alphabetical order */ \
func(cursor_needs_physical); \