lkml.org 
[lkml]   [2024]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drm/ast: Fix soft lockup
From
Hi,

Thanks for your patch.
I'm wondering how you can trigger this infinite loop ?

Also this looks like a simple fix, that can be easily backported, so I'm
adding stable in Cc.

If Thomas has no objections, I can push it to drm-misc-fixes.

Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>

--

Jocelyn

On 25/03/2024 04:35, Jammy Huang wrote:
> 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


\
 
 \ /
  Last update: 2024-05-27 16:10    [W:0.069 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site