Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2818204rwb; Mon, 15 Aug 2022 11:59:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR63I36w9Dh1N/o9VwaVb7creGj+ICvlEFemzmGCFBIiO9FZtllu+6F/V3lYRcayF1VSbM/p X-Received: by 2002:a05:6402:496:b0:443:a5f5:d3b with SMTP id k22-20020a056402049600b00443a5f50d3bmr7132496edv.331.1660589959909; Mon, 15 Aug 2022 11:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589959; cv=none; d=google.com; s=arc-20160816; b=V92Pb7pmq/Tcz8oe+v1YMJBezRaZO/xSfeQoeDQipti9f5K2S73X7EKUoWNGh6n4Dx H3JjdAN+Da1fbU2eD8M4QeklnMSzSPDhzySvPGDuEfP2hO5riVPNU7T8X5vmxc5cwM9K 133ryGIYFDhvJcnsxF1L8hcyLHo7qxHlQTAWdX7uwKptAGUfITfTwszUWBC8n6eexwUW 7wXrAcWPmyjMqPhGn+HeR3+RB50YLjgsXSYpIR7zP2GKXIWN1xGuA1Si3tDIgh5zCJVq q0UOPmd/ke4o+bv/zRot1IwOW0JDyXtvUrKKpD+nJXXDPnK2nM/ufEr6m86BZhSqOTsp drQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=951+fm9tJHGgDi95AwkMEcbkscZvEFyTsV1kgORZ4Zk=; b=OwrYkI/lpZi3D2RQ46m9PUaA5VTRNMAZmlNeRxVP+4Hu4rBsvysYmHh7hU7brG5NSq 4Ax49Fubnxm2cWqbw7A7Gj7XWNoLS3XfWkky4Vs/jkQQbBcnuR6HP4640GrukgHQ8SLc +B/VhJQdGLsDeNMt84MPrywxar+5lqbtx4julkOTEh33frhSGtUEAz0Qehd7xt4CMKCY /TL2J2Nzzkg27tYR1mObQmBLJQmWVszPjJJZcpaTQbqIEvFm5EUw+VVbIpoUTkz9Skz7 9tL/G//VOGwzDM0QpjDANvs0sKZSEPbpa+vagVlK5imCUFUm+smyHmbv7MBgGw6H4b5V fHNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vIUw+vOR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz1-20020a1709072ce100b00734be0cf548si8856701ejc.729.2022.08.15.11.58.37; Mon, 15 Aug 2022 11:59:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vIUw+vOR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244464AbiHOSx5 (ORCPT + 99 others); Mon, 15 Aug 2022 14:53:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244429AbiHOSvI (ORCPT ); Mon, 15 Aug 2022 14:51:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E66245996; Mon, 15 Aug 2022 11:29:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 78E8B6101F; Mon, 15 Aug 2022 18:29:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 690D6C433B5; Mon, 15 Aug 2022 18:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588145; bh=ANCbfLTy2qe8P5vzzrHbpl5shPffVIXQhslF+WBvc9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vIUw+vORXS+W6UWpSVAYiDWwWtpJtv95DIRvA2Fg9yHJWizZSOBMlzul/cOMWRxcZ oz8l7ER2iMZ/jY/fcVWOyjPH7lH9dxvEGVsOrzIQIdrdBJ6+hWb2oGNyLusK7Kk3VP VtnE5UBmtHVHAW/hl0+TYJNYvGMAvqQtdcAF/3yk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Stevenson , Maxime Ripard , Sasha Levin Subject: [PATCH 5.15 309/779] drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes Date: Mon, 15 Aug 2022 19:59:13 +0200 Message-Id: <20220815180350.498952673@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Stevenson [ Upstream commit fb10dc451c0f15e3c19798a2f41d357f3f7576f5 ] For interlaced modes the timings were not being correctly programmed into the HDMI block, so correct them. Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers") Signed-off-by: Dave Stevenson Link: https://lore.kernel.org/r/20220613144800.326124-33-maxime@cerno.tech Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index ddcead896fe8..10cf623d2830 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -783,13 +783,13 @@ static void vc5_hdmi_set_timings(struct vc4_hdmi *vc4_hdmi, VC4_SET_FIELD(mode->crtc_vsync_start - mode->crtc_vdisplay, VC5_HDMI_VERTA_VFP) | VC4_SET_FIELD(mode->crtc_vdisplay, VC5_HDMI_VERTA_VAL)); - u32 vertb = (VC4_SET_FIELD(0, VC5_HDMI_VERTB_VSPO) | - VC4_SET_FIELD(mode->crtc_vtotal - mode->crtc_vsync_end + - interlaced, + u32 vertb = (VC4_SET_FIELD(mode->htotal >> (2 - pixel_rep), + VC5_HDMI_VERTB_VSPO) | + VC4_SET_FIELD(mode->crtc_vtotal - mode->crtc_vsync_end, VC4_HDMI_VERTB_VBP)); u32 vertb_even = (VC4_SET_FIELD(0, VC5_HDMI_VERTB_VSPO) | VC4_SET_FIELD(mode->crtc_vtotal - - mode->crtc_vsync_end, + mode->crtc_vsync_end - interlaced, VC4_HDMI_VERTB_VBP)); unsigned char gcp; bool gcp_en; -- 2.35.1