[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ecb98c83-3906-6111-712d-ddfdeac1607f@infradead.org>
Date: Fri, 25 Dec 2020 08:47:19 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Defang Bo <bodefang@....com>, airlied@...ux.ie, daniel@...ll.ch
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] drivers/gpu/drm/ast: Fix infinite loop if read fails
On 12/25/20 12:13 AM, Defang Bo wrote:
> [Why] Similar to commit <298360af3> ast_init_dram_reg() configures a window in order to access BMC memory.
> A BMC register can be configured to disallow this, and if so, causes
> an infinite loop in the ast driver which renders the system unusable.
> [How]
> Fix this by erroring out if an error is detected.
Hm, it appears that all this patch does is change spaces to tabs...
> Signed-off-by: Defang Bo <bodefang@....com>
> ---
> drivers/gpu/drm/ast/ast_post.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
> index ef19c70..86e4d23 100644
> --- a/drivers/gpu/drm/ast/ast_post.c
> +++ b/drivers/gpu/drm/ast/ast_post.c
> @@ -302,13 +302,13 @@ static void ast_init_dram_reg(struct drm_device *dev)
> ast_write32(ast, 0x12000, 0x1688A8A8);
> do {
> if (pci_channel_offline(dev->pdev))
> - return -EIO;
> + return -EIO;
> } while (ast_read32(ast, 0x12000) != 0x01);
>
> ast_write32(ast, 0x10000, 0xfc600309);
> do {
> if (pci_channel_offline(dev->pdev))
> - return -EIO;
> + return -EIO;
> } while (ast_read32(ast, 0x10000) != 0x01);
> }
>
>
--
~Randy
Powered by blists - more mailing lists