Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3090631rwb; Mon, 15 Aug 2022 17:53:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR45h5axySl+oJr+pNTZ0zbnM3pwg2juG8UsZdH+eR7S2GSjUjYe/O0HLsG7Yd+T224RCanR X-Received: by 2002:a17:907:9802:b0:730:c005:5d52 with SMTP id ji2-20020a170907980200b00730c0055d52mr11938365ejc.120.1660611233825; Mon, 15 Aug 2022 17:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611233; cv=none; d=google.com; s=arc-20160816; b=loGpExuZu70o5LWkovlshPl21GN4Lj0Sv81tni2wDNyX/RMXfRFH+i1PJkpCJpjcQx 9CbMcnsKkqopm0QQaMXeI4aWzGRNsxaNMjOxzY+TGTXSAldsWATGgqxLMo4YbASCqjXp e3GNuNmhrkIV6oQRUPGaDJ+HdVpjMzmv5fksSDNTU8dvcUnMHCEnAaOeONHp3phxC/QW AfxhjC134hkZHyrOvTaTVKmNj4SzNdiaqS5EC6+OHvqvb2FrldywSZY7aMwBJn6h9Lq0 7JguJzcgLrjF9GOjOSecUQsWr1b9yXjgulIYRe0GPZ5TPZLR+sDS6lVPoOkJofFHfzId AinA== 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=cb9DYntsTPTOASlBK3OkJ2GHhnSySAmX72b87Jn5/+w=; b=OBvWKy+mxqWSUecyRbxUivjvqM0MTXCdrtpe48n9FSpEF0Z+pM6w7kZHsuAahIGdxo 2Paf+q0fN74kTy/MU6scmMEaC9mGfH6rE8qDCgYTUrU+1EwIka3WEX2wMDrCFkscJkKI PlwptX86iaZPQFPorm7TbxwOcbE7Z1sChquj557Oc8HhG6Dx6PB6SpweKk3GltrfBpid n3ah2cT5ctaWH7fVfv1GxdRjbAvG/hnwQSfvCt1HA8d0GwVNZDp2uDY57zng6Gt6sJyC 6r3zz1LDPxa7MeRAphFZ3wC0ESav6kk5IvVRzAEQUs8CDzG9GkHzs6G9d1iPwANroIg/ /fSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BupXyloc; 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 i3-20020a1709064fc300b007306307b9bbsi6549805ejw.788.2022.08.15.17.53.28; Mon, 15 Aug 2022 17:53:53 -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=BupXyloc; 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 S1354910AbiHOXqs (ORCPT + 99 others); Mon, 15 Aug 2022 19:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354330AbiHOXlx (ORCPT ); Mon, 15 Aug 2022 19:41:53 -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 26D6C2C670; Mon, 15 Aug 2022 13:12:47 -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 B837F6077B; Mon, 15 Aug 2022 20:12:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6078C433C1; Mon, 15 Aug 2022 20:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594366; bh=OzJrhHoWezHSiKoUoOVlcSSDC8fVKfDYPyy4cgaLBnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BupXyloczGEliip6uj4sH/RhTDPYbQHgzTWqiBKPRxCEOkBV2Zvvl6xRpDmOxkUdn riuDL4NVbsr0OMFJOfOnD3eWFfTY988GFRuznx3WGcZRtqd8lQA7e5uHddJdLyQpDY kXhCcUJT5wQMPuqD4+OxcBTlGiZy4GELFdz+KeJ0= 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.19 0423/1157] drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes Date: Mon, 15 Aug 2022 19:56:19 +0200 Message-Id: <20220815180456.592927553@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 3829e13c8627..ad7fcfa5a068 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1040,13 +1040,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 long flags; unsigned char gcp; -- 2.35.1