Skip to content

Commit 9941b5b

Browse files
committed
Merge tag 'drm-intel-fixes-2024-08-29' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
- Fix #11195: The external display connect via USB type-C dock stays blank after re-connect the dock - Make DSI backlight work for 2G version of Lenovo Yoga Tab 3 X90F . Move ARL GuC firmware to correct version - Signed-off-by: Dave Airlie <[email protected]> From: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents bd3755c + a2ccc33 commit 9941b5b

File tree

10 files changed

+111
-7
lines changed

10 files changed

+111
-7
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5935,6 +5935,18 @@ intel_dp_detect(struct drm_connector *connector,
59355935
else
59365936
status = connector_status_disconnected;
59375937

5938+
if (status != connector_status_disconnected &&
5939+
!intel_dp_mst_verify_dpcd_state(intel_dp))
5940+
/*
5941+
* This requires retrying detection for instance to re-enable
5942+
* the MST mode that got reset via a long HPD pulse. The retry
5943+
* will happen either via the hotplug handler's retry logic,
5944+
* ensured by setting the connector here to SST/disconnected,
5945+
* or via a userspace connector probing in response to the
5946+
* hotplug uevent sent when removing the MST connectors.
5947+
*/
5948+
status = connector_status_disconnected;
5949+
59385950
if (status == connector_status_disconnected) {
59395951
memset(&intel_dp->compliance, 0, sizeof(intel_dp->compliance));
59405952
memset(intel_connector->dp.dsc_dpcd, 0, sizeof(intel_connector->dp.dsc_dpcd));

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,3 +1998,43 @@ bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
19981998

19991999
return false;
20002000
}
2001+
2002+
/*
2003+
* intel_dp_mst_verify_dpcd_state - verify the MST SW enabled state wrt. the DPCD
2004+
* @intel_dp: DP port object
2005+
*
2006+
* Verify if @intel_dp's MST enabled SW state matches the corresponding DPCD
2007+
* state. A long HPD pulse - not long enough to be detected as a disconnected
2008+
* state - could've reset the DPCD state, which requires tearing
2009+
* down/recreating the MST topology.
2010+
*
2011+
* Returns %true if the SW MST enabled and DPCD states match, %false
2012+
* otherwise.
2013+
*/
2014+
bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp)
2015+
{
2016+
struct intel_display *display = to_intel_display(intel_dp);
2017+
struct intel_connector *connector = intel_dp->attached_connector;
2018+
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
2019+
struct intel_encoder *encoder = &dig_port->base;
2020+
int ret;
2021+
u8 val;
2022+
2023+
if (!intel_dp->is_mst)
2024+
return true;
2025+
2026+
ret = drm_dp_dpcd_readb(intel_dp->mst_mgr.aux, DP_MSTM_CTRL, &val);
2027+
2028+
/* Adjust the expected register value for SST + SideBand. */
2029+
if (ret < 0 || val != (DP_MST_EN | DP_UP_REQ_EN | DP_UPSTREAM_IS_SRC)) {
2030+
drm_dbg_kms(display->drm,
2031+
"[CONNECTOR:%d:%s][ENCODER:%d:%s] MST mode got reset, removing topology (ret=%d, ctrl=0x%02x)\n",
2032+
connector->base.base.id, connector->base.name,
2033+
encoder->base.base.id, encoder->base.name,
2034+
ret, val);
2035+
2036+
return false;
2037+
}
2038+
2039+
return true;
2040+
}

drivers/gpu/drm/i915/display/intel_dp_mst.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ int intel_dp_mst_atomic_check_link(struct intel_atomic_state *state,
2727
struct intel_link_bw_limits *limits);
2828
bool intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
2929
struct intel_crtc *crtc);
30+
bool intel_dp_mst_verify_dpcd_state(struct intel_dp *intel_dp);
3031

3132
#endif /* __INTEL_DP_MST_H__ */

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,6 @@ static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = {
18701870
/* Lenovo Yoga Tab 3 Pro YT3-X90F */
18711871
.matches = {
18721872
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
1873-
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
18741873
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
18751874
},
18761875
.driver_data = (void *)vlv_dsi_lenovo_yoga_tab3_backlight_fixup,

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,37 @@ int intel_gsc_fw_get_binary_info(struct intel_uc_fw *gsc_fw, const void *data, s
212212
}
213213
}
214214

