Skip to content

Commit

Permalink
Merge tag 'drm-xe-next-2025-02-24' of https://gitlab.freedesktop.org/…
Browse files Browse the repository at this point in the history
…drm/xe/kernel into drm-next

UAPI Changes:
 - Add mmap support for PCI memory barrier (Tejas, Matthew Auld)
 - Enable integration with perf pmu, exposing event counters: for now, just
   GT C6 residency (Vinay, Lucas)
 - Add "survivability mode" to allow putting the driver in a state capable of
   firmware upgrade on critical failures (Riana, Rodrigo)
 - Add PXP HWDRM support and enable for compatible platforms:
   Meteor Lake and Lunar Lake (Daniele, John Harrison)
 - Expose package and vram temperature over hwmon subsystem (Raag, Badal, Rodrigo)

Cross-subsystem Changes:
 - Backmege drm-next to synchronize with i915 display and other internal APIs

Display Changes (including i915):
 - Device probe re-order to help with flicker-free boot (Maarten)
 - Align watermark, hpd and dsm with i915 (Rodrigo)
 - Better abstraction for d3cold (Rodrigo)

Driver Changes:
 - Make sure changes to ccs_mode is with helper for gt sync reset (Maciej)
 - Drop mmio_ext abstraction since it didn't prove useful in its current form
   (Matt Roper)
 - Reject BO eviction if BO is bound to current VM (Oak, Thomas Hellström)
 - Add GuC Power Conservation debugfs (Rodrigo)
 - L3 cache topology updates for Xe3 (Francois, Matt Atwood)
 - Better logging about missing GuC logs (John Harrison)
 - Better logging for hwconfig-related data availability (John Harrison)
 - Tracepoint updates for xe_bo_create, xe_vm and xe_vma (Oak)
 - Add missing SPDX licenses (Francois)
 - Xe suballocator imporovements (Michal Wajdeczko)
 - Improve logging for native vs SR-IOV driver mode (Satyanarayana)
 - Make sure VF bootstrap is not attempted in execlist mode (Maarten)
 - Add GuC Buffer Cache abstraction for some CTB H2G actions and use
   during VF provisioning (Michal Wajdeczko)
 - Better synchronization in gtidle for new users (Vinay)
 - New workarounds for Panther Lake (Nirmoy, Vinay)
 - PCI ID updates for Panther Lake (Matt Atwood)
 - Enable SR-IOV for Panther Lake (Michal Wajdeczko)
 - Update MAINTAINERS to stop directing xe changes to drm-misc (Lucas)
 - New PCI IDs for Battle Mage (Shekhar)
 - Better pagefault logging (Francois)
 - SR-IOV fixes and refactors for past and new platforms (Michal Wajdeczko)
 - Platform descriptor refactors and updates (Sai Teja)
 - Add gt stats debugfs (Francois)
 - Add guc_log debugfs to dump to dmesg (Lucas)
 - Abstract per-platform LMTT availability (Piotr Piórkowski)
 - Refactor VRAM manager location (Piotr Piórkowski)
 - Add missing xe_pm_runtime_put when forcing wedged mode (Shuicheng)
 - Fix possible lockup when forcing wedged mode (Xin Wang)
 - Probe refactors to use cleanup actions with better error handling (Lucas)
 - XE_IOCTL_DBG clarification for userspace (Maarten)
 - Better xe_mmio initialization and abstraction (Ilia)
 - Drop unnecessary GT lookup (Matt Roper)
 - Skip client engine usage from fdinfo for VFs (Marcin Bernatowicz)
 - Allow to test xe_sync_entry_parse with error injection (Priyanka)
 - OA fix for polled read (Umesh)

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/m3gbuh32wgiep43i4zxbyhxqbenvtgvtao5sczivlasj7tikwv@dmlba4bfg2ny
  • Loading branch information
Dave Airlie committed Feb 27, 2025
2 parents 16893dd + b7b68c6 commit 33e26f3
Show file tree
Hide file tree
Showing 127 changed files with 5,153 additions and 676 deletions.
16 changes: 16 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,19 @@ Contact: intel-xe@lists.freedesktop.org
Description: RO. Package current voltage in millivolt.

Only supported for particular Intel Xe graphics platforms.

What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp2_input
Date: March 2025
KernelVersion: 6.14
Contact: intel-xe@lists.freedesktop.org
Description: RO. Package temperature in millidegree Celsius.

Only supported for particular Intel Xe graphics platforms.

