From nobody Fri Dec 19 18:53:48 2025 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V083HxHh" 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: quoted-printable Content-Type: text/plain; charset="utf-8" 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/rockchi= p/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_hd= mi *hdmi, hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_L, value & 0xFF); hdmi_writeb(hdmi, HDMI_VIDEO_EXT_HBLANK_H, (value >> 8) & 0xFF); =20 - value =3D mode->hsync_start - mode->hdisplay; + value =3D 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); =20 @@ -426,7 +426,7 @@ static int inno_hdmi_config_video_timing(struct inno_hd= mi *hdmi, value =3D mode->vtotal - mode->vdisplay; hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VBLANK, value & 0xFF); =20 - value =3D mode->vsync_start - mode->vdisplay; + value =3D mode->vtotal - mode->vsync_start; hdmi_writeb(hdmi, HDMI_VIDEO_EXT_VDELAY, value & 0xFF); =20 value =3D mode->vsync_end - mode->vsync_start; --=20 2.43.0