Linux Audio

Check our new training course

Linux kernel drivers training

May 6-19, 2025
Register
Loading...
Note: File does not exist in v3.1.
 1/* SPDX-License-Identifier: MIT */
 2/* Copyright © 2024 Intel Corporation */
 3
 4/*
 5 * This header is for transitional struct intel_display conversion helpers only.
 6 */
 7
 8#ifndef __INTEL_DISPLAY_CONVERSION__
 9#define __INTEL_DISPLAY_CONVERSION__
10
11/*
12 * Transitional macro to optionally convert struct drm_i915_private * to struct
13 * intel_display *, also accepting the latter.
14 */
15#define __to_intel_display(p)						\
16	_Generic(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))
21
22#endif /* __INTEL_DISPLAY_CONVERSION__ */