[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebc6bdba345238ddb0a83e269687007aa3c779b5.camel@perches.com>
Date: Wed, 05 Dec 2018 07:53:27 -0800
From: Joe Perches <joe@...ches.com>
To: Sasha Levin <sashal@...nel.org>, stable@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: "Y.C. Chen" <yc_chen@...eedtech.com>,
Dave Airlie <airlied@...hat.com>,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH AUTOSEL 4.19 100/123] drm/ast: fixed reading monitor
EDID not stable issue
On Wed, 2018-12-05 at 04:35 -0500, Sasha Levin wrote:
> From: "Y.C. Chen" <yc_chen@...eedtech.com>
[]
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
[]
> @@ -973,9 +973,21 @@ static int get_clock(void *i2c_priv)
> {
> struct ast_i2c_chan *i2c = i2c_priv;
> struct ast_private *ast = i2c->dev->dev_private;
> - uint32_t val;
> + uint32_t val, val2, count, pass;
> +
> + count = 0;
> + pass = 0;
> + val = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4) & 0x01;
> + do {
> + val2 = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4) & 0x01;
These could have been simpler as bool using BIT
val = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) & BIT(4);
etc...
Powered by blists - more mailing lists