From: Jammy Huang <orbit.huang@gmail.com>
To: tzimmermann@suse.de, jfalempe@redhat.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@redhat.com, airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Jammy Huang <jammy_huang@aspeedtech.com>
Subject: [PATCH] drm/ast: Fix soft lockup
Date: Mon, 25 Mar 2024 11:35:15 +0800 [thread overview]
Message-ID: <20240325033515.814-1-jammy_huang@aspeedtech.com> (raw)
Avoid infinite-loop in ast_dp_set_on_off().
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
---
drivers/gpu/drm/ast/ast_dp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c
index ebb6d8ebd44e..1e9259416980 100644
--- a/drivers/gpu/drm/ast/ast_dp.c
+++ b/drivers/gpu/drm/ast/ast_dp.c
@@ -180,6 +180,7 @@ void ast_dp_set_on_off(struct drm_device *dev, bool on)
{
struct ast_device *ast = to_ast_device(dev);
u8 video_on_off = on;
+ u32 i = 0;
// Video On/Off
ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xE3, (u8) ~AST_DP_VIDEO_ENABLE, on);
@@ -192,6 +193,8 @@ void ast_dp_set_on_off(struct drm_device *dev, bool on)
ASTDP_MIRROR_VIDEO_ENABLE) != video_on_off) {
// wait 1 ms
mdelay(1);
+ if (++i > 200)
+ break;
}
}
}
base-commit: b0546776ad3f332e215cebc0b063ba4351971cca
--
2.25.1
next reply other threads:[~2024-03-25 3:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 3:35 Jammy Huang [this message]
2024-03-27 8:53 ` Jocelyn Falempe
2024-03-27 20:28 ` Thomas Zimmermann
2024-04-01 2:20 ` 黃立銘
2024-04-02 9:54 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240325033515.814-1-jammy_huang@aspeedtech.com \
--to=orbit.huang@gmail.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jammy_huang@aspeedtech.com \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®