mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
drm/i915/dsi: use generic poll_timeout_us() instead of wait_for_us()
Prefer generic poll helpers over i915 custom helpers. The sleep and timeout remain the same as for wait_for_us(). Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://lore.kernel.org/r/02ebcd2864819b7eaf9cf455aa2b968980a2f671.1756383233.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
e54d34e4b3
commit
17d56494c1
|
|
@ -25,6 +25,8 @@
|
|||
* Jani Nikula <jani.nikula@intel.com>
|
||||
*/
|
||||
|
||||
#include <linux/iopoll.h>
|
||||
|
||||
#include <drm/display/drm_dsc_helper.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_fixed.h>
|
||||
|
|
@ -72,8 +74,12 @@ static int payload_credits_available(struct intel_display *display,
|
|||
static bool wait_for_header_credits(struct intel_display *display,
|
||||
enum transcoder dsi_trans, int hdr_credit)
|
||||
{
|
||||
if (wait_for_us(header_credits_available(display, dsi_trans) >=
|
||||
hdr_credit, 100)) {
|
||||
int ret, available;
|
||||
|
||||
ret = poll_timeout_us(available = header_credits_available(display, dsi_trans),
|
||||
available >= hdr_credit,
|
||||
10, 100, false);
|
||||
if (ret) {
|
||||
drm_err(display->drm, "DSI header credits not released\n");
|
||||
return false;
|
||||
}
|
||||
|
|
@ -84,8 +90,12 @@ static bool wait_for_header_credits(struct intel_display *display,
|
|||
static bool wait_for_payload_credits(struct intel_display *display,
|
||||
enum transcoder dsi_trans, int payld_credit)
|
||||
{
|
||||
if (wait_for_us(payload_credits_available(display, dsi_trans) >=
|
||||
payld_credit, 100)) {
|
||||
int ret, available;
|
||||
|
||||
ret = poll_timeout_us(available = payload_credits_available(display, dsi_trans),
|
||||
available >= payld_credit,
|
||||
10, 100, false);
|
||||
if (ret) {
|
||||
drm_err(display->drm, "DSI payload credits not released\n");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user