JustOS/linux-6.13/drivers/gpu/drm/i915/display/intel_display_conversion.h
justuser 02e73b8cd9 up
2025-01-24 17:00:19 +03:00

23 lines
719 B
C

/* SPDX-License-Identifier: MIT */
/* Copyright © 2024 Intel Corporation */
/*
* This header is for transitional struct intel_display conversion helpers only.
*/
#ifndef __INTEL_DISPLAY_CONVERSION__
#define __INTEL_DISPLAY_CONVERSION__
/*
* Transitional macro to optionally convert struct drm_i915_private * to struct
* intel_display *, also accepting the latter.
*/
#define __to_intel_display(p) \
_Generic(p, \
const struct drm_i915_private *: (&((const struct drm_i915_private *)(p))->display), \
struct drm_i915_private *: (&((struct drm_i915_private *)(p))->display), \
const struct intel_display *: (p), \
struct intel_display *: (p))
#endif /* __INTEL_DISPLAY_CONVERSION__ */