drm/i915/display: WA_14011503117
Mask the ERR_FATAL_MASK before scaler initialization.
After enabling the scaler and waiting for one frame,
unmask the previously masked bits, PS_ECC and
ERR_FATAL_MASK
Unmasking of ERR_FATAL_MASK bit is use for
validation purpose. There is no functional
impact.
v2: Remove intel_display_need_wa[Jani]
Optimize the ecc_unmask call[Animesh]
v3: Add intel_display_wa[Jani]
Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250801125835.2337614-1-nemesa.garg@intel.com
pull/1354/merge
parent
6e2c8fbc66
commit
73309ed9d5
|
|
@ -76,6 +76,7 @@
|
|||
#include "intel_display_regs.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_display_wa.h"
|
||||
#include "intel_dmc.h"
|
||||
#include "intel_dp.h"
|
||||
#include "intel_dp_link_training.h"
|
||||
|
|
@ -1081,6 +1082,11 @@ static void intel_post_plane_update(struct intel_atomic_state *state,
|
|||
if (audio_enabling(old_crtc_state, new_crtc_state))
|
||||
intel_encoders_audio_enable(state, crtc);
|
||||
|
||||
if (intel_display_wa(display, 14011503117)) {
|
||||
if (old_crtc_state->pch_pfit.enabled != new_crtc_state->pch_pfit.enabled)
|
||||
adl_scaler_ecc_unmask(new_crtc_state);
|
||||
}
|
||||
|
||||
intel_alpm_post_plane_update(state, crtc);
|
||||
|
||||
intel_psr_post_plane_update(state, crtc);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@ static bool intel_display_needs_wa_16025573575(struct intel_display *display)
|
|||
return DISPLAY_VERx100(display) == 3000 || DISPLAY_VERx100(display) == 3002;
|
||||
}
|
||||
|
||||
/*
|
||||
* Wa_14011503117:
|
||||
* Fixes: Before enabling the scaler DE fatal error is masked
|
||||
* Workaround: Unmask the DE fatal error register after enabling the scaler
|
||||
* and after waiting of at least 1 frame.
|
||||
*/
|
||||
bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, const char *name)
|
||||
{
|
||||
switch (wa) {
|
||||
|
|
@ -59,6 +65,8 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
|
|||
return intel_display_needs_wa_16023588340(display);
|
||||
case INTEL_DISPLAY_WA_16025573575:
|
||||
return intel_display_needs_wa_16025573575(display);
|
||||
case INTEL_DISPLAY_WA_14011503117:
|
||||
return DISPLAY_VER(display) == 13;
|
||||
default:
|
||||
drm_WARN(display->drm, 1, "Missing Wa number: %s\n", name);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ bool intel_display_needs_wa_16023588340(struct intel_display *display);
|
|||
enum intel_display_wa {
|
||||
INTEL_DISPLAY_WA_16023588340,
|
||||
INTEL_DISPLAY_WA_16025573575,
|
||||
INTEL_DISPLAY_WA_14011503117,
|
||||
};
|
||||
|
||||
bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, const char *name);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "intel_display_regs.h"
|
||||
#include "intel_display_trace.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_display_wa.h"
|
||||
#include "intel_fb.h"
|
||||
#include "skl_scaler.h"
|
||||
#include "skl_universal_plane.h"
|
||||
|
|
@ -762,6 +763,9 @@ void skl_pfit_enable(const struct intel_crtc_state *crtc_state)
|
|||
crtc_state->scaler_state.scaler_id < 0))
|
||||
return;
|
||||
|
||||
if (intel_display_wa(display, 14011503117))
|
||||
adl_scaler_ecc_mask(crtc_state);
|
||||
|
||||
drm_rect_init(&src, 0, 0,
|
||||
drm_rect_width(&crtc_state->pipe_src) << 16,
|
||||
drm_rect_height(&crtc_state->pipe_src) << 16);
|
||||
|
|
@ -938,3 +942,28 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
|
|||
else
|
||||
scaler_state->scaler_users &= ~(1 << SKL_CRTC_INDEX);
|
||||
}
|
||||
|
||||
void adl_scaler_ecc_mask(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
|
||||
if (!crtc_state->pch_pfit.enabled)
|
||||
return;
|
||||
|
||||
intel_de_write(display, XELPD_DISPLAY_ERR_FATAL_MASK, ~0);
|
||||
}
|
||||
|
||||
void adl_scaler_ecc_unmask(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
const struct intel_crtc_scaler_state *scaler_state =
|
||||
&crtc_state->scaler_state;
|
||||
int id;
|
||||
|
||||
if (!scaler_state && scaler_state->scaler_id == -1)
|
||||
return;
|
||||
|
||||
intel_de_write_fw(display, SKL_PS_ECC_STAT(crtc->pipe, id), 1);
|
||||
intel_de_write(display, XELPD_DISPLAY_ERR_FATAL_MASK, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,7 @@ skl_scaler_mode_valid(struct intel_display *display,
|
|||
enum intel_output_format output_format,
|
||||
int num_joined_pipes);
|
||||
|
||||
void adl_scaler_ecc_mask(const struct intel_crtc_state *crtc_state);
|
||||
|
||||
void adl_scaler_ecc_unmask(const struct intel_crtc_state *crtc_state);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue