File Index
Files and directories
Sign in
FILE

i915_drv.h

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h C
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2023 Intel Corporation
 4 */
 5#ifndef _XE_I915_DRV_H_
 6#define _XE_I915_DRV_H_
 7
 8/*
 9 * "Adaptation header" to allow i915 display to also build for xe driver.
10 * TODO: refactor i915 and xe so this can cease to exist
11 */
12
13#include <drm/drm_drv.h>
14
15#include "xe_device_types.h"
16
17static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
18{
19	return container_of(dev, struct drm_i915_private, drm);
20}
21
22/* compat platform checks only for soc/ usage */
23#define IS_PLATFORM(xe, x) ((xe)->info.platform == x)
24#define IS_I915G(dev_priv)	(dev_priv && 0)
25#define IS_I915GM(dev_priv)	(dev_priv && 0)
26#define IS_PINEVIEW(dev_priv)	(dev_priv && 0)
27#define IS_VALLEYVIEW(dev_priv)	(dev_priv && 0)
28#define IS_CHERRYVIEW(dev_priv)	(dev_priv && 0)
29#define IS_HASWELL(dev_priv)	(dev_priv && 0)
30#define IS_BROADWELL(dev_priv)	(dev_priv && 0)
31#define IS_BROXTON(dev_priv)	(dev_priv && 0)
32#define IS_GEMINILAKE(dev_priv)	(dev_priv && 0)
33#define IS_DG2(dev_priv)	IS_PLATFORM(dev_priv, XE_DG2)
34
35#define IS_MOBILE(xe) (xe && 0)
36
37#endif
~/ Read-only file preview.