215+
if (IS_ARROWLAKE(gt->i915)) {
216+
bool too_old = false;
217+
218+
/*
219+
* ARL requires a newer firmware than MTL did (102.0.10.1878) but the
220+
* firmware is actually common. So, need to do an explicit version check
221+
* here rather than using a separate table entry. And if the older
222+
* MTL-only version is found, then just don't use GSC rather than aborting
223+
* the driver load.
224+
*/
225+
if (gsc->release.major < 102) {
226+
too_old = true;
227+
} else if (gsc->release.major == 102) {
228+
if (gsc->release.minor == 0) {
229+
if (gsc->release.patch < 10) {
230+
too_old = true;
231+
} else if (gsc->release.patch == 10) {
232+
if (gsc->release.build < 1878)
233+
too_old = true;
234+
}
235+
}
236+
}
237+
238+
if (too_old) {
239+
gt_info(gt, "GSC firmware too old for ARL, got %d.%d.%d.%d but need at least 102.0.10.1878",
240+
gsc->release.major, gsc->release.minor,
241+
gsc->release.patch, gsc->release.build);
242+
return -EINVAL;
243+
}
244+
}
245+
215246
return 0;
216247
}
217248

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,12 +698,18 @@ static int check_gsc_manifest(struct intel_gt *gt,
698698
const struct firmware *fw,
699699
struct intel_uc_fw *uc_fw)
700700
{
701+
int ret;
702+
701703
switch (uc_fw->type) {
702704
case INTEL_UC_FW_TYPE_HUC:
703-
intel_huc_fw_get_binary_info(uc_fw, fw->data, fw->size);
705+
ret = intel_huc_fw_get_binary_info(uc_fw, fw->data, fw->size);
706+
if (ret)
707+
return ret;
704708
break;
705709
case INTEL_UC_FW_TYPE_GSC:
706-
intel_gsc_fw_get_binary_info(uc_fw, fw->data, fw->size);
710+
ret = intel_gsc_fw_get_binary_info(uc_fw, fw->data, fw->size);
711+
if (ret)
712+
return ret;
707713
break;
708714
default:
709715
MISSING_CASE(uc_fw->type);

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
546546
#define IS_LUNARLAKE(i915) (0 && i915)
547547
#define IS_BATTLEMAGE(i915) (0 && i915)
548548

549+
#define IS_ARROWLAKE(i915) \
550+
IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_ARL)
549551
#define IS_DG2_G10(i915) \
550552
IS_SUBPLATFORM(i915, INTEL_DG2, INTEL_SUBPLATFORM_G10)
551553
#define IS_DG2_G11(i915) \

drivers/gpu/drm/i915/intel_device_info.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ static const u16 subplatform_g12_ids[] = {
203203
INTEL_DG2_G12_IDS(ID),
204204
};
205205

206+
static const u16 subplatform_arl_ids[] = {
207+
INTEL_ARL_IDS(ID),
208+
};
209+
206210
static bool find_devid(u16 id, const u16 *p, unsigned int num)
207211
{
208212
for (; num; num--, p++) {
@@ -260,6 +264,9 @@ static void intel_device_info_subplatform_init(struct drm_i915_private *i915)
260264
} else if (find_devid(devid, subplatform_g12_ids,
261265
ARRAY_SIZE(subplatform_g12_ids))) {
262266
mask = BIT(INTEL_SUBPLATFORM_G12);
267+
} else if (find_devid(devid, subplatform_arl_ids,
268+
ARRAY_SIZE(subplatform_arl_ids))) {
269+
mask = BIT(INTEL_SUBPLATFORM_ARL);
263270
}
264271

265272
GEM_BUG_ON(mask & ~INTEL_SUBPLATFORM_MASK);

drivers/gpu/drm/i915/intel_device_info.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ enum intel_platform {
127127
#define INTEL_SUBPLATFORM_N 1
128128
#define INTEL_SUBPLATFORM_RPLU 2
129129

130+
/* MTL */
131+
#define INTEL_SUBPLATFORM_ARL 0
132+
130133
enum intel_ppgtt_type {
131134
INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE,
132135
INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING,

include/drm/intel/i915_pciids.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,15 +772,18 @@
772772
INTEL_ATS_M75_IDS(MACRO__, ## __VA_ARGS__)
773773

774774
/* MTL */
775+
#define INTEL_ARL_IDS(MACRO__, ...) \
776+
MACRO__(0x7D41, ## __VA_ARGS__), \
777+
MACRO__(0x7D51, ## __VA_ARGS__), \
778+
MACRO__(0x7D67, ## __VA_ARGS__), \
779+
MACRO__(0x7DD1, ## __VA_ARGS__)
780+
775781
#define INTEL_MTL_IDS(MACRO__, ...) \
782+
INTEL_ARL_IDS(MACRO__, ## __VA_ARGS__), \
776783
MACRO__(0x7D40, ## __VA_ARGS__), \
777-
MACRO__(0x7D41, ## __VA_ARGS__), \
778784
MACRO__(0x7D45, ## __VA_ARGS__), \
779-
MACRO__(0x7D51, ## __VA_ARGS__), \
780785
MACRO__(0x7D55, ## __VA_ARGS__), \
781786
MACRO__(0x7D60, ## __VA_ARGS__), \
782-
MACRO__(0x7D67, ## __VA_ARGS__), \
783-
MACRO__(0x7DD1, ## __VA_ARGS__), \
784787
MACRO__(0x7DD5, ## __VA_ARGS__)
785788

786789
/* LNL */

0 commit comments

Comments
 (0)