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 * Transitional macro to optionally convert struct drm_i915_private * to struct
13 * intel_display *, also accepting the latter.
15 #define __to_intel_display(p) \
17 const struct drm_i915_private *: (&((const struct drm_i915_private *)(p))->display), \
18 struct drm_i915_private *: (&((struct drm_i915_private *)(p))->display), \
19 const struct intel_display *: (p), \
20 struct intel_display *: (p))
22 #endif /* __INTEL_DISPLAY_CONVERSION__ */