Skip to content

Commit a13494d

Browse files
hoganderjlahtine-intel
authored andcommitted
drm/i915/display: Increase Fast Wake Sync length as a quirk
In commit "drm/i915/display: Increase number of fast wake precharge pulses" we were increasing Fast Wake sync pulse length to fix problems observed on Dell Precision 5490 laptop with AUO panel. Later we have observed this is causing problems on other panels. Fix these problems by increasing Fast Wake sync pulse length as a quirk applied for Dell Precision 5490 with problematic panel. Fixes: f777728 ("drm/i915/display: Increase number of fast wake precharge pulses") Cc: Ville Syrjälä <[email protected]> Closes: http://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9739 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2246 Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11762 Signed-off-by: Jouni Högander <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Cc: <[email protected]> # v6.10+ Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit fcba2ed) Requires: 43cf50e ("drm/i915/display: Add mechanism to use sink model when applying quirk") Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 43cf50e commit a13494d

File tree

5 files changed

+32
-8
lines changed

5 files changed

+32
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ bool intel_alpm_compute_params(struct intel_dp *intel_dp,
228228
int tfw_exit_latency = 20; /* eDP spec */
229229
int phy_wake = 4; /* eDP spec */
230230
int preamble = 8; /* eDP spec */
231-
int precharge = intel_dp_aux_fw_sync_len() - preamble;
231+
int precharge = intel_dp_aux_fw_sync_len(intel_dp) - preamble;
232232
u8 max_wake_lines;
233233

234234
io_wake_time = max(precharge, io_buffer_wake_time(crtc_state)) +

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "intel_dp_aux.h"
1414
#include "intel_dp_aux_regs.h"
1515
#include "intel_pps.h"
16+
#include "intel_quirks.h"
1617
#include "intel_tc.h"
1718

1819
#define AUX_CH_NAME_BUFSIZE 6
@@ -142,16 +143,21 @@ static int intel_dp_aux_sync_len(void)
142143
return precharge + preamble;
143144
}
144145

145-
int intel_dp_aux_fw_sync_len(void)
146+
int intel_dp_aux_fw_sync_len(struct intel_dp *intel_dp)
146147
{
148+
int precharge = 10; /* 10-16 */
149+
int preamble = 8;
150+
147151
/*
148152
* We faced some glitches on Dell Precision 5490 MTL laptop with panel:
149153
* "Manufacturer: AUO, Model: 63898" when using HW default 18. Using 20
150154
* is fixing these problems with the panel. It is still within range
151-
* mentioned in eDP specification.
155+
* mentioned in eDP specification. Increasing Fast Wake sync length is
156+
* causing problems with other panels: increase length as a quirk for
157+
* this specific laptop.
152158
*/
153-
int precharge = 12; /* 10-16 */
154-
int preamble = 8;
159+
if (intel_has_dpcd_quirk(intel_dp, QUIRK_FW_SYNC_LEN))
160+
precharge += 2;
155161

156162
return precharge + preamble;
157163
}
@@ -211,7 +217,7 @@ static u32 skl_get_aux_send_ctl(struct intel_dp *intel_dp,
211217
DP_AUX_CH_CTL_TIME_OUT_MAX |
212218
DP_AUX_CH_CTL_RECEIVE_ERROR |
213219
DP_AUX_CH_CTL_MESSAGE_SIZE(send_bytes) |
214-
DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL(intel_dp_aux_fw_sync_len()) |
220+
DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL(intel_dp_aux_fw_sync_len(intel_dp)) |
215221
DP_AUX_CH_CTL_SYNC_PULSE_SKL(intel_dp_aux_sync_len());
216222

217223
if (intel_tc_port_in_tbt_alt_mode(dig_port))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ enum aux_ch intel_dp_aux_ch(struct intel_encoder *encoder);
2020

2121
void intel_dp_aux_irq_handler(struct drm_i915_private *i915);
2222
u32 intel_dp_aux_pack(const u8 *src, int src_bytes);
23-
int intel_dp_aux_fw_sync_len(void);
23+
int intel_dp_aux_fw_sync_len(struct intel_dp *intel_dp);
2424

2525
#endif /* __INTEL_DP_AUX_H__ */

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ static void quirk_no_pps_backlight_power_hook(struct intel_display *display)
7070
drm_info(display->drm, "Applying no pps backlight power quirk\n");
7171
}
7272

73+
static void quirk_fw_sync_len(struct intel_dp *intel_dp)
74+
{
75+
struct intel_display *display = to_intel_display(intel_dp);
76+
77+
intel_set_dpcd_quirk(intel_dp, QUIRK_FW_SYNC_LEN);
78+
drm_info(display->drm, "Applying Fast Wake sync pulse count quirk\n");
79+
}
80+
7381
struct intel_quirk {
7482
int device;
7583
int subsystem_vendor;
@@ -224,6 +232,15 @@ static struct intel_quirk intel_quirks[] = {
224232
};
225233

226234
static struct intel_dpcd_quirk intel_dpcd_quirks[] = {
235+
/* Dell Precision 5490 */
236+
{
237+
.device = 0x7d55,
238+
.subsystem_vendor = 0x1028,
239+
.subsystem_device = 0x0cc7,
240+
.sink_oui = SINK_OUI(0x38, 0xec, 0x11),
241+
.hook = quirk_fw_sync_len,
242+
},
243+
227244
};
228245

229246
void intel_init_quirks(struct intel_display *display)
@@ -265,7 +282,7 @@ void intel_init_dpcd_quirks(struct intel_dp *intel_dp,
265282
!memcmp(q->sink_oui, ident->oui, sizeof(ident->oui)) &&
266283
(!memcmp(q->sink_device_id, ident->device_id,
267284
sizeof(ident->device_id)) ||
268-
mem_is_zero(q->sink_device_id, sizeof(q->sink_device_id))))
285+
!memchr_inv(q->sink_device_id, 0, sizeof(q->sink_device_id))))
269286
q->hook(intel_dp);
270287
}
271288
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ enum intel_quirk_id {
1919
QUIRK_INVERT_BRIGHTNESS,
2020
QUIRK_LVDS_SSC_DISABLE,
2121
QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK,
22+
QUIRK_FW_SYNC_LEN,
2223
};
2324

2425
void intel_init_quirks(struct intel_display *display);

0 commit comments

Comments
 (0)