Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
#ifndef _XE_I915_DRV_H_
|
|
#define _XE_I915_DRV_H_
|
|
|
|
/*
|
|
* "Adaptation header" to allow i915 display to also build for xe driver.
|
|
* TODO: refactor i915 and xe so this can cease to exist
|
|
*/
|
|
|
|
#include <drm/drm_drv.h>
|
|
|
|
#include "xe_device_types.h"
|
|
|
|
static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
|
|
{
|
|
return container_of(dev, struct drm_i915_private, drm);
|
|
}
|
|
|
|
/* compat platform checks only for soc/ usage */
|
|
#define IS_PLATFORM(xe, x) ((xe)->info.platform == x)
|
|
#define IS_I915G(dev_priv) (dev_priv && 0)
|
|
#define IS_I915GM(dev_priv) (dev_priv && 0)
|
|
#define IS_PINEVIEW(dev_priv) (dev_priv && 0)
|
|
#define IS_VALLEYVIEW(dev_priv) (dev_priv && 0)
|
|
#define IS_CHERRYVIEW(dev_priv) (dev_priv && 0)
|
|
#define IS_HASWELL(dev_priv) (dev_priv && 0)
|
|
#define IS_BROADWELL(dev_priv) (dev_priv && 0)
|
|
#define IS_BROXTON(dev_priv) (dev_priv && 0)
|
|
#define IS_GEMINILAKE(dev_priv) (dev_priv && 0)
|
|
#define IS_DG2(dev_priv) IS_PLATFORM(dev_priv, XE_DG2)
|
|
|
|
#define IS_MOBILE(xe) (xe && 0)
|
|
|
|
#endif
|