Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp293746rdb; Sat, 16 Dec 2023 08:29:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeQVksToWNAj5iCn8HMDJu8nlRBYVA/hStjolcK+UuHRwKzBPi9WkwpnZfvIR/0j53NkyZ X-Received: by 2002:a92:cd8f:0:b0:35d:5d53:eae8 with SMTP id r15-20020a92cd8f000000b0035d5d53eae8mr19242158ilb.62.1702744155719; Sat, 16 Dec 2023 08:29:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702744155; cv=none; d=google.com; s=arc-20160816; b=iTpQ6uchAlMcttGKP0jwR+eq82bdhz7ys/pcvU7uK6q/ssgCrYIx8Wx5F45JFdVFaH 7NMXo5J+2cym6Idd6UdiHg2m0kZqM8EVlD+WGE71EXb9RY9Ycq60dvYu87J298WI4U5A +zItsuZxNtW+l84tRq9q6eRDpSx+58c1UDGNjZxlyHM8zyga+3UlzwoI01in4u5d3FnN DC1IEYtRvNxHtS7JxXPb2Tfqh6pZitZbRmiixdmWMx3uLpxRlXR18QbWibsnuH3qL3K2 rn1L9jFvgzHJDmRabd0hdAmBGJ5iacYaOVqmwgTysrKClGrfEOeQoZIjj+hJZyDU9The KMGA== 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=qyAWfNkXQL+v/gZSDlmmFF5ztG5yHb26ZkJxvxzB8Hc=; fh=3pXLQkDnu6mfL79fDWl5gUQ2rlGZpcfH88MDE/DTze4=; b=VRUqMrSFVmyeB5azGu7ppXbzzYm3UauDrciKWtKIiGtdhl13/WEdtM8ZO6N44sAEyz wXdltQ3IIqwBmYsUCJUSimt1Qx+tyDh5uMQ5psYdHxxGQzkFYmsJ/FeigdFhKac24KNx AzGFhnvIYizWu6keBC1wla29BynysOQzjb4LpbU4iwJZ6Fge4FPl+HZTzA7vlO2N2C6+ bdLNVtWSYuQMBPDFPbsFKX6km9Xwwub4FGgiDEnqtbKAJ58Es0wOy2fQ/e2mXQrJ9sna DKMjjZLC12XBFmXyA5y5nz34xeEQkjAWxmgSY1fRxOAM6q4TXHDFhczKzbmLz26DQuS6 a8IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MTLyyQTy; spf=pass (google.com: domain of linux-kernel+bounces-2252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2252-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c18-20020a170903235200b001d08a8c56a7si8401050plh.279.2023.12.16.08.29.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 08:29:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MTLyyQTy; spf=pass (google.com: domain of linux-kernel+bounces-2252-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2252-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 89C1AB23C38 for ; Sat, 16 Dec 2023 16:28:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D5C831A8E; Sat, 16 Dec 2023 16:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MTLyyQTy" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 90DB230D1B; Sat, 16 Dec 2023 16:27:09 +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-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-54c7744a93fso2051734a12.2; Sat, 16 Dec 2023 08:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702744028; x=1703348828; 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=qyAWfNkXQL+v/gZSDlmmFF5ztG5yHb26ZkJxvxzB8Hc=; b=MTLyyQTyFUzMRpweOwN2a4P2t6HZlLsvqYYCzfi5ACj/FoJB7OPE/VxNKS1i5I1N7b UW3wpFOkZXX4uKUEhIMBuosEDvUZEKYA73lEESiZQy709pH1UAtjyT9bb6QVJv1MGmZL t3fPSVS6DJ4bJCSgFWvJ4vO5tTrVbDAeQ5lA+MJLGCmLfMatZ39zu//YbXMR5QAV2oga TbNw3EWQCsjReb0xOJpA9lZVjtGdHVZ5W98IDKxWeZpJ/TskKJWEprcWNUHBEXfPiC2T 5pl52dxrovT/7ZkgfEUFguRGimXLs5iMAmcx1Pza0sGv3asdSjpRQt5AuIST/6lWnwlb JbyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702744028; x=1703348828; 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=qyAWfNkXQL+v/gZSDlmmFF5ztG5yHb26ZkJxvxzB8Hc=; b=D2HDZ5F9xsi9ODeoGbuJuUcMpFXwDBa9XeSuFZXAAXFElI+JFWeME1aE5/HlWlrAOp tZpxl4ch/3ibwGywpb4gYlKqxLUlXzUFtkIhnaPagqtQSpYrg4XB0NSbBbs1BCx0Y/ZV nY6UR9UPCITb1eUWiBki9GyQ+eVbEa2F8K8I70InlxtOSV2oUkMmjoVRZvnm9KFFwE/B NJhavkr/4dNxGUc92F6XxtJdKCgObznpzpLZqr7B6y0Ue7ZtjWOZBS0fGIp8ZcLryAwM HUflKt7OFmsenPO2rD303zKet0aHlHI8FFZzsrdY3+3mJoYlSueBV03FRRb+HKg4p0Jh gujw== X-Gm-Message-State: AOJu0Yx3s3lFrHjkV6ROrWeAphS6T0TYitsuVrfWyMHKnKd0oF1Z584N 2xh6gpsD9Y8rRiUsdb2xYg== X-Received: by 2002:a17:906:6a1d:b0:9c2:2d0a:320c with SMTP id qw29-20020a1709066a1d00b009c22d0a320cmr8522242ejc.46.1702744027873; Sat, 16 Dec 2023 08:27:07 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:e807:d345:6f47:1db9]) by smtp.gmail.com with ESMTPSA id st10-20020a170907c08a00b00a1cd0794696sm11990362ejc.53.2023.12.16.08.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 08:27:07 -0800 (PST) From: Alex Bee To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: David Airlie , Daniel Vetter , 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 v2 03/27] drm/rockchip: inno_hdmi: Fix video timing Date: Sat, 16 Dec 2023 17:26:14 +0100 Message-ID: <20231216162639.125215-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231216162639.125215-1-knaerzche@gmail.com> References: <20231216162639.125215-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 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