Skip to content

Commit 9235c21

Browse files
committed
Merge tag 'drm-intel-fixes-2023-05-11-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix to taint kernel when force_probe is used - Null deref and div-by-zero fixes for display - GuC error capture fix for Xe devices Signed-off-by: Dave Airlie <airlied@redhat.com> From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ZFzdYV3O8lvVJ1DQ@jlahtine-mobl.ger.corp.intel.com
2 parents dc49c3b + 79c901c commit 9235c21

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

drivers/gpu/drm/i915/Kconfig

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ config DRM_I915_FORCE_PROBE
6262
This is the default value for the i915.force_probe module
6363
parameter. Using the module parameter overrides this option.
6464

65-
Force probe the i915 for Intel graphics devices that are
66-
recognized but not properly supported by this kernel version. It is
67-
recommended to upgrade to a kernel version with proper support as soon
68-
as it is available.
65+
Force probe the i915 driver for Intel graphics devices that are
66+
recognized but not properly supported by this kernel version. Force
67+
probing an unsupported device taints the kernel. It is recommended to
68+
upgrade to a kernel version with proper support as soon as it is
69+
available.
6970

7071
It can also be used to block the probe of recognized and fully
7172
supported devices.
@@ -75,7 +76,8 @@ config DRM_I915_FORCE_PROBE
7576
Use "<pci-id>[,<pci-id>,...]" to force probe the i915 for listed
7677
devices. For example, "4500" or "4500,4571".
7778

78-
Use "*" to force probe the driver for all known devices.
79+
Use "*" to force probe the driver for all known devices. Not
80+
recommended.
7981

8082
Use "!" right before the ID to block the probe of the device. For
8183
example, "4500,!4571" forces the probe of 4500 and blocks the probe of

drivers/gpu/drm/i915/display/intel_atomic_plane.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
10281028
int ret;
10291029

10301030
if (old_obj) {
1031-
const struct intel_crtc_state *crtc_state =
1031+
const struct intel_crtc_state *new_crtc_state =
10321032
intel_atomic_get_new_crtc_state(state,
10331033
to_intel_crtc(old_plane_state->hw.crtc));
10341034

@@ -1043,7 +1043,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
10431043
* This should only fail upon a hung GPU, in which case we
10441044
* can safely continue.
10451045
*/
1046-
if (intel_crtc_needs_modeset(crtc_state)) {
1046+
if (new_crtc_state && intel_crtc_needs_modeset(new_crtc_state)) {
10471047
ret = i915_sw_fence_await_reservation(&state->commit_ready,
10481048
old_obj->base.resv,
10491049
false, 0,

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,11 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
16011601
pipe_config->dsc.slice_count =
16021602
drm_dp_dsc_sink_max_slice_count(intel_dp->dsc_dpcd,
16031603
true);
1604+
if (!pipe_config->dsc.slice_count) {
1605+
drm_dbg_kms(&dev_priv->drm, "Unsupported Slice Count %d\n",
1606+
pipe_config->dsc.slice_count);
1607+
return -EINVAL;
1608+
}
16041609
} else {
16051610
u16 dsc_max_output_bpp = 0;
16061611
u8 dsc_dp_slice_count;

drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@
3131
{ FORCEWAKE_MT, 0, 0, "FORCEWAKE" }
3232

3333
#define COMMON_GEN9BASE_GLOBAL \
34-
{ GEN8_FAULT_TLB_DATA0, 0, 0, "GEN8_FAULT_TLB_DATA0" }, \
35-
{ GEN8_FAULT_TLB_DATA1, 0, 0, "GEN8_FAULT_TLB_DATA1" }, \
3634
{ ERROR_GEN6, 0, 0, "ERROR_GEN6" }, \
3735
{ DONE_REG, 0, 0, "DONE_REG" }, \
3836
{ HSW_GTT_CACHE_EN, 0, 0, "HSW_GTT_CACHE_EN" }
3937

38+
#define GEN9_GLOBAL \
39+
{ GEN8_FAULT_TLB_DATA0, 0, 0, "GEN8_FAULT_TLB_DATA0" }, \
40+
{ GEN8_FAULT_TLB_DATA1, 0, 0, "GEN8_FAULT_TLB_DATA1" }
41+
4042
#define COMMON_GEN12BASE_GLOBAL \
4143
{ GEN12_FAULT_TLB_DATA0, 0, 0, "GEN12_FAULT_TLB_DATA0" }, \
4244
{ GEN12_FAULT_TLB_DATA1, 0, 0, "GEN12_FAULT_TLB_DATA1" }, \
@@ -142,6 +144,7 @@ static const struct __guc_mmio_reg_descr xe_lpd_gsc_inst_regs[] = {
142144
static const struct __guc_mmio_reg_descr default_global_regs[] = {
143145
COMMON_BASE_GLOBAL,
144146
COMMON_GEN9BASE_GLOBAL,
147+
GEN9_GLOBAL,
145148
};
146149

147150
static const struct __guc_mmio_reg_descr default_rc_class_regs[] = {

drivers/gpu/drm/i915/i915_pci.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,12 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
13441344
return -ENODEV;
13451345
}
13461346

1347+
if (intel_info->require_force_probe) {
1348+
dev_info(&pdev->dev, "Force probing unsupported Device ID %04x, tainting kernel\n",
1349+
pdev->device);
1350+
add_taint(TAINT_USER, LOCKDEP_STILL_OK);
1351+
}
1352+
13471353
/* Only bind to function 0 of the device. Early generations
13481354
* used function 1 as a placeholder for multi-head. This causes
13491355
* us confusion instead, especially on the systems where both

0 commit comments

Comments
 (0)