Skip to content

Commit 5400133

Browse files
committed
Merge tag 'drm-intel-fixes-2023-11-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v6.7-rc4: - Mark internal GSC engine with reserved uabi class - Take VGA converters into account in eDP probe - Fix intel_pre_plane_updates() call to ensure workarounds get applied Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 2cc14f5 + d21a396 commit 5400133

File tree

3 files changed

+46
-24
lines changed

3 files changed

+46
-24
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6853,10 +6853,11 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
68536853
if (!intel_crtc_needs_modeset(new_crtc_state))
68546854
continue;
68556855

6856+
intel_pre_plane_update(state, crtc);
6857+
68566858
if (!old_crtc_state->hw.active)
68576859
continue;
68586860

6859-
intel_pre_plane_update(state, crtc);
68606861
intel_crtc_disable_planes(state, crtc);
68616862
}
68626863

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

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6037,19 +6037,35 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
60376037
* (eg. Acer Chromebook C710), so we'll check it only if multiple
60386038
* ports are attempting to use the same AUX CH, according to VBT.
60396039
*/
6040-
if (intel_bios_dp_has_shared_aux_ch(encoder->devdata) &&
6041-
!intel_digital_port_connected(encoder)) {
6040+
if (intel_bios_dp_has_shared_aux_ch(encoder->devdata)) {
60426041
/*
60436042
* If this fails, presume the DPCD answer came
60446043
* from some other port using the same AUX CH.
60456044
*
60466045
* FIXME maybe cleaner to check this before the
60476046
* DPCD read? Would need sort out the VDD handling...
60486047
*/
6049-
drm_info(&dev_priv->drm,
6050-
"[ENCODER:%d:%s] HPD is down, disabling eDP\n",
6051-
encoder->base.base.id, encoder->base.name);
6052-
goto out_vdd_off;
6048+
if (!intel_digital_port_connected(encoder)) {
6049+
drm_info(&dev_priv->drm,
6050+
"[ENCODER:%d:%s] HPD is down, disabling eDP\n",
6051+
encoder->base.base.id, encoder->base.name);
6052+
goto out_vdd_off;
6053+
}
6054+
6055+
/*
6056+
* Unfortunately even the HPD based detection fails on
6057+
* eg. Asus B360M-A (CFL+CNP), so as a last resort fall
6058+
* back to checking for a VGA branch device. Only do this
6059+
* on known affected platforms to minimize false positives.
6060+
*/
6061+
if (DISPLAY_VER(dev_priv) == 9 && drm_dp_is_branch(intel_dp->dpcd) &&
6062+
(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_TYPE_MASK) ==
6063+
DP_DWN_STRM_PORT_TYPE_ANALOG) {
6064+
drm_info(&dev_priv->drm,
6065+
"[ENCODER:%d:%s] VGA converter detected, disabling eDP\n",
6066+
encoder->base.base.id, encoder->base.name);
6067+
goto out_vdd_off;
6068+
}
60536069
}
60546070

60556071
mutex_lock(&dev_priv->drm.mode_config.mutex);

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

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ void intel_engine_add_user(struct intel_engine_cs *engine)
4141
llist_add(&engine->uabi_llist, &engine->i915->uabi_engines_llist);
4242
}
4343

44-
static const u8 uabi_classes[] = {
44+
#define I915_NO_UABI_CLASS ((u16)(-1))
45+
46+
static const u16 uabi_classes[] = {
4547
[RENDER_CLASS] = I915_ENGINE_CLASS_RENDER,
4648
[COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY,
4749
[VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO,
4850
[VIDEO_ENHANCEMENT_CLASS] = I915_ENGINE_CLASS_VIDEO_ENHANCE,
4951
[COMPUTE_CLASS] = I915_ENGINE_CLASS_COMPUTE,
52+
[OTHER_CLASS] = I915_NO_UABI_CLASS, /* Not exposed to users, no uabi class. */
5053
};
5154

5255
static int engine_cmp(void *priv, const struct list_head *A,
@@ -200,6 +203,7 @@ static void engine_rename(struct intel_engine_cs *engine, const char *name, u16
200203

201204
void intel_engines_driver_register(struct drm_i915_private *i915)
202205
{
206+
u16 name_instance, other_instance = 0;
203207
struct legacy_ring ring = {};
204208
struct list_head *it, *next;
205209
struct rb_node **p, *prev;
@@ -216,27 +220,28 @@ void intel_engines_driver_register(struct drm_i915_private *i915)
216220
if (intel_gt_has_unrecoverable_error(engine->gt))
217221
continue; /* ignore incomplete engines */
218222

219-
/*
220-
* We don't want to expose the GSC engine to the users, but we
221-
* still rename it so it is easier to identify in the debug logs
222-
*/
223-
if (engine->id == GSC0) {
224-
engine_rename(engine, "gsc", 0);
225-
continue;
226-
}
227-
228223
GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes));
229224
engine->uabi_class = uabi_classes[engine->class];
225+
if (engine->uabi_class == I915_NO_UABI_CLASS) {
226+
name_instance = other_instance++;
227+
} else {
228+
GEM_BUG_ON(engine->uabi_class >=
229+
ARRAY_SIZE(i915->engine_uabi_class_count));
230+
name_instance =
231+
i915->engine_uabi_class_count[engine->uabi_class]++;
232+
}
233+
engine->uabi_instance = name_instance;
230234

231-
GEM_BUG_ON(engine->uabi_class >=
232-
ARRAY_SIZE(i915->engine_uabi_class_count));
233-
engine->uabi_instance =
234-
i915->engine_uabi_class_count[engine->uabi_class]++;
235-
236-
/* Replace the internal name with the final user facing name */
235+
/*
236+
* Replace the internal name with the final user and log facing
237+
* name.
238+
*/
237239
engine_rename(engine,
238240
intel_engine_class_repr(engine->class),
239-
engine->uabi_instance);
241+
name_instance);
242+
243+
if (engine->uabi_class == I915_NO_UABI_CLASS)
244+
continue;
240245

241246
rb_link_node(&engine->uabi_node, prev, p);
242247
rb_insert_color(&engine->uabi_node, &i915->uabi_engines);

0 commit comments

Comments
 (0)