What: /sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp3_input
Date: March 2025
KernelVersion: 6.14
Contact: intel-xe@lists.freedesktop.org
Description: RO. VRAM temperature in millidegree Celsius.

Only supported for particular Intel Xe graphics platforms.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7673,6 +7673,7 @@ X: drivers/gpu/drm/msm/
X: drivers/gpu/drm/nouveau/
X: drivers/gpu/drm/radeon/
X: drivers/gpu/drm/tegra/
X: drivers/gpu/drm/xe/

DRM DRIVERS FOR ALLWINNER A10
M: Maxime Ripard <mripard@kernel.org>
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ void intel_plane_disable_noatomic(struct intel_crtc *crtc,
if ((crtc_state->active_planes & ~BIT(PLANE_CURSOR)) == 0 &&
hsw_ips_disable(crtc_state)) {
crtc_state->ips_enabled = false;
intel_crtc_wait_for_next_vblank(crtc);
intel_plane_initial_vblank_wait(crtc);
}

/*
Expand All @@ -699,7 +699,7 @@ void intel_plane_disable_noatomic(struct intel_crtc *crtc,
*/
if (HAS_GMCH(dev_priv) &&
intel_set_memory_cxsr(dev_priv, false))
intel_crtc_wait_for_next_vblank(crtc);
intel_plane_initial_vblank_wait(crtc);

/*
* Gen2 reports pipe underruns whenever all planes are disabled.
Expand All @@ -709,7 +709,7 @@ void intel_plane_disable_noatomic(struct intel_crtc *crtc,
intel_set_cpu_fifo_underrun_reporting(display, crtc->pipe, false);

intel_plane_disable_arm(NULL, plane, crtc_state);
intel_crtc_wait_for_next_vblank(crtc);
intel_plane_initial_vblank_wait(crtc);
}

unsigned int
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/i915/display/intel_display_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ void intel_display_driver_register(struct intel_display *display)

intel_display_device_info_print(DISPLAY_INFO(display),
DISPLAY_RUNTIME_INFO(display), &p);

intel_register_dsm_handler();
}

/* part #1: call before irq uninstall */
Expand Down Expand Up @@ -639,6 +641,8 @@ void intel_display_driver_unregister(struct intel_display *display)
if (!HAS_DISPLAY(display))
return;

intel_unregister_dsm_handler();

drm_client_dev_unregister(display->drm);

/*
Expand Down
7 changes: 6 additions & 1 deletion drivers/gpu/drm/i915/display/intel_plane_initial.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
#include "intel_frontbuffer.h"
#include "intel_plane_initial.h"

void intel_plane_initial_vblank_wait(struct intel_crtc *crtc)
{
intel_crtc_wait_for_next_vblank(crtc);
}

static bool
intel_reuse_initial_plane_obj(struct intel_crtc *this,
const struct intel_initial_plane_config plane_configs[],
Expand Down Expand Up @@ -442,7 +447,7 @@ void intel_initial_plane_config(struct intel_display *display)
intel_find_initial_plane_obj(crtc, plane_configs);

if (display->funcs.display->fixup_initial_plane_config(crtc, plane_config))
intel_crtc_wait_for_next_vblank(crtc);
intel_plane_initial_vblank_wait(crtc);

plane_config_fini(plane_config);
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/display/intel_plane_initial.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#ifndef __INTEL_PLANE_INITIAL_H__
#define __INTEL_PLANE_INITIAL_H__

struct intel_crtc;
struct intel_display;

void intel_initial_plane_config(struct intel_display *display);
void intel_plane_initial_vblank_wait(struct intel_crtc *crtc);

#endif
5 changes: 0 additions & 5 deletions drivers/gpu/drm/i915/i915_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <drm/drm_probe_helper.h>

#include "display/i9xx_display_sr.h"
#include "display/intel_acpi.h"
#include "display/intel_bw.h"
#include "display/intel_cdclk.h"
#include "display/intel_crtc.h"
Expand Down Expand Up @@ -657,8 +656,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
intel_power_domains_enable(display);
intel_runtime_pm_enable(&dev_priv->runtime_pm);

intel_register_dsm_handler();

if (i915_switcheroo_register(dev_priv))
drm_err(&dev_priv->drm, "Failed to register vga switcheroo!\n");
}
Expand All @@ -675,8 +672,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)

i915_switcheroo_unregister(dev_priv);

intel_unregister_dsm_handler();

intel_runtime_pm_disable(&dev_priv->runtime_pm);
intel_power_domains_disable(display);

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/xe/Kconfig.profile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
config DRM_XE_JOB_TIMEOUT_MAX
int "Default max job timeout (ms)"
default 10000 # milliseconds
Expand Down
19 changes: 13 additions & 6 deletions drivers/gpu/drm/xe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ xe-y += xe_bb.o \
xe_dma_buf.o \
xe_drm_client.o \
xe_exec.o \
xe_execlist.o \
xe_exec_queue.o \
xe_execlist.o \
xe_force_wake.o \
xe_ggtt.o \
xe_gpu_scheduler.o \
Expand All @@ -56,6 +56,7 @@ xe-y += xe_bb.o \
xe_gt_topology.o \
xe_guc.o \
xe_guc_ads.o \
xe_guc_buf.o \
xe_guc_capture.o \
xe_guc_ct.o \
xe_guc_db_mgr.o \
Expand All @@ -66,11 +67,11 @@ xe-y += xe_bb.o \
xe_guc_pc.o \
xe_guc_submit.o \
xe_heci_gsc.o \
xe_huc.o \
xe_hw_engine.o \
xe_hw_engine_class_sysfs.o \
xe_hw_engine_group.o \
xe_hw_fence.o \
xe_huc.o \
xe_irq.o \
xe_lrc.o \
xe_migrate.o \
Expand All @@ -86,24 +87,28 @@ xe-y += xe_bb.o \
xe_preempt_fence.o \
xe_pt.o \
xe_pt_walk.o \
xe_pxp.o \
xe_pxp_debugfs.o \
xe_pxp_submit.o \
xe_query.o \
xe_range_fence.o \
xe_reg_sr.o \
xe_reg_whitelist.o \
xe_rtp.o \
xe_ring_ops.o \
xe_rtp.o \
xe_sa.o \
xe_sched_job.o \
xe_step.o \
xe_survivability_mode.o \
xe_sync.o \
xe_tile.o \
xe_tile_sysfs.o \
xe_trace.o \
xe_trace_bo.o \
xe_trace_guc.o \
xe_trace_lrc.o \
xe_ttm_sys_mgr.o \
xe_ttm_stolen_mgr.o \
xe_ttm_sys_mgr.o \
xe_ttm_vram_mgr.o \
xe_tuning.o \
xe_uc.o \
Expand All @@ -112,15 +117,17 @@ xe-y += xe_bb.o \
xe_vram.o \
xe_vram_freq.o \
xe_vsec.o \
xe_wait_user_fence.o \
xe_wa.o \
xe_wait_user_fence.o \
xe_wopcm.o

xe-$(CONFIG_HMM_MIRROR) += xe_hmm.o

# graphics hardware monitoring (HWMON) support
xe-$(CONFIG_HWMON) += xe_hwmon.o

xe-$(CONFIG_PERF_EVENTS) += xe_pmu.o

# graphics virtualization (SR-IOV) support
xe-y += \
xe_gt_sriov_vf.o \
Expand Down Expand Up @@ -222,6 +229,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
i915-display/intel_display_wa.o \
i915-display/intel_dkl_phy.o \
i915-display/intel_dmc.o \
i915-display/intel_dmc_wl.o \
i915-display/intel_dp.o \
i915-display/intel_dp_aux.o \
i915-display/intel_dp_aux_backlight.o \
Expand Down Expand Up @@ -270,7 +278,6 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
i915-display/intel_vdsc.o \
i915-display/intel_vga.o \
i915-display/intel_vrr.o \
i915-display/intel_dmc_wl.o \
i915-display/intel_wm.o \
i915-display/skl_scaler.o \
i915-display/skl_universal_plane.o \
Expand Down
41 changes: 41 additions & 0 deletions drivers/gpu/drm/xe/abi/gsc_pxp_commands_abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
#ifndef _ABI_GSC_PXP_COMMANDS_ABI_H
#define _ABI_GSC_PXP_COMMANDS_ABI_H

#include <linux/sizes.h>
#include <linux/types.h>

/* Heci client ID for PXP commands */
#define HECI_MEADDRESS_PXP 17

#define PXP_APIVER(x, y) (((x) & 0xFFFF) << 16 | ((y) & 0xFFFF))

/*
* A PXP sub-section in an HECI packet can be up to 64K big in each direction.
* This does not include the top-level GSC header.
*/
#define PXP_MAX_PACKET_SIZE SZ_64K

/*
* there are a lot of status codes for PXP, but we only define the cross-API
* common ones that we actually can handle in the kernel driver. Other failure
Expand All @@ -24,6 +31,7 @@ enum pxp_status {
PXP_STATUS_NOT_READY = 0x100e,
PXP_STATUS_PLATFCONFIG_KF1_NOVERIF = 0x101a,
PXP_STATUS_PLATFCONFIG_KF1_BAD = 0x101f,
PXP_STATUS_PLATFCONFIG_FIXED_KF1_NOT_SUPPORTED = 0x1037,
PXP_STATUS_OP_NOT_PERMITTED = 0x4013
};

Expand All @@ -42,6 +50,8 @@ struct pxp_cmd_header {
u32 buffer_len;
} __packed;

#define PXP43_CMDID_INVALIDATE_STREAM_KEY 0x00000007
#define PXP43_CMDID_INIT_SESSION 0x00000036
#define PXP43_CMDID_NEW_HUC_AUTH 0x0000003F /* MTL+ */

/* PXP-Input-Packet: HUC Auth-only */
Expand All @@ -56,4 +66,35 @@ struct pxp43_huc_auth_out {
struct pxp_cmd_header header;
} __packed;

/* PXP-Input-Packet: Init PXP session */
struct pxp43_create_arb_in {
struct pxp_cmd_header header;
/* header.stream_id fields for vesion 4.3 of Init PXP session: */
#define PXP43_INIT_SESSION_VALID BIT(0)
#define PXP43_INIT_SESSION_APPTYPE BIT(1)
#define PXP43_INIT_SESSION_APPID GENMASK(17, 2)
u32 protection_mode;
#define PXP43_INIT_SESSION_PROTECTION_ARB 0x2
u32 sub_session_id;
u32 init_flags;
u32 rsvd[12];
} __packed;

/* PXP-Input-Packet: Init PXP session */
struct pxp43_create_arb_out {
struct pxp_cmd_header header;
u32 rsvd[8];
} __packed;

/* PXP-Input-Packet: Invalidate Stream Key */
struct pxp43_inv_stream_key_in {
struct pxp_cmd_header header;
u32 rsvd[3];
} __packed;

/* PXP-Output-Packet: Invalidate Stream Key */
struct pxp43_inv_stream_key_out {
struct pxp_cmd_header header;
u32 rsvd;
} __packed;
#endif
5 changes: 5 additions & 0 deletions drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_stolen.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2024 Intel Corporation
*/

#ifndef _I915_GEM_STOLEN_H_
#define _I915_GEM_STOLEN_H_

Expand Down
16 changes: 13 additions & 3 deletions drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,24 @@
#include <linux/errno.h>
#include <linux/types.h>

#include "xe_pxp.h"

struct drm_gem_object;
struct intel_pxp;
struct xe_pxp;

static inline int intel_pxp_key_check(struct intel_pxp *pxp,
static inline int intel_pxp_key_check(struct xe_pxp *pxp,
struct drm_gem_object *obj,
bool assign)
{
return -ENODEV;
/*
* The assign variable is used in i915 to assign the key to the BO at
* first submission time. In Xe the key is instead assigned at BO
* creation time, so the assign variable must always be false.
*/
if (assign)
return -EINVAL;

return xe_pxp_obj_key_check(pxp, obj);
}

#endif
2 changes: 1 addition & 1 deletion drivers/gpu/drm/xe/display/intel_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bool intel_bo_is_shmem(struct drm_gem_object *obj)

bool intel_bo_is_protected(struct drm_gem_object *obj)
{
return false;
return xe_bo_is_protected(gem_to_xe_bo(obj));
}

void intel_bo_flush_if_display(struct drm_gem_object *obj)
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/xe/display/intel_fb_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ int intel_fb_bo_framebuffer_init(struct drm_framebuffer *fb,
/*
* XE_BO_FLAG_SCANOUT should ideally be set at creation, or is
* automatically set when creating FB. We cannot change caching
* mode when the boect is VM_BINDed, so we can only set
* mode when the bo is VM_BINDed, so we can only set
* coherency with display when unbound.
*/
if (XE_IOCTL_DBG(xe, !list_empty(&bo->ttm.base.gpuva.list))) {
if (XE_IOCTL_DBG(xe, xe_bo_is_vm_bound(bo))) {
ttm_bo_unreserve(&bo->ttm);
ret = -EINVAL;
goto err;
Expand Down
Loading

0 comments on commit 33e26f3

Please sign in to comment.