Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2578953lqp; Mon, 25 Mar 2024 03:21:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVWdIq9nZUw/oNqhu9lGB0vwaDe/uvjHkTq+HmD1xIeJ1v6uDjdjUtv+xLTu5rKUH4QMvGHgCUJJM5jRdqnnZ9kJHT+x6a1mrpt02acpQ== X-Google-Smtp-Source: AGHT+IF3gPVruKq6AbiJk+jjQFF6NJYdLh6EwwG5puagSUz3DA3k3SjMlzkK5L2j3PKdRq/q7Lsp X-Received: by 2002:ad4:4eaa:0:b0:696:8feb:d54d with SMTP id ed10-20020ad44eaa000000b006968febd54dmr2488299qvb.26.1711362060069; Mon, 25 Mar 2024 03:21:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711362060; cv=pass; d=google.com; s=arc-20160816; b=ARNLkhSTywFigkL0Q501iv26mfsz+B5JQvgbX0NOo+zI62XxqD1CSkke2knth7Kczu H4pw/j9kHrrkEsixxAsgg54BssNfDZo5WlIwlQHNJaa5Sng5A0snG4VJc+iVCdcKlM5c 25g4gzWDojVq85o6f/6vOcl1pde4Bw4L4XIwXfn/DiSIUCa9pQ/DZ1FEAK92Dj46bwn+ JYAn0+/9F7VPqf5bju44egZQwqzzEzI5fG+v2mttQQdtvAMpNaEMayhWjeADTqTpYg+g BRp3z6Qdt94gZwSAmJ/MZCu9JnQ2ForOawnxKrd1VDTNhITI8yApCbMyHfyQayynBMvK 45zA== 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=ZvVwdZ4wG0MnmU3bIkpD6N2j6Aq2HubF14I1f8A5FCg=; fh=WaNqIrgnltBrtAiVlBEigLrmBS1NhI64DTWX55ax8hg=; b=FpOASC1sEtG8LLSUbvddlH5urP0P0Sff2wbrHILedExzkMNb+WgHTf3ASrdMXoV3b+ uvxNSX0DXfVJYmLHHprNVLjmTFZn5ZSNSHCp6Gty3Kpa2sICB/kUBzAKuXac0tnMpott bcfFe68QYpy21E/OCzBqyQLdz0Cb+zrVfB2nk6zIyFAlaHa3BxzrArL+FCp+oaTORpXC Annsm2EuoJFfx/SaEHLfsOkkR8psw1Z0+hiJQk0OPnxd5dSM+f+JD8kPXIOYlMZzwDQx zdwOk2q2plQKFByRw2Vb+pn8Xge9Elu4qDotQjrXbK/D8LFjB/nf9+QuU6GOyNk7VlsH TEoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r9J2Qm4y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116166-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 dt48-20020a05620a47b000b0078a20dde744si5289144qkb.738.2024.03.25.03.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:21:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116166-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=r9J2Qm4y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116166-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 C7D621C32D25 for ; Mon, 25 Mar 2024 10:20:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B4A73B5091; Mon, 25 Mar 2024 03:32:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r9J2Qm4y" 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 A2D15282A84; Sun, 24 Mar 2024 23:42:23 +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=1711323744; cv=none; b=c944qTBnavsqgnHZjrs03THp0g1xFkTR6aWPaqc/5BOKyPRD2KFD9OeueM2unEDwBxoP06M+JijJ5RXrrAUwfLCeCQCwo1FgIisB9SlylBTD9h+JpBKzzl9zTKv5yvkms4/HHFUHCOvKy5pvI6SGoXMJvnyf3MYawWHhRGp/GdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323744; c=relaxed/simple; bh=hHsHjQUDMUNwTrq8KfLKMh80GfvG17A8FJ8f8Y0O8Us=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cWb8+IWhJ3sT2wgbWPLUw81+9g5/pH9wp8DQn0+jqrUD/7b7Fm62gDOuNFuGQaiX42ohz/4kDQwMtPDywsGf6tm1Jsz5KP6XSQsOGtWUc5hkK7cRH0U5Z7cS/hMV9mc6zADaeBnEw2089agK1CelY0Sqn7JXuf2OStOL6/K4iWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r9J2Qm4y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB2A1C43330; Sun, 24 Mar 2024 23:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323743; bh=hHsHjQUDMUNwTrq8KfLKMh80GfvG17A8FJ8f8Y0O8Us=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r9J2Qm4y+mSojYLrQ68OvSe4dHma3U6AlgmfV14ktQHugjwDlWnLfFFjT8eebl/w1 XFeGj10/YlBMZU+BjvxY2AIay0E5PrPbQ000nCubZkyjTRmbX5fmpGBsbixuV9CSML b/M0au2lsk3BWWrRj3hmxusHtcUyGzblqtIMSZvQ6zc+4aWDQjYBeMWJoKxfzi28w0 5Lb40Eq2f+FgpenmTDmZqSLaHtPxbzMB/wUsuNIBMnJjWtUSWgXY3yL0EwbhEPhmxe 3wukfn9Hu5jTNMXSpcU3/VATvwRip9dPQzdg5wQZNMYd+Ty/YqqUo+M3kcLbPLT3Z/ PsyS07pg6NQLg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Bee , Zheng Yang , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.10 118/238] drm/rockchip: inno_hdmi: Fix video timing Date: Sun, 24 Mar 2024 19:38:26 -0400 Message-ID: <20240324234027.1354210-119-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 78120da5e63aa..27540d308ccb9 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -402,7 +402,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); @@ -417,7 +417,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