drm/i915/display: add display platforms structure with platform members
[linux.git] / drivers / gpu / drm / i915 / display / intel_display_device.h
index eab7d9b1b4870c2b00683952c08d54e8d59e9557..17db88ba97f50eb16e1c6caecb2d560c27f6b184 100644 (file)
@@ -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); \
This page took 0.033226 seconds and 4 git commands to generate.