Commit 54001331 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-fixes-2023-11-30' of...

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: default avatarDave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87msuv479z.fsf@intel.com
parents 2cc14f52 d21a3962
...@@ -6853,10 +6853,11 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state) ...@@ -6853,10 +6853,11 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
if (!intel_crtc_needs_modeset(new_crtc_state)) if (!intel_crtc_needs_modeset(new_crtc_state))
continue; continue;
intel_pre_plane_update(state, crtc);
if (!old_crtc_state->hw.active) if (!old_crtc_state->hw.active)
continue; continue;
intel_pre_plane_update(state, crtc);
intel_crtc_disable_planes(state, crtc); intel_crtc_disable_planes(state, crtc);
} }
......
...@@ -6037,8 +6037,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, ...@@ -6037,8 +6037,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
* (eg. Acer Chromebook C710), so we'll check it only if multiple * (eg. Acer Chromebook C710), so we'll check it only if multiple
* ports are attempting to use the same AUX CH, according to VBT. * ports are attempting to use the same AUX CH, according to VBT.
*/ */
if (intel_bios_dp_has_shared_aux_ch(encoder->devdata) && if (intel_bios_dp_has_shared_aux_ch(encoder->devdata)) {
!intel_digital_port_connected(encoder)) {
/* /*
* If this fails, presume the DPCD answer came * If this fails, presume the DPCD answer came
* from some other port using the same AUX CH. * from some other port using the same AUX CH.
...@@ -6046,10 +6045,27 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, ...@@ -6046,10 +6045,27 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
* FIXME maybe cleaner to check this before the * FIXME maybe cleaner to check this before the
* DPCD read? Would need sort out the VDD handling... * DPCD read? Would need sort out the VDD handling...
*/ */
drm_info(&dev_priv->drm, if (!intel_digital_port_connected(encoder)) {
"[ENCODER:%d:%s] HPD is down, disabling eDP\n", drm_info(&dev_priv->drm,
encoder->base.base.id, encoder->base.name); "[ENCODER:%d:%s] HPD is down, disabling eDP\n",
goto out_vdd_off; encoder->base.base.id, encoder->base.name);
goto out_vdd_off;
}
/*
* Unfortunately even the HPD based detection fails on
* eg. Asus B360M-A (CFL+CNP), so as a last resort fall
* back to checking for a VGA branch device. Only do this
* on known affected platforms to minimize false positives.
*/
if (DISPLAY_VER(dev_priv) == 9 && drm_dp_is_branch(intel_dp->dpcd) &&
(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_TYPE_MASK) ==
DP_DWN_STRM_PORT_TYPE_ANALOG) {
drm_info(&dev_priv->drm,
"[ENCODER:%d:%s] VGA converter detected, disabling eDP\n",
encoder->base.base.id, encoder->base.name);
goto out_vdd_off;
}
} }
mutex_lock(&dev_priv->drm.mode_config.mutex); mutex_lock(&dev_priv->drm.mode_config.mutex);
......
...@@ -41,12 +41,15 @@ void intel_engine_add_user(struct intel_engine_cs *engine) ...@@ -41,12 +41,15 @@ void intel_engine_add_user(struct intel_engine_cs *engine)
llist_add(&engine->uabi_llist, &engine->i915->uabi_engines_llist); llist_add(&engine->uabi_llist, &engine->i915->uabi_engines_llist);
} }
static const u8 uabi_classes[] = { #define I915_NO_UABI_CLASS ((u16)(-1))
static const u16 uabi_classes[] = {
[RENDER_CLASS] = I915_ENGINE_CLASS_RENDER, [RENDER_CLASS] = I915_ENGINE_CLASS_RENDER,
[COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY, [COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY,
[VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO, [VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO,
[VIDEO_ENHANCEMENT_CLASS] = I915_ENGINE_CLASS_VIDEO_ENHANCE, [VIDEO_ENHANCEMENT_CLASS] = I915_ENGINE_CLASS_VIDEO_ENHANCE,
[COMPUTE_CLASS] = I915_ENGINE_CLASS_COMPUTE, [COMPUTE_CLASS] = I915_ENGINE_CLASS_COMPUTE,
[OTHER_CLASS] = I915_NO_UABI_CLASS, /* Not exposed to users, no uabi class. */
}; };
static int engine_cmp(void *priv, const struct list_head *A, 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 ...@@ -200,6 +203,7 @@ static void engine_rename(struct intel_engine_cs *engine, const char *name, u16
void intel_engines_driver_register(struct drm_i915_private *i915) void intel_engines_driver_register(struct drm_i915_private *i915)
{ {
u16 name_instance, other_instance = 0;
struct legacy_ring ring = {}; struct legacy_ring ring = {};
struct list_head *it, *next; struct list_head *it, *next;
struct rb_node **p, *prev; struct rb_node **p, *prev;
...@@ -216,27 +220,28 @@ void intel_engines_driver_register(struct drm_i915_private *i915) ...@@ -216,27 +220,28 @@ void intel_engines_driver_register(struct drm_i915_private *i915)
if (intel_gt_has_unrecoverable_error(engine->gt)) if (intel_gt_has_unrecoverable_error(engine->gt))
continue; /* ignore incomplete engines */ continue; /* ignore incomplete engines */
/*
* We don't want to expose the GSC engine to the users, but we
* still rename it so it is easier to identify in the debug logs
*/
if (engine->id == GSC0) {
engine_rename(engine, "gsc", 0);
continue;
}
GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes)); GEM_BUG_ON(engine->class >= ARRAY_SIZE(uabi_classes));
engine->uabi_class = uabi_classes[engine->class]; engine->uabi_class = uabi_classes[engine->class];
if (engine->uabi_class == I915_NO_UABI_CLASS) {
name_instance = other_instance++;
} else {
GEM_BUG_ON(engine->uabi_class >=
ARRAY_SIZE(i915->engine_uabi_class_count));
name_instance =
i915->engine_uabi_class_count[engine->uabi_class]++;
}
engine->uabi_instance = name_instance;
GEM_BUG_ON(engine->uabi_class >= /*
ARRAY_SIZE(i915->engine_uabi_class_count)); * Replace the internal name with the final user and log facing
engine->uabi_instance = * name.
i915->engine_uabi_class_count[engine->uabi_class]++; */
/* Replace the internal name with the final user facing name */
engine_rename(engine, engine_rename(engine,
intel_engine_class_repr(engine->class), intel_engine_class_repr(engine->class),
engine->uabi_instance); name_instance);
if (engine->uabi_class == I915_NO_UABI_CLASS)
continue;
rb_link_node(&engine->uabi_node, prev, p); rb_link_node(&engine->uabi_node, prev, p);
rb_insert_color(&engine->uabi_node, &i915->uabi_engines); rb_insert_color(&engine->uabi_node, &i915->uabi_engines);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment