Skip to content

Commit 5666b61

Browse files
committed
Merge tag 'drm-intel-fixes-2022-02-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- GVT kerneldoc cleanup. (Randy Dunlap) - GVT Kconfig should depend on X86. (Siva Mullati) - Prevent out of range access in SWSCI display code. (Jani Nikula) - Fix mbus join and dbuf slice config lookup. (Ville Syrjälä) - Fix inverted priority selection in the TTM backend. (Matthew Auld) - Fix FBC plane end Y offset check. (Ville Syrjälä) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/Yg4lA6k8+xp8u3aB@tursulin-mobl2
2 parents babb1fc + 26ace87 commit 5666b61

6 files changed

Lines changed: 24 additions & 9 deletions

File tree

drivers/gpu/drm/i915/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ config DRM_I915_USERPTR
101101
config DRM_I915_GVT
102102
bool "Enable Intel GVT-g graphics virtualization host support"
103103
depends on DRM_I915
104+
depends on X86
104105
depends on 64BIT
105106
default n
106107
help

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,8 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
11151115

11161116
/* Wa_22010751166: icl, ehl, tgl, dg1, rkl */
11171117
if (DISPLAY_VER(i915) >= 11 &&
1118-
(plane_state->view.color_plane[0].y + drm_rect_height(&plane_state->uapi.src)) & 3) {
1118+
(plane_state->view.color_plane[0].y +
1119+
(drm_rect_height(&plane_state->uapi.src) >> 16)) & 3) {
11191120
plane_state->no_fbc_reason = "plane end Y offset misaligned";
11201121
return false;
11211122
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,21 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
360360
port++;
361361
}
362362

363+
/*
364+
* The port numbering and mapping here is bizarre. The now-obsolete
365+
* swsci spec supports ports numbered [0..4]. Port E is handled as a
366+
* special case, but port F and beyond are not. The functionality is
367+
* supposed to be obsolete for new platforms. Just bail out if the port
368+
* number is out of bounds after mapping.
369+
*/
370+
if (port > 4) {
371+
drm_dbg_kms(&dev_priv->drm,
372+
"[ENCODER:%d:%s] port %c (index %u) out of bounds for display power state notification\n",
373+
intel_encoder->base.base.id, intel_encoder->base.name,
374+
port_name(intel_encoder->port), port);
375+
return -EINVAL;
376+
}
377+
363378
if (!enable)
364379
parm |= 4 << 8;
365380

drivers/gpu/drm/i915/gem/i915_gem_ttm.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,9 @@ void i915_ttm_adjust_lru(struct drm_i915_gem_object *obj)
842842
} else if (obj->mm.madv != I915_MADV_WILLNEED) {
843843
bo->priority = I915_TTM_PRIO_PURGE;
844844
} else if (!i915_gem_object_has_pages(obj)) {
845-
if (bo->priority < I915_TTM_PRIO_HAS_PAGES)
846-
bo->priority = I915_TTM_PRIO_HAS_PAGES;
845+
bo->priority = I915_TTM_PRIO_NO_PAGES;
847846
} else {
848-
if (bo->priority > I915_TTM_PRIO_NO_PAGES)
849-
bo->priority = I915_TTM_PRIO_NO_PAGES;
847+
bo->priority = I915_TTM_PRIO_HAS_PAGES;
850848
}
851849

852850
ttm_bo_move_to_lru_tail(bo, bo->resource, NULL);

drivers/gpu/drm/i915/gvt/gtt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ static inline void ppgtt_generate_shadow_entry(struct intel_gvt_gtt_entry *se,
11481148
ops->set_pfn(se, s->shadow_page.mfn);
11491149
}
11501150

1151-
/**
1151+
/*
11521152
* Check if can do 2M page
11531153
* @vgpu: target vgpu
11541154
* @entry: target pfn's gtt entry
@@ -2193,7 +2193,7 @@ static int emulate_ggtt_mmio_read(struct intel_vgpu *vgpu,
21932193
}
21942194

21952195
/**
2196-
* intel_vgpu_emulate_gtt_mmio_read - emulate GTT MMIO register read
2196+
* intel_vgpu_emulate_ggtt_mmio_read - emulate GTT MMIO register read
21972197
* @vgpu: a vGPU
21982198
* @off: register offset
21992199
* @p_data: data will be returned to guest

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4853,7 +4853,7 @@ static bool check_mbus_joined(u8 active_pipes,
48534853
{
48544854
int i;
48554855

4856-
for (i = 0; i < dbuf_slices[i].active_pipes; i++) {
4856+
for (i = 0; dbuf_slices[i].active_pipes != 0; i++) {
48574857
if (dbuf_slices[i].active_pipes == active_pipes)
48584858
return dbuf_slices[i].join_mbus;
48594859
}
@@ -4870,7 +4870,7 @@ static u8 compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus,
48704870
{
48714871
int i;
48724872

4873-
for (i = 0; i < dbuf_slices[i].active_pipes; i++) {
4873+
for (i = 0; dbuf_slices[i].active_pipes != 0; i++) {
48744874
if (dbuf_slices[i].active_pipes == active_pipes &&
48754875
dbuf_slices[i].join_mbus == join_mbus)
48764876
return dbuf_slices[i].dbuf_mask[pipe];

0 commit comments

Comments
 (0)