Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp48357rdb; Tue, 19 Dec 2023 09:02:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFr3yGitujkxTBN8MfeP2roIgpBErfL1QUXIyIajDkb/3KJfNb9mb83dWmA+0Fb+IUqwB93 X-Received: by 2002:ac8:7f0e:0:b0:421:bb56:abb with SMTP id f14-20020ac87f0e000000b00421bb560abbmr22229848qtk.52.1703005334346; Tue, 19 Dec 2023 09:02:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005334; cv=none; d=google.com; s=arc-20160816; b=WoNO/+7KFH66aSfGfPjVbDyBO4GqMEzEwA8vymA4SLaIXPCpcldc5B4J8H3BF4tV8n nwvviCULBcj22d+fJLSPGtlLIbGfMZgXu6ocBsvUqIk9JAvN7dp079S9u9suD17JwN3x nLAr3jYDWGlmfx37lErw9xMoOPFBlbhLD34yooy1JMfCpHI/LiNtrG1A2hB+zlKxkYhb /3gk8FWVyC5HdHciOQK9V0oE8d7gOo+BBbiaZy97yf2EomRUnOgs1QyQPLbJLt4Q9DV7 dIi5W0JsmWMG3rEN/uitEyIES+V24MbuwfgAyzz00DbzslJ5JTHvK3uj4vNNgtNIKyYa cV+A== ARC-Message-Signature: i=1; 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=uClaQQ2dRjLaUKPRgkZZsqsXWCBLw2oyW3zHKJRRqCQ=; fh=ofylbV+bzQmJfsy0tRuyz0Yfc9dw4CDRyyw48UzeJ8A=; b=j+sHS5mRe4luvd5a+0S1RZpEWkWyi0Lgi+PT06BRuKn5SA6CbWqNRAfiTJbGvh8QKz Gd71r0G7gOSa7ZyrqIc4Vh/VZYqBJV/AtlMoKGOOO7OEGNgylBsiyGcwDVKNppqgXn4b yQQRC5A5zYuaBDWZ7G1GW4NMRx4QgAi13Xmw9rJTHYCXnHJCOWiVLWgoM5gjUSbYUkhQ ABjoFjBgCYxr9SDHOHIeSf6hG/Gbq7I8SaXx3WqHBpXINQnsz1d6kx1NtCjVnNZJNiLH H4HPncm9b/Wy3M1b91c3hdAxBxzo2fs/csLbhVwuJJtcojmflBXeTu1VGTvuQj9EWRNb YlGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PTe2ZN4f; spf=pass (google.com: domain of linux-kernel+bounces-5621-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l11-20020a056102316b00b00466b2bc77d5si248598vsm.268.2023.12.19.09.02.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:02:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5621-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=@gmail.com header.s=20230601 header.b=PTe2ZN4f; spf=pass (google.com: domain of linux-kernel+bounces-5621-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 F2BB81C24CB6 for ; Tue, 19 Dec 2023 17:02:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EADF934568; Tue, 19 Dec 2023 17:01:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PTe2ZN4f" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41BF620DE0; Tue, 19 Dec 2023 17:01:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-40c60dfa5bfso56957465e9.0; Tue, 19 Dec 2023 09:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703005269; x=1703610069; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uClaQQ2dRjLaUKPRgkZZsqsXWCBLw2oyW3zHKJRRqCQ=; b=PTe2ZN4fgiZ06579gZZOQFCsE+SlG3Kij9e/UIQ0/9apXPXF3/qbWInkmFuULsScDJ /Re70XvtGsOHayTMEat3Wug0ZYmpW6viRawc/uYAa8ZCxr0g9h6Zny+N6OD/EZWCyz1G CDB4N3FbQZsOighRD/LmQLQG3g33jn0a3GkY54bkoy6B2KD8VUpeExziEtB7Cdrf0SNC 9oEJ9a5umSP//bXTpGHL5EOuDvJzMYogUrbUYPmXpf6EO7/JNbiftG0vTJST7f71J497 N0vjT0SEQ3ntGASc/R78xhEDmBx6kddHwPBvffBbi3iWYs644/iC9h6UjvCNm2GoFBDf PjFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703005269; x=1703610069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uClaQQ2dRjLaUKPRgkZZsqsXWCBLw2oyW3zHKJRRqCQ=; b=bW1Y65SCECURu4e5Hk+Gyu4Qe72iTlumu8XIFwur5D46l4YFU0wj9xUrU3YqNeX/7G r9ioULlKeY/5AtaSQhtkzdXDAzJBtiEW3/bpkndu1NsWYdbA8GgQyBGH7wI7JpDdAv2j KXTWj+lWVXI64WsQ45uonK0hkH/Z3eY/DKHR2QOHV/5lT+Jg32sriJ9LLVSrVCqLgUaX CzEnZScMHhjYXA7W8/QMtFdU61RwHrpC6jSRodQTKCfHQywpIcVBJ+VY7qzNXMW+CTRe E9znlWCIXCEUapxF/1BQyUKBkRZyAFh+shIbS2y9SJ9pD9EFX+RQAs/HN/+QU4XXZLBA bVSg== X-Gm-Message-State: AOJu0Ywh4o0msj5XGWrm1S+alNffA7+NGDrLEC7IKXQ9K221eYWiSOER XzAAPtAltf0vsjZoEqJW3g== X-Received: by 2002:a05:600c:2212:b0:40c:6160:98f7 with SMTP id z18-20020a05600c221200b0040c616098f7mr5158875wml.17.1703005269466; Tue, 19 Dec 2023 09:01:09 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:7ae5:3e:d1c6:a138]) by smtp.gmail.com with ESMTPSA id i7-20020a05600c354700b0040d2805d158sm3225878wmq.48.2023.12.19.09.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:01:09 -0800 (PST) From: Alex Bee To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Bee , Zheng Yang Subject: [PATCH v3 03/29] drm/rockchip: inno_hdmi: Fix video timing Date: Tue, 19 Dec 2023 18:00:33 +0100 Message-ID: <20231219170100.188800-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231219170100.188800-1-knaerzche@gmail.com> References: <20231219170100.188800-1-knaerzche@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- changes in v2: - none changes in v3: - none 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 6e5b922a121e..345253e033c5 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -412,7 +412,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); @@ -427,7 +427,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