Skip to content

Commit

Permalink
drm/xe: switch to common PCI ID macros
Browse files Browse the repository at this point in the history
Switch to the shared PCI ID macros in drm/intel/pciids.h. Remove
xe_pciids.h.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/84e08172184bdc6409cf6dd13f6c52971c647dbb.1729590029.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
Jani Nikula committed Oct 29, 2024
1 parent f719c2a commit 4934544
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 263 deletions.
51 changes: 22 additions & 29 deletions drivers/gpu/drm/xe/xe_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <drm/drm_color_mgmt.h>
#include <drm/drm_drv.h>
#include <drm/intel/xe_pciids.h>
#include <drm/intel/pciids.h>

#include "display/xe_display.h"
#include "regs/xe_gt_regs.h"
Expand Down Expand Up @@ -233,7 +233,7 @@ static const struct xe_device_desc rkl_desc = {
.require_force_probe = true,
};

static const u16 adls_rpls_ids[] = { XE_RPLS_IDS(NOP), 0 };
static const u16 adls_rpls_ids[] = { INTEL_RPLS_IDS(NOP), 0 };

static const struct xe_device_desc adl_s_desc = {
.graphics = &graphics_xelp,
Expand All @@ -248,7 +248,7 @@ static const struct xe_device_desc adl_s_desc = {
},
};

static const u16 adlp_rplu_ids[] = { XE_RPLU_IDS(NOP), 0 };
static const u16 adlp_rplu_ids[] = { INTEL_RPLU_IDS(NOP), 0 };

static const struct xe_device_desc adl_p_desc = {
.graphics = &graphics_xelp,
Expand Down Expand Up @@ -285,9 +285,9 @@ static const struct xe_device_desc dg1_desc = {
.require_force_probe = true,
};

static const u16 dg2_g10_ids[] = { XE_DG2_G10_IDS(NOP), XE_ATS_M150_IDS(NOP), 0 };
static const u16 dg2_g11_ids[] = { XE_DG2_G11_IDS(NOP), XE_ATS_M75_IDS(NOP), 0 };
static const u16 dg2_g12_ids[] = { XE_DG2_G12_IDS(NOP), 0 };
static const u16 dg2_g10_ids[] = { INTEL_DG2_G10_IDS(NOP), INTEL_ATS_M150_IDS(NOP), 0 };
static const u16 dg2_g11_ids[] = { INTEL_DG2_G11_IDS(NOP), INTEL_ATS_M75_IDS(NOP), 0 };
static const u16 dg2_g12_ids[] = { INTEL_DG2_G12_IDS(NOP), 0 };

#define DG2_FEATURES \
DGFX_FEATURES, \
Expand Down Expand Up @@ -374,40 +374,33 @@ static const struct gmdid_map media_ip_map[] = {
{ 3000, &media_xe2 },
};

#define INTEL_VGA_DEVICE(id, info) { \
PCI_DEVICE(PCI_VENDOR_ID_INTEL, id), \
PCI_BASE_CLASS_DISPLAY << 16, 0xff << 16, \
(unsigned long) info }

/*
* Make sure any device matches here are from most specific to most
* general. For example, since the Quanta match is based on the subsystem
* and subvendor IDs, we need it to come before the more general IVB
* PCI ID matches, otherwise we'll use the wrong info struct above.
*/
static const struct pci_device_id pciidlist[] = {
XE_TGL_IDS(INTEL_VGA_DEVICE, &tgl_desc),
XE_RKL_IDS(INTEL_VGA_DEVICE, &rkl_desc),
XE_ADLS_IDS(INTEL_VGA_DEVICE, &adl_s_desc),
XE_ADLP_IDS(INTEL_VGA_DEVICE, &adl_p_desc),
XE_ADLN_IDS(INTEL_VGA_DEVICE, &adl_n_desc),
XE_RPLU_IDS(INTEL_VGA_DEVICE, &adl_p_desc),
XE_RPLP_IDS(INTEL_VGA_DEVICE, &adl_p_desc),
XE_RPLS_IDS(INTEL_VGA_DEVICE, &adl_s_desc),
XE_DG1_IDS(INTEL_VGA_DEVICE, &dg1_desc),
XE_ATS_M_IDS(INTEL_VGA_DEVICE, &ats_m_desc),
XE_ARL_IDS(INTEL_VGA_DEVICE, &mtl_desc),
XE_DG2_IDS(INTEL_VGA_DEVICE, &dg2_desc),
XE_MTL_IDS(INTEL_VGA_DEVICE, &mtl_desc),
XE_LNL_IDS(INTEL_VGA_DEVICE, &lnl_desc),
XE_BMG_IDS(INTEL_VGA_DEVICE, &bmg_desc),
XE_PTL_IDS(INTEL_VGA_DEVICE, &ptl_desc),
INTEL_TGL_IDS(INTEL_VGA_DEVICE, &tgl_desc),
INTEL_RKL_IDS(INTEL_VGA_DEVICE, &rkl_desc),
INTEL_ADLS_IDS(INTEL_VGA_DEVICE, &adl_s_desc),
INTEL_ADLP_IDS(INTEL_VGA_DEVICE, &adl_p_desc),
INTEL_ADLN_IDS(INTEL_VGA_DEVICE, &adl_n_desc),
INTEL_RPLU_IDS(INTEL_VGA_DEVICE, &adl_p_desc),
INTEL_RPLP_IDS(INTEL_VGA_DEVICE, &adl_p_desc),
INTEL_RPLS_IDS(INTEL_VGA_DEVICE, &adl_s_desc),
INTEL_DG1_IDS(INTEL_VGA_DEVICE, &dg1_desc),
INTEL_ATS_M_IDS(INTEL_VGA_DEVICE, &ats_m_desc),
INTEL_ARL_IDS(INTEL_VGA_DEVICE, &mtl_desc),
INTEL_DG2_IDS(INTEL_VGA_DEVICE, &dg2_desc),
INTEL_MTL_IDS(INTEL_VGA_DEVICE, &mtl_desc),
INTEL_LNL_IDS(INTEL_VGA_DEVICE, &lnl_desc),
INTEL_BMG_IDS(INTEL_VGA_DEVICE, &bmg_desc),
INTEL_PTL_IDS(INTEL_VGA_DEVICE, &ptl_desc),
{ }
};
MODULE_DEVICE_TABLE(pci, pciidlist);

#undef INTEL_VGA_DEVICE

/* is device_id present in comma separated list of ids */
static bool device_id_in_list(u16 device_id, const char *devices, bool negative)
{
Expand Down
234 changes: 0 additions & 234 deletions include/drm/intel/xe_pciids.h

This file was deleted.

0 comments on commit 4934544

Please sign in to comment.