Commit 4cfe75f0 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/ast: Fix DRAM init on AST2200

Fix the test for the AST2200 in the DRAM initialization. The value
in ast->chip has to be compared against an enum constant instead of
a numerical value.

This bug got introduced when the driver was first imported into the
kernel.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Fixes: 312fec14 ("drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2)")
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.5+
Reviewed-by: default avatarSui Jingfeng <suijingfeng@loongson.cn>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com> # AST2600
Link: https://patchwork.freedesktop.org/patch/msgid/20230621130032.3568-2-tzimmermann@suse.de
parent 731f4ab5
...@@ -291,7 +291,7 @@ static void ast_init_dram_reg(struct drm_device *dev) ...@@ -291,7 +291,7 @@ static void ast_init_dram_reg(struct drm_device *dev)
; ;
} while (ast_read32(ast, 0x10100) != 0xa8); } while (ast_read32(ast, 0x10100) != 0xa8);
} else {/* AST2100/1100 */ } else {/* AST2100/1100 */
if (ast->chip == AST2100 || ast->chip == 2200) if (ast->chip == AST2100 || ast->chip == AST2200)
dram_reg_info = ast2100_dram_table_data; dram_reg_info = ast2100_dram_table_data;
else else
dram_reg_info = ast1100_dram_table_data; dram_reg_info = ast1100_dram_table_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment