2023-09-06 17:10:10 -07:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
/*
|
|
|
|
* Copyright © 2023 Intel Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "i915_reg.h"
|
|
|
|
#include "intel_de.h"
|
2025-03-25 14:36:37 +02:00
|
|
|
#include "intel_display_core.h"
|
2025-06-06 13:22:56 +03:00
|
|
|
#include "intel_display_regs.h"
|
2023-09-06 17:10:10 -07:00
|
|
|
#include "intel_display_wa.h"
|
|
|
|
|
2025-03-25 14:36:37 +02:00
|
|
|
static void gen11_display_wa_apply(struct intel_display *display)
|
2023-09-06 17:10:10 -07:00
|
|
|
{
|
|
|
|
/* Wa_14010594013 */
|
2025-03-25 14:36:37 +02:00
|
|
|
intel_de_rmw(display, GEN8_CHICKEN_DCPR_1, 0, ICL_DELAY_PMRSP);
|
2023-09-06 17:10:10 -07:00
|
|
|
}
|
|
|
|
|
2025-03-25 14:36:37 +02:00
|
|
|
static void xe_d_display_wa_apply(struct intel_display *display)
|
2023-09-06 17:10:10 -07:00
|
|
|
{
|
|
|
|
/* Wa_14013723622 */
|
2025-03-25 14:36:37 +02:00
|
|
|
intel_de_rmw(display, CLKREQ_POLICY, CLKREQ_POLICY_MEM_UP_OVRD, 0);
|
2023-09-06 17:10:10 -07:00
|
|
|
}
|
|
|
|
|
2025-03-25 14:36:37 +02:00
|
|
|
static void adlp_display_wa_apply(struct intel_display *display)
|
2023-09-06 17:10:10 -07:00
|
|
|
{
|
|
|
|
/* Wa_22011091694:adlp */
|
2025-03-25 14:36:37 +02:00
|
|
|
intel_de_rmw(display, GEN9_CLKGATE_DIS_5, 0, DPCE_GATING_DIS);
|
2023-09-06 17:10:10 -07:00
|
|
|
|
|
|
|
/* Bspec/49189 Initialize Sequence */
|
2025-03-25 14:36:37 +02:00
|
|
|
intel_de_rmw(display, GEN8_CHICKEN_DCPR_1, DDI_CLOCK_REG_ACCESS, 0);
|
2023-09-06 17:10:10 -07:00
|
|
|
}
|
|
|
|
|
2025-03-25 14:36:37 +02:00
|
|
|
void intel_display_wa_apply(struct intel_display *display)
|
2023-09-06 17:10:10 -07:00
|
|
|
{
|
2025-03-25 14:36:37 +02:00
|
|
|
if (display->platform.alderlake_p)
|
|
|
|
adlp_display_wa_apply(display);
|
|
|
|
else if (DISPLAY_VER(display) == 12)
|
|
|
|
xe_d_display_wa_apply(display);
|
|
|
|
else if (DISPLAY_VER(display) == 11)
|
|
|
|
gen11_display_wa_apply(display);
|
2023-09-06 17:10:10 -07:00
|
|
|
}
|