mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
drm/i915/pm_demand: introduce HAS_PMDEMAND macro
PM demand feature introduces a new way to set bw, power and performance requirements to pcode from display version 14 onwards. Use an identifiable name as a macro to distinguish the pm demand specific changes in the code. Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260615203355.218578-3-vinod.govindapillai@intel.com
This commit is contained in:
parent
60f68a6ba2
commit
fb8a24c079
|
|
@ -184,7 +184,7 @@ static int icl_pcode_restrict_qgv_points(struct intel_display *display,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (DISPLAY_VER(display) >= 14)
|
||||
if (HAS_PMDEMAND(display))
|
||||
return 0;
|
||||
|
||||
/* bspec says to keep retrying for at least 1 ms */
|
||||
|
|
@ -1238,7 +1238,7 @@ static int intel_bw_check_qgv_points(struct intel_display *display,
|
|||
|
||||
data_rate = DIV_ROUND_UP(data_rate, 1000);
|
||||
|
||||
if (DISPLAY_VER(display) >= 14)
|
||||
if (HAS_PMDEMAND(display))
|
||||
return mtl_find_qgv_points(display, data_rate, num_active_planes,
|
||||
new_bw_state);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ struct intel_display_platforms {
|
|||
#define HAS_OVERLAY(__display) (DISPLAY_INFO(__display)->has_overlay)
|
||||
#define HAS_PIPEDMC(__display) (DISPLAY_VER(__display) >= 12)
|
||||
#define HAS_PIXEL_NORMALIZER(__display) (DISPLAY_VER(__display) >= 35)
|
||||
#define HAS_PMDEMAND(__display) (DISPLAY_VER(__display) >= 14)
|
||||
#define HAS_PSR(__display) (DISPLAY_INFO(__display)->has_psr)
|
||||
#define HAS_PSR_HW_TRACKING(__display) (DISPLAY_INFO(__display)->has_psr_hw_tracking)
|
||||
#define HAS_PSR2_SEL_FETCH(__display) (DISPLAY_VER(__display) >= 12)
|
||||
|
|
|
|||
|
|
@ -1262,7 +1262,7 @@ gen8_de_misc_irq_handler(struct intel_display *display, u32 iir)
|
|||
}
|
||||
}
|
||||
|
||||
if (DISPLAY_VER(display) >= 14) {
|
||||
if (HAS_PMDEMAND(display)) {
|
||||
if (iir & (XELPDP_PMDEMAND_RSP |
|
||||
XELPDP_PMDEMAND_RSPTOUT_ERR)) {
|
||||
if (iir & XELPDP_PMDEMAND_RSPTOUT_ERR)
|
||||
|
|
|
|||
|
|
@ -1290,7 +1290,7 @@ static void gen9_dbuf_enable(struct intel_display *display)
|
|||
|
||||
slices_mask = BIT(DBUF_S1) | display->dbuf.enabled_slices;
|
||||
|
||||
if (DISPLAY_VER(display) >= 14)
|
||||
if (HAS_PMDEMAND(display))
|
||||
intel_pmdemand_program_dbuf(display, slices_mask);
|
||||
|
||||
/*
|
||||
|
|
@ -1304,7 +1304,7 @@ static void gen9_dbuf_disable(struct intel_display *display)
|
|||
{
|
||||
gen9_dbuf_slices_update(display, 0);
|
||||
|
||||
if (DISPLAY_VER(display) >= 14)
|
||||
if (HAS_PMDEMAND(display))
|
||||
intel_pmdemand_program_dbuf(display, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ intel_pmdemand_update_phys_mask(struct intel_display *display,
|
|||
{
|
||||
enum phy phy;
|
||||
|
||||
if (DISPLAY_VER(display) < 14)
|
||||
if (!HAS_PMDEMAND(display))
|
||||
return;
|
||||
|
||||
if (!encoder)
|
||||
|
|
@ -174,7 +174,7 @@ intel_pmdemand_update_port_clock(struct intel_display *display,
|
|||
struct intel_pmdemand_state *pmdemand_state,
|
||||
enum pipe pipe, int port_clock)
|
||||
{
|
||||
if (DISPLAY_VER(display) < 14)
|
||||
if (!HAS_PMDEMAND(display))
|
||||
return;
|
||||
|
||||
pmdemand_state->ddi_clocks[pipe] = port_clock;
|
||||
|
|
@ -324,7 +324,7 @@ int intel_pmdemand_atomic_check(struct intel_atomic_state *state)
|
|||
const struct intel_dbuf_state *new_dbuf_state;
|
||||
struct intel_pmdemand_state *new_pmdemand_state;
|
||||
|
||||
if (DISPLAY_VER(display) < 14)
|
||||
if (!HAS_PMDEMAND(display))
|
||||
return 0;
|
||||
|
||||
if (!intel_pmdemand_needs_update(state))
|
||||
|
|
@ -404,7 +404,7 @@ intel_pmdemand_init_pmdemand_params(struct intel_display *display,
|
|||
{
|
||||
u32 reg1, reg2;
|
||||
|
||||
if (DISPLAY_VER(display) < 14)
|
||||
if (!HAS_PMDEMAND(display))
|
||||
return;
|
||||
|
||||
mutex_lock(&display->pmdemand.lock);
|
||||
|
|
@ -637,7 +637,7 @@ void intel_pmdemand_pre_plane_update(struct intel_atomic_state *state)
|
|||
const struct intel_pmdemand_state *old_pmdemand_state =
|
||||
intel_atomic_get_old_pmdemand_state(state);
|
||||
|
||||
if (DISPLAY_VER(display) < 14)
|
||||
if (!HAS_PMDEMAND(display))
|
||||
return;
|
||||
|
||||
if (!new_pmdemand_state ||
|
||||
|
|
@ -660,7 +660,7 @@ void intel_pmdemand_post_plane_update(struct intel_atomic_state *state)
|
|||
const struct intel_pmdemand_state *old_pmdemand_state =
|
||||
intel_atomic_get_old_pmdemand_state(state);
|
||||
|
||||
if (DISPLAY_VER(display) < 14)
|
||||
if (!HAS_PMDEMAND(display))
|
||||
return;
|
||||
|
||||
if (!new_pmdemand_state ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user