Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2566619lqp; Mon, 25 Mar 2024 02:52:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3/h5pmf4KBrauy9mpCcAjdzRimNV4NU+UFcrSfH6cclHZFW7e/1c0bXRJYOFx63rdWX32c51EaCeNPPTt2BCES+YRZKImuJK8MWo1Qw== X-Google-Smtp-Source: AGHT+IFpIZaJY6HsTSK2tIw+cAgarfCCVgMcrPBAgcW7wLgqQdONgerB6VSWRt1V9SPwkrY2cPPe X-Received: by 2002:a05:620a:1222:b0:78a:25de:820a with SMTP id v2-20020a05620a122200b0078a25de820amr6567628qkj.71.1711360324528; Mon, 25 Mar 2024 02:52:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711360324; cv=pass; d=google.com; s=arc-20160816; b=fVAmCCwPc0YKK26thg8V3Z+Hqms+BuVaruS8PhEfSh8Cm2Yodk9Wv5/V9pyVI/hyBn GwZYn4yddWHT+v3JZt3IJjLpAPjD6qJD7xJYM1k0+j1fpRBXLPkRbEPygFS9qAY/54M8 OycghoWqtfnE6PJXPSqmuF8ihkDeDlPKAn3MDtzRktXCjJesmKm5RrUJke3sfomvBva4 hk1pKFqk0eZZKC+/AGefmsLyfTf3zBYzJPqc/9I56Af7vQB4NPEmVt7ZyWRfBXf1V+6l kfAlWwdO2Tt5PKCViWtuP8vLDWeExS92/wM/z3Gin6lmnTsUrMihCOg6vEDQXN2vvIIs DNXA== 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=i/8rMIPZbvAEBL4XbiTnQs0E0I9v1mRt1kWvVGeSY+4=; fh=WaNqIrgnltBrtAiVlBEigLrmBS1NhI64DTWX55ax8hg=; b=gMy02ErTnE4tr9vPXF9+prDeB11teD2bHEr+lUgkLRIwliKFwqHMseKznn7sEAkNl3 pW7xVFuypIa7AsVUuPYkEPzLtP/COB9dsrryu5TXanOOi2M/JZUC1/nL4IVdCmfgT1Go pFjFVyAcMo/gE9aYeEBX9z/n/sd0lXVt2zBWbLoodFHWwwuqFZqNBW8RC7uB3WUC49xm 6jCri+Mbb3YZJUMuW2c166JNgswVZuW2IwitfM9DXHDCdIUgjn1CPmM0PeqoQk9T06Dm T12JePhqkQU24qNpCXO6+NFxe5Oeq5sfHx4rCe4pklZqgYg9u5jt4OyqpHMoDrnftkIb of+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iRZUC7sC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115944-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115944-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. [147.75.199.223]) by mx.google.com with ESMTPS id j10-20020a37c24a000000b00789e743dbd4si4856774qkm.716.2024.03.25.02.52.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:52:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115944-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iRZUC7sC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115944-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115944-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 3C8371C27B23 for ; Mon, 25 Mar 2024 09:52:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02713266A0C; Mon, 25 Mar 2024 03:04:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iRZUC7sC" 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 6862415B578; Sun, 24 Mar 2024 23:16:06 +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=1711322166; cv=none; b=EORAYpvXpDH7gViI7/Bw3qRJqYfUncNGLIYi58IGAMj2VvMbEHMUt1g9iNfyBkPO0X8Rm63M+2Dc0ajqhADsGpPJ/bW0cJVB6F2uG97tlxgeHN7cqndA44ll+YrzMt8CLkjfp7pRZGV8CbDI2prteUOy08MmU+5XTKdPvCt8fc4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322166; c=relaxed/simple; bh=To4HsCrsnedksP+Kzm+hV1nDB+dQos6t+2a1BObyQHs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nYWrEv5a1BWV4HOyqpSj/5W4lh3EkM1oso6Yebup7jGYQ88AFcm3DxzCGoOQgrvsci0Ns5ZPGz3WdIo9UrvmqmIMh8J+xsdABcQ0Mkfra0MlEp6tP2rJZqAQGrv9JyqqaGgsiD+01lJIZGRJEK/S9T+AQBWN7B3sqUts79ZR3Ec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iRZUC7sC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 358DEC433F1; Sun, 24 Mar 2024 23:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322165; bh=To4HsCrsnedksP+Kzm+hV1nDB+dQos6t+2a1BObyQHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iRZUC7sCDcSca5IkcQbYB1eDPrB723ZmevSj5nN08vsEooV3VMAPRuKlj/tvFAds9 q8twoWBnFcyRQTylsfDX2V5SpFxnRk8nknE4tQfJVEjG+3iv+mZHoJMm7myTj1e8zF i86rcwr1ZEiaUDcnpBSAObiht35ErnPOU5KOsc+3hM9LQSBh84vOUKxuRidkHYtXNn iUTCdD7Olvp6RDJHT+DYAXZBk5w6nZ2yD8tVepuxk2yeC/9nApGTZbJvADUiezyr+B xJz9b4orFh+YEiewSFT7X/tur+cPhqfFcTSWdaluBRo8YWoegUYTbvzliITln67y9Y AwutSlykuJaWA== 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.1 244/451] drm/rockchip: inno_hdmi: Fix video timing Date: Sun, 24 Mar 2024 19:08:40 -0400 Message-ID: <20240324231207.1351418-245-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 f51774866f412..8f230f4c01bc3 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