From: Mark Brown <broonie@kernel.org>
To: Dave Airlie <airlied@redhat.com>, DRI <dri-devel@lists.freedesktop.org>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linux Next Mailing List" <linux-next@vger.kernel.org>,
"Matt Roper" <matthew.d.roper@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: linux-next: manual merge of the drm tree with the origin tree
Date: Mon, 20 Jul 2026 15:44:23 +0100 [thread overview]
Message-ID: <al40RyVlEn28V5dQ@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 11895 bytes --]
Hi all,
Today's linux-next merge of the drm tree got a conflict in:
drivers/gpu/drm/xe/xe_pci.c
between commit:
130910bac905a ("drm/xe/pf: Disable display in admin only PF mode")
from the origin tree and commit:
b623bd790db04 ("drm/xe: Drop 'force_execlist' module parameter")
from the drm tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/gpu/drm/xe/xe_pci.c
index 9cd873708136c,91af603e94315..0000000000000
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@@ -26,6 -26,7 +26,7 @@@
#include "xe_guc.h"
#include "xe_mmio.h"
#include "xe_module.h"
+ #include "xe_pci_error.h"
#include "xe_pci_rebar.h"
#include "xe_pci_sriov.h"
#include "xe_pci_types.h"
@@@ -355,6 -356,7 +356,7 @@@ static const __maybe_unused struct xe_d
PLATFORM(PVC),
.dma_mask_size = 52,
.has_display = false,
+ .has_drm_ras = true,
.has_gsc_nvm = 1,
.has_heci_gscfi = 1,
.max_gt_per_tile = 1,
@@@ -457,6 -459,7 +459,7 @@@ static const struct xe_device_desc cri_
PLATFORM(CRESCENTISLAND),
.dma_mask_size = 52,
.has_display = false,
+ .has_drm_ras = true,
.has_flat_ccs = false,
.has_gsc_nvm = 1,
.has_i2c = true,
@@@ -599,8 -602,6 +602,6 @@@ static int read_gmdid(struct xe_device
struct xe_reg gmdid_reg = GMD_ID;
u32 val;
- KUNIT_STATIC_STUB_REDIRECT(read_gmdid, xe, type, ver, revid);
-
if (IS_SRIOV_VF(xe)) {
/*
* To get the value of the GMDID register, VFs must obtain it
@@@ -726,14 -727,30 +727,30 @@@ static int handle_gmdid(struct xe_devic
return 0;
}
- static void init_devid(struct xe_device *xe)
+ struct xe_probed_info {
+ u16 devid;
+ u8 revid;
+ u8 tile_count;
+ struct xe_step_info step;
+ const struct xe_ip *graphics_ip;
+ const struct xe_ip *media_ip;
+ };
+
+ /*
+ * Probe from the hardware the info required by xe_info_init_early().
+ */
+ static int xe_probe_info_early(struct xe_device *xe,
+ const struct xe_device_desc *desc,
+ struct xe_probed_info *probed_info)
{
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
- KUNIT_STATIC_STUB_REDIRECT(init_devid, xe);
+ probed_info->devid = pdev->device;
+ probed_info->revid = pdev->revision;
- xe->info.devid = pdev->device;
- xe->info.revid = pdev->revision;
+ xe_step_platform_get(desc->platform, probed_info->revid, &probed_info->step);
+
+ return 0;
}
/*
@@@ -742,17 -759,20 +759,20 @@@
*/
static int xe_info_init_early(struct xe_device *xe,
const struct xe_device_desc *desc,
- const struct xe_subplatform_desc *subplatform_desc)
+ const struct xe_subplatform_desc *subplatform_desc,
+ struct xe_probed_info *probed_info)
{
int err;
+ xe->info.devid = probed_info->devid;
+ xe->info.revid = probed_info->revid;
+ xe->info.step.platform = probed_info->step.platform;
+
xe->info.platform_name = desc->platform_name;
xe->info.platform = desc->platform;
xe->info.subplatform = subplatform_desc ?
subplatform_desc->subplatform : XE_SUBPLATFORM_NONE;
- init_devid(xe);
-
xe->info.dma_mask_size = desc->dma_mask_size;
xe->info.va_bits = desc->va_bits;
xe->info.vm_max_level = desc->vm_max_level;
@@@ -760,6 -780,7 +780,7 @@@
xe->info.is_dgfx = desc->is_dgfx;
xe->info.has_cached_pt = desc->has_cached_pt;
+ xe->info.has_drm_ras = desc->has_drm_ras;
xe->info.has_fan_control = desc->has_fan_control;
/* runtime fusing may force flat_ccs to disabled later */
xe->info.has_flat_ccs = desc->has_flat_ccs;
@@@ -788,16 -809,11 +809,11 @@@
xe->info.probe_display = IS_ENABLED(CONFIG_DRM_XE_DISPLAY) &&
xe_modparam.probe_display &&
- desc->has_display &&
- !xe_device_is_admin_only(xe);
- xe->info.force_execlist = xe_modparam.force_execlist;
+ desc->has_display;
xe_assert(xe, desc->max_gt_per_tile > 0);
xe_assert(xe, desc->max_gt_per_tile <= XE_MAX_GT_PER_TILE);
xe->info.max_gt_per_tile = desc->max_gt_per_tile;
- xe->info.tile_count = 1 + desc->max_remote_tiles;
-
- xe_step_platform_get(xe);
err = xe_tile_init_early(xe_device_get_root_tile(xe), xe, 0);
if (err)
@@@ -806,22 -822,21 +822,21 @@@
return 0;
}
- /*
- * Possibly override number of tile based on configuration register.
- */
- static void xe_info_probe_tile_count(struct xe_device *xe)
+ static void xe_probe_tile_count(struct xe_device *xe,
+ const struct xe_device_desc *desc,
+ struct xe_probed_info *probed_info)
{
struct xe_mmio *mmio;
u8 tile_count;
u32 mtcfg;
- KUNIT_STATIC_STUB_REDIRECT(xe_info_probe_tile_count, xe);
+ probed_info->tile_count = 1 + desc->max_remote_tiles;
/*
* Probe for tile count only for platforms that support multiple
* tiles.
*/
- if (xe->info.tile_count == 1)
+ if (probed_info->tile_count == 1)
return;
mmio = xe_root_tile_mmio(xe);
@@@ -834,10 -849,10 +849,10 @@@
mtcfg = xe_mmio_read32(mmio, XEHP_MTCFG_ADDR);
tile_count = REG_FIELD_GET(TILE_COUNT, mtcfg) + 1;
- if (tile_count < xe->info.tile_count) {
+ if (tile_count < probed_info->tile_count) {
drm_info(&xe->drm, "tile_count: %d, reduced_tile_count %d\n",
- xe->info.tile_count, tile_count);
- xe->info.tile_count = tile_count;
+ probed_info->tile_count, tile_count);
+ probed_info->tile_count = tile_count;
}
}
@@@ -910,25 -925,10 +925,10 @@@ static struct xe_gt *alloc_media_gt(str
return gt;
}
- /*
- * Initialize device info content that does require knowledge about
- * graphics / media IP version.
- * Make sure that GT / tile structures allocated by the driver match the data
- * present in device info.
- */
- static int xe_info_init(struct xe_device *xe,
- const struct xe_device_desc *desc)
+ static int xe_probe_ips(struct xe_device *xe,
+ const struct xe_device_desc *desc,
+ struct xe_probed_info *probed_info)
{
- u32 graphics_gmdid_revid = 0, media_gmdid_revid = 0;
- const struct xe_ip *graphics_ip;
- const struct xe_ip *media_ip;
- const struct xe_graphics_desc *graphics_desc;
- const struct xe_media_desc *media_desc;
- struct xe_tile *tile;
- struct xe_gt *gt;
- int ret;
- u8 id;
-
/*
* If this platform supports GMD_ID, we'll detect the proper IP
* descriptor to use from hardware registers.
@@@ -937,17 -937,21 +937,21 @@@
* versions are simply derived from that.
*/
if (desc->pre_gmdid_graphics_ip) {
- graphics_ip = desc->pre_gmdid_graphics_ip;
- media_ip = desc->pre_gmdid_media_ip;
- xe_step_pre_gmdid_get(xe);
+ probed_info->graphics_ip = desc->pre_gmdid_graphics_ip;
+ probed_info->media_ip = desc->pre_gmdid_media_ip;
+ xe_step_pre_gmdid_get(xe, &probed_info->step);
} else {
- xe_assert(xe, !desc->pre_gmdid_media_ip);
- ret = handle_gmdid(xe, &graphics_ip, &media_ip,
- &graphics_gmdid_revid, &media_gmdid_revid);
- if (ret)
- return ret;
+ int err;
+ u32 graphics_revid, media_revid;
- xe_step_gmdid_get(xe, graphics_gmdid_revid, media_gmdid_revid);
+ xe_assert(xe, !desc->pre_gmdid_media_ip);
+
+ err = handle_gmdid(xe, &probed_info->graphics_ip, &probed_info->media_ip,
+ &graphics_revid, &media_revid);
+ if (err)
+ return err;
+
+ xe_step_gmdid_get(xe, graphics_revid, media_revid, &probed_info->step);
}
/*
@@@ -955,9 -959,56 +959,56 @@@
* error and we should abort driver load. Failing to detect media
* IP is non-fatal; we'll just proceed without enabling media support.
*/
- if (!graphics_ip)
+ if (!probed_info->graphics_ip)
return -ENODEV;
+ return 0;
+ }
+
+ /*
+ * Probe from the hardware the info required by xe_info_init().
+ */
+ static int xe_probe_info(struct xe_device *xe,
+ const struct xe_device_desc *desc,
+ struct xe_probed_info *probed_info)
+ {
+ int err;
+
+ xe_probe_tile_count(xe, desc, probed_info);
+
+ err = xe_probe_ips(xe, desc, probed_info);
+ if (err)
+ return err;
+
+ return 0;
+ }
+
+ /*
+ * Initialize device info content that does require knowledge about
+ * graphics / media IP version.
+ * Make sure that GT / tile structures allocated by the driver match the data
+ * present in device info.
+ */
+ static int xe_info_init(struct xe_device *xe,
+ const struct xe_device_desc *desc,
+ struct xe_probed_info *probed_info)
+ {
+ const struct xe_ip *graphics_ip;
+ const struct xe_ip *media_ip;
+ const struct xe_graphics_desc *graphics_desc;
+ const struct xe_media_desc *media_desc;
+ struct xe_tile *tile;
+ struct xe_gt *gt;
+ u8 id;
+
+ graphics_ip = probed_info->graphics_ip;
+ media_ip = probed_info->media_ip;
+
+ xe->info.tile_count = probed_info->tile_count;
+ xe->info.step.basedie = probed_info->step.basedie;
+ xe->info.step.graphics = probed_info->step.graphics;
+ xe->info.step.media = probed_info->step.media;
+
xe->info.graphics_verx100 = graphics_ip->verx100;
xe->info.graphics_name = graphics_ip->name;
graphics_desc = graphics_ip->desc;
@@@ -989,8 -1040,6 +1040,6 @@@
xe->info.has_soc_remapper_telem = 0;
}
- xe_info_probe_tile_count(xe);
-
for_each_remote_tile(tile, xe, id) {
int err;
@@@ -1049,12 -1098,6 +1098,12 @@@ static void xe_pci_remove(struct pci_de
return;
xe_device_remove(xe);
+
+ /*
+ * Preserve remove-time flush after moving destroy work to module
+ * lifetime.
+ */
+ xe_destroy_wq_flush();
xe_pm_fini(xe);
}
@@@ -1079,9 -1122,11 +1128,11 @@@
*/
static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
+ struct xe_probed_info probed_info = {};
const struct xe_device_desc *desc = (const void *)ent->driver_data;
const struct xe_subplatform_desc *subplatform_desc;
struct xe_device *xe;
+ void *group;
int err;
subplatform_desc = find_subplatform(desc, pdev->device);
@@@ -1109,6 -1154,11 +1160,11 @@@
if (xe_display_driver_probe_defer(pdev))
return -EPROBE_DEFER;
+ /* Group all devres so xe_pci_error_slot_reset() can release them as a unit. */
+ group = devres_open_group(&pdev->dev, NULL, GFP_KERNEL);
+ if (!group)
+ return -ENOMEM;
+
err = pcim_enable_device(pdev);
if (err)
return err;
@@@ -1117,13 -1167,19 +1173,19 @@@
if (IS_ERR(xe))
return PTR_ERR(xe);
+ xe->devres_group = group;
+
pci_set_drvdata(pdev, &xe->drm);
xe_pm_assert_unbounded_bridge(xe);
pci_set_master(pdev);
- err = xe_info_init_early(xe, desc, subplatform_desc);
+ err = xe_probe_info_early(xe, desc, &probed_info);
+ if (err)
+ return err;
+
+ err = xe_info_init_early(xe, desc, subplatform_desc, &probed_info);
if (err)
return err;
@@@ -1142,7 -1198,11 +1204,11 @@@
if (err)
return err;
- err = xe_info_init(xe, desc);
+ err = xe_probe_info(xe, desc, &probed_info);
+ if (err)
+ return err;
+
+ err = xe_info_init(xe, desc, &probed_info);
if (err)
return err;
@@@ -1355,6 -1415,7 +1421,7 @@@ static struct pci_driver xe_pci_driver
.remove = xe_pci_remove,
.shutdown = xe_pci_shutdown,
.sriov_configure = xe_pci_sriov_configure,
+ .err_handler = &xe_pci_error_handlers,
#ifdef CONFIG_PM_SLEEP
.driver.pm = &xe_pm_ops,
#endif
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-07-20 14:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 14:44 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-20 14:44 linux-next: manual merge of the drm tree with the origin tree Mark Brown
2026-06-09 17:53 Mark Brown
2026-06-04 14:13 Mark Brown
2026-05-18 12:47 Mark Brown
2026-04-14 13:08 Mark Brown
2026-04-14 13:12 ` Miguel Ojeda
2026-03-30 15:49 Mark Brown
2026-03-27 20:56 Mark Brown
2026-03-23 15:55 Mark Brown
2026-03-23 15:55 Mark Brown
2026-03-23 15:49 Mark Brown
2026-03-23 15:01 Mark Brown
2026-02-08 22:47 Mark Brown
2026-02-08 22:46 Mark Brown
2026-02-02 14:29 Mark Brown
2026-01-19 17:03 Mark Brown
2026-01-19 16:53 Mark Brown
2025-10-02 12:07 Mark Brown
2025-10-02 12:05 Mark Brown
2025-10-02 12:30 ` Danilo Krummrich
2025-09-26 12:38 Mark Brown
2024-06-28 16:51 Mark Brown
2024-06-27 15:06 Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=al40RyVlEn28V5dQ@sirena.org.uk \
--to=broonie@kernel.org \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=satyanarayana.k.v.p@intel.com \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox