Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1863639rwb; Fri, 19 Aug 2022 10:38:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR7z7sKkXU56FASfZDMs089VdqNJpvkbsTx4AqpF4AzVqx+pdx7DvNiaqg5jkQZUCBA9nvCe X-Received: by 2002:a17:903:41c6:b0:16e:fb38:e2c7 with SMTP id u6-20020a17090341c600b0016efb38e2c7mr8330058ple.75.1660930716539; Fri, 19 Aug 2022 10:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930716; cv=none; d=google.com; s=arc-20160816; b=Kr1BcECLTPHoTAoGO8SQWCJ1OOdn3/641qB7Z2VDEkKcyElmrMjH+KVy2AnOg5Ovvd 9ZF5Wthjm6JZiUXwRaKF2aeyucsnxEhvR4s6hCjlAFBNezDJlGcHDbbR7eB7dIFcWjab xs9go6y5CPqJaXSov8g2VCi+Wyz5+Y4HwuXU8poVUJbnLvS5/ZpNXtphWbiIQAE68SIg 9ZZDYV/1Nmc5yuD32lWkm4lc+H/jLh9aCMuQHE5lB14jdoQ7/sQUmgAkOUXN3qOp0Kqj IOPCJzcW+o+25uQybqknso7AVtS9QYgpqLeCRNDTAzt4var7i9e5P5M2n6qCindrllxb sZgA== 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=tCQVd4IqFA2tJuN5aalE6tpOZiOyxxdrX9NOv+04Qgw=; b=LXffTKPgvsike4YKE8o+9PaGv4rQLX52m0AQ+sBhgzwo1u4EAZ380UH60Pdy0L4rD+ og2ZV2WURJxqjC+Zwpg9SFNL3PiPO5RGSUe2hd2sPz+g1oC8Z0A3W9uVJTK7B2RC/VBl lNej/Vz9K/pXn6WsmQ8suPvnS9JygfVNKA46pRvRTJ6JSItE5GP/TfXzEYcAsWxfmF0D 24/QfhBCiHJxpR42lfDWcW22JOns9Fbe2vbZhrTZWMH4ABjpKbXd1rQqe0T9Ks5VKf9F aq+49NDTKCe5H6CanzN0rjcEekaRAecJqJK4LRRCMYWa+tBdK01f3QCbZiaNRPkbpEVA 0xhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=alDaY5ie; 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 21-20020a631355000000b00429e6ef0e88si4563127pgt.232.2022.08.19.10.38.25; Fri, 19 Aug 2022 10:38:36 -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=alDaY5ie; 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 S1351612AbiHSQIw (ORCPT + 99 others); Fri, 19 Aug 2022 12:08:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351656AbiHSQGS (ORCPT ); Fri, 19 Aug 2022 12:06:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA39310D59D; Fri, 19 Aug 2022 08:55:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id 29F69B82819; Fri, 19 Aug 2022 15:55:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E273C433D6; Fri, 19 Aug 2022 15:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924541; bh=UkBWJBsPX5cel+6FFhNtQye+XSIHvRfMM+W2Ur21r/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=alDaY5iezDOBdYyu5F46FfVKnRafUofoq5U7uoOBH5gSVwyR9QIinXju3mflWCCRE 80S4yXVi+mOsfbcaC1kHMqF1jEewFO9bERUqLyhswyZvtMYkAIkpHItbvju6mHQ+HU tzVy51sMPSkGWs32AnhUqNK6/rnM9+X8HPWi1xaU= 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.10 204/545] drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes Date: Fri, 19 Aug 2022 17:39:34 +0200 Message-Id: <20220819153838.504850553@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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(-) --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -565,13 +565,13 @@ static void vc5_hdmi_set_timings(struct 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)); HDMI_WRITE(HDMI_VEC_INTERFACE_XBAR, 0x354021);