From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E28346FC9 for ; Sun, 17 Sep 2023 19:37:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 556F4C433C8; Sun, 17 Sep 2023 19:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694979471; bh=pXPb369sNK/PmOUb3CnSmvVUTE05/xbh2CSvGeQjNqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cU4thoZq6geHRb1TSBH1ITUWQe3C37FuKwBHhIFJnLHmnTi8dUnuFw4bi8IbvwM1x x4sh47Y5GuJpqAlBL4trD08WIdLuCYGTSiokDqKku5Lw2wG4chg+Kf5/cAY+a3qW8q WOBGH3xm7F2+t1ZOHRYx0d436zSYXdWr/Y8S4RiI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thomas Zimmermann , Dave Airlie , dri-devel@lists.freedesktop.org, Sui Jingfeng , Jocelyn Falempe Subject: [PATCH 5.10 323/406] drm/ast: Fix DRAM init on AST2200 Date: Sun, 17 Sep 2023 21:12:57 +0200 Message-ID: <20230917191109.824164431@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191101.035638219@linuxfoundation.org> References: <20230917191101.035638219@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Zimmermann commit 4cfe75f0f14f044dae66ad0e6eea812d038465d9 upstream. 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: Thomas Zimmermann Fixes: 312fec1405dd ("drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2)") Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Cc: # v3.5+ Reviewed-by: Sui Jingfeng Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe # AST2600 Link: https://patchwork.freedesktop.org/patch/msgid/20230621130032.3568-2-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ast/ast_post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/ast/ast_post.c +++ b/drivers/gpu/drm/ast/ast_post.c @@ -290,7 +290,7 @@ static void ast_init_dram_reg(struct drm ; } while (ast_read32(ast, 0x10100) != 0xa8); } else {/* AST2100/1100 */ - if (ast->chip == AST2100 || ast->chip == 2200) + if (ast->chip == AST2100 || ast->chip == AST2200) dram_reg_info = ast2100_dram_table_data; else dram_reg_info = ast1100_dram_table_data;