1 /* SPDX-License-Identifier: MIT */
2 /* Copyright © 2024 Intel Corporation */
5 * This header is for transitional struct intel_display conversion helpers only.
8 #ifndef __INTEL_DISPLAY_CONVERSION__
9 #define __INTEL_DISPLAY_CONVERSION__
12 struct drm_i915_private;
15 struct intel_display *__i915_to_display(struct drm_i915_private *i915);
16 struct intel_display *__drm_to_display(struct drm_device *drm);
18 * Transitional macro to optionally convert struct drm_i915_private * to struct
19 * intel_display *, also accepting the latter.
21 #define __to_intel_display(p) \
23 const struct drm_i915_private *: __i915_to_display((struct drm_i915_private *)(p)), \
24 struct drm_i915_private *: __i915_to_display((struct drm_i915_private *)(p)), \
25 const struct intel_display *: (p), \
26 struct intel_display *: (p))
28 #endif /* __INTEL_DISPLAY_CONVERSION__ */