Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2381080lqp; Sun, 24 Mar 2024 16:54:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUv6ZaiEW5bc+ZnF9E4E80jCcq6MUQubMgMj9utOCzTbhCHdJL68Eez0ZS5IYJwI1VCcW76FiuvNICUWpPkh4Qus2Sat2pYq9Fdk9aXlg== X-Google-Smtp-Source: AGHT+IF6mPmNM3cffBEcuBwz+U02wENgnaDx/dLJXJnq+dIvuy2plxpoHDNfnXuPAdK5ciWMtawP X-Received: by 2002:a05:6214:4115:b0:696:89e1:9416 with SMTP id kc21-20020a056214411500b0069689e19416mr3230113qvb.11.1711324442362; Sun, 24 Mar 2024 16:54:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711324442; cv=pass; d=google.com; s=arc-20160816; b=k+V+5xoDuAWaGDZs6ztG8zYuEzWvIwNmJrCZ2LYnoz5aGMaPjBna4OrgBnNtsjTcf6 CYs3I2wsTcGg19Bg0uBCaA5ZEODx27njYzEnfnTUx2skNXSeXHe5vv/+IxTXnBG/pY2r GU7Di/4YY0BC2tsfGvb33cbQd7WwZAblvAPSXPizZRELYb/Vs6bkz6wo2G3LJCGyXS1X F+tRfAb0NSKPRkXy566JPlRP6uvm+WJzjLYZtHzLNBTcIaBF8yVf59TvSJyUetSEl8Xj hz0G+MvJQ8rwI/HjkoRXDEeSwenrZ6OH8is7o+rqXAFms0QOTTgtpMMfumZV3l7tJBtf BIug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=V7OlmytgEYgFBLX0DJBnctOmJYwjI5U2DOLf161nkgs=; fh=WaNqIrgnltBrtAiVlBEigLrmBS1NhI64DTWX55ax8hg=; b=bHOwmwhd37J8YW3vLnDtaYJJekqnGYckIXK5CLVgedKKu46byrX4HI+2+KLWRENnaq s81MJa7jtUvCLr4lKFFWttmaGf6dnKMWhyGlIRvaAKh0UV6j3h60p/KF/qViD15AiF6u Gn24BERZWsxY04tkG3t2PkBzdfwmQFbFnH0V+gYZjPDG4ydZwdEt53gnp9dXWLDroBd9 T6EUW10LuSHs7c5fCWaBytZWkR3lgWC22tYBbqvjGobEdeKcdmu1uQxgaJH70IPjdBOq nl+ADnemYTGUu/nXoaGO5VccZVXkIozvsMpcgUT7MoIm73yZqoAhbeZS7Gdi+iwmBSNA Dj6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V083HxHh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u5-20020a0562141c0500b00690047b8128si6547153qvc.190.2024.03.24.16.54.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V083HxHh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0EF8F1C22C9A for ; Sun, 24 Mar 2024 23:54:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9783E1869F7; Sun, 24 Mar 2024 22:40:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V083HxHh" 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 95D5F1869CF; Sun, 24 Mar 2024 22:40:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320049; cv=none; b=QV0YdkN1taYHoejtmu1igbA0sFaqRM0pQf9UVL1+zbwFoorYFyUn1ufzVSfcNhZjDMUcXDXnrITfXNvTVg0n2Skwo0fLJxYkyp/ZTYavQyYyF3ZKgtrzK3TVptyRWW8Ap7iaop/gP6iJ2gDiofnkkU9yIW1f4iUYFwba4smHNY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320049; c=relaxed/simple; bh=0I0EZZIC+HExk9WKNgMsmSGsSAveJIuCqA6OB74RttA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VLpygPyiH/6uICgAlXp19InHIQrVMSuJReLkYP3psYVjpp/pvajkZUMH4P2DX7zIQVWNb7WFjHTeBif1rBRehV7zQk8AZwQDtAIge9SND17bfOkTZUm+icYPnyb+FPzHPC6w/E8cGYMXFzEzgrtTiX4qL+BpLSh/8wjQXWvjqAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V083HxHh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BE9CC43390; Sun, 24 Mar 2024 22:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320049; bh=0I0EZZIC+HExk9WKNgMsmSGsSAveJIuCqA6OB74RttA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V083HxHhiO6gRi+WdRi8vv1UNTm9dU+GHOpVcxELOv5hFIlYEI2Z7fDxqpl546NYv v52jCSh+bGkmBpPXNr1BRG9wJnZ/MNqHDl28gFpJEwiM3FP3S37YO1ZqJx0otO/4Dq 4OLCXJayhJ9xsafLhqbrDfrGcm+foDRbpwmSgGWXZ+OB2QKmr5+O3HCFXWpQCFMfT2 8wK3SMUl8y+AwJs3yWx70TPntSVXzxBlfOvK6cwA/tClipMqy0WYMsV916pO3PxnR9 YGAWtpTfE7+2oFPN2Ylx3qCP4GMaUMVgvbcujIzjjts10qlfgkwyZ7lQfn/AXu8yiE VlCXUlRxWkiUw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Bee , Zheng Yang , Heiko Stuebner , Sasha Levin Subject: [PATCH 6.8 358/715] drm/rockchip: inno_hdmi: Fix video timing Date: Sun, 24 Mar 2024 18:28:57 -0400 Message-ID: <20240324223455.1342824-359-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Alex Bee [ Upstream commit 47a145c03484d33e65d773169d5ca1b9fe2a492e ] The controller wants the difference between *total and *sync_start in the HDMI_VIDEO_EXT_*DELAY registers. Otherwise the signal is very unstable for certain non-VIC modes. See downstream commit [0]. [0] https://github.com/rockchip-linux/kernel/commit/8eb559f2502c Fixes: 412d4ae6b7a5 ("drm/rockchip: hdmi: add Innosilicon HDMI support") Co-developed-by: Zheng Yang Signed-off-by: Zheng Yang Signed-off-by: Alex Bee Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231222174220.55249-4-knaerzche@gmail.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/rockchip/inno_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index e6fbe040ccf6a..b66c1ef5838fd 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -411,7 +411,7 @@ static int inno_hdmi_config_video_timing(struct inno_hdmi *hdmi, hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_L, value & 0xFF); hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_H, (value >> 8) & 0xFF); - value = mode->hsync_start - mode->hdisplay; + value = mode->htotal - mode->hsync_start; hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HDELAY_L, value & 0xFF); hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HDELAY_H, (value >> 8) & 0xFF); @@ -426,7 +426,7 @@ static int inno_hdmi_config_video_timing(struct inno_hdmi *hdmi, value = mode->vtotal - mode->vdisplay; hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VBLANK, value & 0xFF); - value = mode->vsync_start - mode->vdisplay; + value = mode->vtotal - mode->vsync_start; hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VDELAY, value & 0xFF); value = mode->vsync_end - mode->vsync_start; -- 2.43.0