From patchwork Tue Oct 11 23:10:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13004505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10B55C4332F for ; Tue, 11 Oct 2022 23:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IFHQ4BrDidyMvsjOpuvNNFpXUbnBPHvo2XIj1e2gm1U=; b=VsqTRL+IdTy0U3 f5NBQnAnzGd78gnhZoLZMx+avHUxjkTbbbFRlQ4mMe8nDe5D6Srd6IbBgIwxnII5ClG/G9fzHQFaL sSMqsWIYcVqKctFxBQmXty4eBf3rJqI03o/Dp4y3PAUcZ1JSgMgZ5VxwmJbOmAPequjmJN+c6dvii GuPC8CKlNM96p6xvsr1vGuGD/daoYMuvVbueYp8hQg4El1XanHQ2EybTMiOQ0lby4sTZsUQeTGPP3 e2DbHCkKEEfwMaVBMxbELDGeRQlyK6tCO31ivOiPX7l38nuhQyA1XJT8FX4PB/+e+ko0tiYXGiO/U apvCSMwfAj1nlWCR3tNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiOPI-0067q4-UM; Tue, 11 Oct 2022 23:11:29 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oiOPF-0067ms-4x for linux-arm-kernel@lists.infradead.org; Tue, 11 Oct 2022 23:11:26 +0000 Received: from tr.lan (ip-86-49-12-201.bb.vodafone.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4DD3184F00; Wed, 12 Oct 2022 01:11:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1665529864; bh=yEW+tkEuff3nzVnUoqcCLQiVufYXXZ2BrS3mZUbKEg4=; h=From:To:Cc:Subject:Date:From; b=TD6HA8pZ04BZPSoqMyKKwsBkWYydtOo+7QSwXHNShJnz1BlqkKRs6JHLoKQEfmuQR Z1n+DEdkBRAz+4+NSoq5tdajgsaHWBJtZYfU3GUDXvXmPNJTydUP/FnlNxtAg9g5tk nAvl7UStfPDegQ/FYqdAOctTmvK+o9cJryWMG8F2awc+ZQ/G9HqTJPrOJCY1iLanIW 4oMevdAVLJl9+Ji/7jPRPpcZ7/VSHxzw84pYXh3eBwiEW0VxrLGstdF72myXd/4K4m fxVbVn7nEf558nPpttSv1ySoBo2aJ/tfZtUJtprec8fRMVNjRSMgxXYzYoioMegkxF GnJP8TNJzpqbQ== From: Marek Vasut To: dri-devel@lists.freedesktop.org Cc: Marek Vasut , Alexandre Torgue , Antonio Borneo , Benjamin Gaignard , Maxime Coquelin , Philippe Cornu , Sam Ravnborg , Vincent Abriou , Yannick Fertre , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH] drm/stm: Fix resolution bitmasks Date: Wed, 12 Oct 2022 01:10:48 +0200 Message-Id: <20221011231048.505967-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221011_161125_366931_FB3DF1A6 X-CRM114-Status: UNSURE ( 8.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org STM32MP15xx RM0436 Rev 6 "35.7.3 LTDC synchronization size configuration register (LTDC_SSCR)" on page 1784 and onward indicates VSH and similar bits are all [11:0] instead of [10:0] wide. Fix this. [1] https://www.st.com/resource/en/reference_manual/DM00327659-.pdf Fixes: b759012c5fa7 ("drm/stm: Add STM32 LTDC driver") Signed-off-by: Marek Vasut Reviewed-by: Yannick Fertre --- Cc: Alexandre Torgue Cc: Antonio Borneo Cc: Benjamin Gaignard Cc: Maxime Coquelin Cc: Philippe Cornu Cc: Sam Ravnborg Cc: Vincent Abriou Cc: Yannick Fertre Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com To: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/stm/ltdc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 03c6becda795c..639ed00b44a57 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -111,16 +111,16 @@ #define LTDC_L1FPF1R (ldev->caps.layer_regs[24]) /* L1 Flexible Pixel Format 1 */ /* Bit definitions */ -#define SSCR_VSH GENMASK(10, 0) /* Vertical Synchronization Height */ +#define SSCR_VSH GENMASK(11, 0) /* Vertical Synchronization Height */ #define SSCR_HSW GENMASK(27, 16) /* Horizontal Synchronization Width */ -#define BPCR_AVBP GENMASK(10, 0) /* Accumulated Vertical Back Porch */ +#define BPCR_AVBP GENMASK(11, 0) /* Accumulated Vertical Back Porch */ #define BPCR_AHBP GENMASK(27, 16) /* Accumulated Horizontal Back Porch */ -#define AWCR_AAH GENMASK(10, 0) /* Accumulated Active Height */ +#define AWCR_AAH GENMASK(11, 0) /* Accumulated Active Height */ #define AWCR_AAW GENMASK(27, 16) /* Accumulated Active Width */ -#define TWCR_TOTALH GENMASK(10, 0) /* TOTAL Height */ +#define TWCR_TOTALH GENMASK(11, 0) /* TOTAL Height */ #define TWCR_TOTALW GENMASK(27, 16) /* TOTAL Width */ #define GCR_LTDCEN BIT(0) /* LTDC ENable */