#include "xe_pci.h"
#include <kunit/static_stub.h>
#include <linux/device/driver.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/pm_runtime.h>
#include <drm/drm_color_mgmt.h>
#include <drm/drm_drv.h>
#include <drm/intel/xe_pciids.h>
#include "display/xe_display.h"
#include "regs/xe_gt_regs.h"
#include "xe_device.h"
#include "xe_drv.h"
#include "xe_gt.h"
#include "xe_gt_sriov_vf.h"
#include "xe_guc.h"
#include "xe_macros.h"
#include "xe_mmio.h"
#include "xe_module.h"
#include "xe_pci_sriov.h"
#include "xe_pci_types.h"
#include "xe_pm.h"
#include "xe_sriov.h"
#include "xe_step.h"
#include "xe_tile.h"
enum toggle_d3cold { … };
struct xe_subplatform_desc { … };
struct xe_device_desc { … };
__diag_push();
__diag_ignore_all("-Woverride-init", "Allow field overrides in table");
#define PLATFORM …
#define NOP(x) …
static const struct xe_graphics_desc graphics_xelp = …;
static const struct xe_graphics_desc graphics_xelpp = …;
#define XE_HP_FEATURES …
static const struct xe_graphics_desc graphics_xehpg = …;
static const struct xe_graphics_desc graphics_xehpc = …;
static const struct xe_graphics_desc graphics_xelpg = …;
#define XE2_GFX_FEATURES …
static const struct xe_graphics_desc graphics_xe2 = …;
static const struct xe_media_desc media_xem = …;
static const struct xe_media_desc media_xehpm = …;
static const struct xe_media_desc media_xelpmp = …;
static const struct xe_media_desc media_xe2 = …;
static const struct xe_device_desc tgl_desc = …;
static const struct xe_device_desc rkl_desc = …;
static const u16 adls_rpls_ids[] = …;
static const struct xe_device_desc adl_s_desc = …;
static const u16 adlp_rplu_ids[] = …;
static const struct xe_device_desc adl_p_desc = …;
static const struct xe_device_desc adl_n_desc = …;
#define DGFX_FEATURES …
static const struct xe_device_desc dg1_desc = …;
static const u16 dg2_g10_ids[] = …;
static const u16 dg2_g11_ids[] = …;
static const u16 dg2_g12_ids[] = …;
#define DG2_FEATURES …
static const struct xe_device_desc ats_m_desc = …;
static const struct xe_device_desc dg2_desc = …;
static const __maybe_unused struct xe_device_desc pvc_desc = …;
static const struct xe_device_desc mtl_desc = …;
static const struct xe_device_desc lnl_desc = …;
static const struct xe_device_desc bmg_desc = …;
#undef PLATFORM
__diag_pop();
static const struct gmdid_map graphics_ip_map[] = …;
static const struct gmdid_map media_ip_map[] = …;
#define INTEL_VGA_DEVICE …
static const struct pci_device_id pciidlist[] = …;
MODULE_DEVICE_TABLE(pci, pciidlist);
#undef INTEL_VGA_DEVICE
static bool device_id_in_list(u16 device_id, const char *devices, bool negative)
{ … }
static bool id_forced(u16 device_id)
{ … }
static bool id_blocked(u16 device_id)
{ … }
static const struct xe_subplatform_desc *
find_subplatform(const struct xe_device *xe, const struct xe_device_desc *desc)
{ … }
enum xe_gmdid_type { … };
static void read_gmdid(struct xe_device *xe, enum xe_gmdid_type type, u32 *ver, u32 *revid)
{ … }
static void handle_pre_gmdid(struct xe_device *xe,
const struct xe_graphics_desc *graphics,
const struct xe_media_desc *media)
{ … }
static void handle_gmdid(struct xe_device *xe,
const struct xe_graphics_desc **graphics,
const struct xe_media_desc **media,
u32 *graphics_revid,
u32 *media_revid)
{ … }
static int xe_info_init_early(struct xe_device *xe,
const struct xe_device_desc *desc,
const struct xe_subplatform_desc *subplatform_desc)
{ … }
static int xe_info_init(struct xe_device *xe,
const struct xe_graphics_desc *graphics_desc,
const struct xe_media_desc *media_desc)
{ … }
static void xe_pci_remove(struct pci_dev *pdev)
{ … }
static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static void xe_pci_shutdown(struct pci_dev *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static void d3cold_toggle(struct pci_dev *pdev, enum toggle_d3cold toggle)
{ … }
static int xe_pci_suspend(struct device *dev)
{ … }
static int xe_pci_resume(struct device *dev)
{ … }
static int xe_pci_runtime_suspend(struct device *dev)
{ … }
static int xe_pci_runtime_resume(struct device *dev)
{ … }
static int xe_pci_runtime_idle(struct device *dev)
{ … }
static const struct dev_pm_ops xe_pm_ops = …;
#endif
static struct pci_driver xe_pci_driver = …;
int xe_register_pci_driver(void)
{ … }
void xe_unregister_pci_driver(void)
{ … }
#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
#include "tests/xe_pci.c"
#endif