Skip to content

Commit d6cf886

Browse files
committed
Merge tag 'drm-intel-fixes-2023-01-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Reject display plane with height == 0 (Drew) - re-disable RC6p on Sandy Bridge (Sasa) - Fix hugepages' selftest (Chris) - DG2 hw workarounds (Matt Atwood) Signed-off-by: Dave Airlie <[email protected]> From: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/Y8mf3/[email protected]
2 parents fc70e13 + afdecb2 commit d6cf886

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
16271627
u32 offset;
16281628
int ret;
16291629

1630-
if (w > max_width || w < min_width || h > max_height) {
1630+
if (w > max_width || w < min_width || h > max_height || h < 1) {
16311631
drm_dbg_kms(&dev_priv->drm,
16321632
"requested Y/RGB source size %dx%d outside limits (min: %dx1 max: %dx%d)\n",
16331633
w, h, min_width, max_width, max_height);

drivers/gpu/drm/i915/gem/selftests/huge_pages.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ static int igt_shrink_thp(void *arg)
18471847
I915_SHRINK_ACTIVE);
18481848
i915_vma_unpin(vma);
18491849
if (err)
1850-
goto out_put;
1850+
goto out_wf;
18511851

18521852
/*
18531853
* Now that the pages are *unpinned* shrinking should invoke
@@ -1863,19 +1863,19 @@ static int igt_shrink_thp(void *arg)
18631863
pr_err("unexpected pages mismatch, should_swap=%s\n",
18641864
str_yes_no(should_swap));
18651865
err = -EINVAL;
1866-
goto out_put;
1866+
goto out_wf;
18671867
}
18681868

18691869
if (should_swap == (obj->mm.page_sizes.sg || obj->mm.page_sizes.phys)) {
18701870
pr_err("unexpected residual page-size bits, should_swap=%s\n",
18711871
str_yes_no(should_swap));
18721872
err = -EINVAL;
1873-
goto out_put;
1873+
goto out_wf;
18741874
}
18751875

18761876
err = i915_vma_pin(vma, 0, 0, flags);
18771877
if (err)
1878-
goto out_put;
1878+
goto out_wf;
18791879

18801880
while (n--) {
18811881
err = cpu_check(obj, n, 0xdeadbeaf);

drivers/gpu/drm/i915/gt/intel_gt_regs.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,10 @@
429429
#define RC_OP_FLUSH_ENABLE (1 << 0)
430430
#define HIZ_RAW_STALL_OPT_DISABLE (1 << 2)
431431
#define CACHE_MODE_1 _MMIO(0x7004) /* IVB+ */
432-
#define PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1 << 6)
433-
#define GEN8_4x4_STC_OPTIMIZATION_DISABLE (1 << 6)
434-
#define GEN9_PARTIAL_RESOLVE_IN_VC_DISABLE (1 << 1)
432+
#define MSAA_OPTIMIZATION_REDUC_DISABLE REG_BIT(11)
433+
#define PIXEL_SUBSPAN_COLLECT_OPT_DISABLE REG_BIT(6)
434+
#define GEN8_4x4_STC_OPTIMIZATION_DISABLE REG_BIT(6)
435+
#define GEN9_PARTIAL_RESOLVE_IN_VC_DISABLE REG_BIT(1)
435436

436437
#define GEN7_GT_MODE _MMIO(0x7008)
437438
#define GEN9_IZ_HASHING_MASK(slice) (0x3 << ((slice) * 2))
@@ -457,6 +458,9 @@
457458
#define GEN8_L3CNTLREG _MMIO(0x7034)
458459
#define GEN8_ERRDETBCTRL (1 << 9)
459460

461+
#define PSS_MODE2 _MMIO(0x703c)
462+
#define SCOREBOARD_STALL_FLUSH_CONTROL REG_BIT(5)
463+
460464
#define GEN7_SC_INSTDONE _MMIO(0x7100)
461465
#define GEN12_SC_INSTDONE_EXTRA _MMIO(0x7104)
462466
#define GEN12_SC_INSTDONE_EXTRA2 _MMIO(0x7108)

drivers/gpu/drm/i915/gt/intel_workarounds.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,11 +771,19 @@ static void dg2_ctx_workarounds_init(struct intel_engine_cs *engine,
771771

772772
/* Wa_14014947963:dg2 */
773773
if (IS_DG2_GRAPHICS_STEP(engine->i915, G10, STEP_B0, STEP_FOREVER) ||
774-
IS_DG2_G11(engine->i915) || IS_DG2_G12(engine->i915))
774+
IS_DG2_G11(engine->i915) || IS_DG2_G12(engine->i915))
775775
wa_masked_field_set(wal, VF_PREEMPTION, PREEMPTION_VERTEX_COUNT, 0x4000);
776776

777+
/* Wa_18018764978:dg2 */
778+
if (IS_DG2_GRAPHICS_STEP(engine->i915, G10, STEP_C0, STEP_FOREVER) ||
779+
IS_DG2_G11(engine->i915) || IS_DG2_G12(engine->i915))
780+
wa_masked_en(wal, PSS_MODE2, SCOREBOARD_STALL_FLUSH_CONTROL);
781+
777782
/* Wa_15010599737:dg2 */
778783
wa_mcr_masked_en(wal, CHICKEN_RASTER_1, DIS_SF_ROUND_NEAREST_EVEN);
784+
785+
/* Wa_18019271663:dg2 */
786+
wa_masked_en(wal, CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE);
779787
}
780788

781789
static void fakewa_disable_nestedbb_mode(struct intel_engine_cs *engine,

drivers/gpu/drm/i915/i915_pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ static const struct intel_device_info ilk_m_info = {
423423
.has_coherent_ggtt = true, \
424424
.has_llc = 1, \
425425
.has_rc6 = 1, \
426-
.has_rc6p = 1, \
426+
/* snb does support rc6p, but enabling it causes various issues */ \
427+
.has_rc6p = 0, \
427428
.has_rps = true, \
428429
.dma_mask_size = 40, \
429430
.__runtime.ppgtt_type = INTEL_PPGTT_ALIASING, \

0 commit comments

Comments
 (0)