mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 12:11:59 +02:00
drm/i915/power-well: use generic poll_timeout_us() instead of wait_for() for DKL PHY
Prefer generic poll helpers over i915 custom helpers. The functional change is losing the exponentially growing sleep of wait_for(), which used to be 10, 20, 40, ..., 640, and 1280 us. Use an arbitrary constant 100 us sleep instead. The timeout remains at 1 ms. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://lore.kernel.org/r/663c9edf4a98b09121d7200f8d734ebc829da85b.1756383233.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
c698a48e9f
commit
a8eb4cdced
|
|
@ -3,6 +3,8 @@
|
|||
* Copyright © 2022 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/iopoll.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_irq.h"
|
||||
#include "i915_reg.h"
|
||||
|
|
@ -527,6 +529,8 @@ icl_tc_phy_aux_power_well_enable(struct intel_display *display,
|
|||
const struct i915_power_well_regs *regs = power_well->desc->ops->regs;
|
||||
bool is_tbt = power_well->desc->is_tc_tbt;
|
||||
bool timeout_expected;
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
icl_tc_port_assert_ref_held(display, power_well, dig_port);
|
||||
|
||||
|
|
@ -553,10 +557,11 @@ icl_tc_phy_aux_power_well_enable(struct intel_display *display,
|
|||
|
||||
tc_port = TGL_AUX_PW_TO_TC_PORT(i915_power_well_instance(power_well)->hsw.idx);
|
||||
|
||||
if (wait_for(intel_dkl_phy_read(display, DKL_CMN_UC_DW_27(tc_port)) &
|
||||
DKL_CMN_UC_DW27_UC_HEALTH, 1))
|
||||
drm_warn(display->drm,
|
||||
"Timeout waiting TC uC health\n");
|
||||
ret = poll_timeout_us(val = intel_dkl_phy_read(display, DKL_CMN_UC_DW_27(tc_port)),
|
||||
val & DKL_CMN_UC_DW27_UC_HEALTH,
|
||||
100, 1000, false);
|
||||
if (ret)
|
||||
drm_warn(display->drm, "Timeout waiting TC uC health\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user