From patchwork Wed May 3 11:14:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13230054 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 BFA03C77B75 for ; Wed, 3 May 2023 11:16:08 +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=ZRhl9lZfSxqf57J0Z/WvQ5XGeGMSNcvnBoyXUF8QIgQ=; b=qtUcwAGsU9quFg 5lKT+x5QKBx2KDHKxKC4dhFU9rbIRcGrwd/L+ben7BSwsd7TKB9lP1+mfsgK/vxNlLb6ek61+5Unb 4QVqq/RpMLdD7spnYJyrEi76CXtYF0TSXOat+SiS3ZX3//ZtRj4ZDNu2mktQJmSP9KQXeZcqgJryS asvWR/SWLPTVmo7bl9Lmts3Vs4ZwZ24eRyjJqDvhKVHh2PIKrLSCenXVOKLU/o6sAgw4NODhyjQKz yCV/uAscvbrf2fDbXYBLf6V1rK6xPfN7VgGyNaOZtPoKFoOQViMLmz8Af3DQdeK0QA8x2pROItX80 WtTqctZzx2HowEsokGSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1puARx-004MNl-14; Wed, 03 May 2023 11:15:09 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1puARt-004MLw-19 for linux-arm-kernel@lists.infradead.org; Wed, 03 May 2023 11:15:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1683112505; x=1714648505; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MtY2s3yh1IVnpkcGyb3twXc6KSMhTK5mUaZU6OAmzlI=; b=QGutNJKlMM2LzbyceNkrQxwflccIlS4Ru65PoNAVTR2GM90TqGsWZRPa 2tyfO9+zldG79bBZuJMSL1GKeyL1Sw1rR73xJ+iOfNgWnvwUCR6bpaaay EPdWxtY656CDDUNAOkl2ZE7LYZ6hx+ClBllZkzMIrDTtJeAAH/KlWyD7V 3mP5EC2HxHFfxlEyGJd0vvlKoT6svG+2btGdhDtLqta3eWICTzdbhiW0C 11mgYsF/WXL1TMu+0Tf7hvJ5iTjQx3F4J6/NqdV9sfX9cZGa3Cr28tqb+ RaW91B4li1i41Pk09nvVa86Kt/YVUQZSmsxmamF5/npitdbacrm6Oee8+ w==; X-IronPort-AV: E=Sophos;i="5.99,247,1677538800"; d="scan'208";a="30691588" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 03 May 2023 13:15:00 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 03 May 2023 13:15:00 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 03 May 2023 13:15:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1683112500; x=1714648500; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MtY2s3yh1IVnpkcGyb3twXc6KSMhTK5mUaZU6OAmzlI=; b=GD8jmJ3ggkMO1901Aypfe+0A+yKMjNf8+Zrb+MNajDhm41mM8NCr6TDR nYBPCdwOx6hIulP2jg00UxM3DgAKhatI+HKc8MtaJpltSdtVDv7/+cRzw l+udX7MBrbZROPplokekAm6wbDyrBgMy/8zKTtSjVIenj/CxOjjHWibYX kODZNllwW9Rd0quDK8LwqCbBQmx+mVbgYK+ywWKzOcsExnniB150R08Am joCe8RPdOm2yfou5B7mvLCZjnLQCIphtFpyNx/Uoc3IiJKuTSqefCYi0N tXh7k0004opficrl8KmiP6rrBctbuQLOou/r3nFDTyjSA/+ALKDPbgok6 w==; X-IronPort-AV: E=Sophos;i="5.99,247,1677538800"; d="scan'208";a="30691587" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 03 May 2023 13:15:00 +0200 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 49B2E280056; Wed, 3 May 2023 13:14:59 +0200 (CEST) From: Alexander Stein To: Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Fabio Estevam , Sebastian Reichel Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning Date: Wed, 3 May 2023 13:14:56 +0200 Message-Id: <20230503111456.1748511-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230503_041505_804255_448B3307 X-CRM114-Status: GOOD ( 15.15 ) 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 When hactive is not aligned to 8 pixels, it is aligned accordingly and hfront porch needs to be reduced the same amount. Unfortunately the front porch is set to the difference rather than reducing it. There are some Samsung TVs which can't cope with a front porch of instead of 70. Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix") Signed-off-by: Alexander Stein Tested-by: Ian Ray Reviewed-by: Philipp Zabel --- AFAICS ipu_di_adjust_videomode() checks that front porch is big enough to reduce the alignment difference. drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c index 1d306f7be9fd..341e9125bf2c 100644 --- a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c @@ -311,7 +311,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc) sig_cfg.mode.hactive, new_hactive); dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch); - sig_cfg.mode.hfront_porch = new_hactive - sig_cfg.mode.hactive; + sig_cfg.mode.hfront_porch -= new_hactive - sig_cfg.mode.hactive; dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch); sig_cfg.mode.hactive = new_hactive; }