Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6018019pxb; Mon, 14 Feb 2022 13:14:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAPfpuZpdoeTY1WXsubmDqVbkdXfmC7IeoaE9kYm/GhGgrc6UVcKwpt5inVXcFpmuY6Ds9 X-Received: by 2002:a17:902:7892:: with SMTP id q18mr740744pll.106.1644873289787; Mon, 14 Feb 2022 13:14:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873289; cv=none; d=google.com; s=arc-20160816; b=k7Ngx7BUTpcmuh8Li5WyQByYgVvaBQ+pCMWzXz1wZCjDv6u7rH253kby1g+ywY4Waj RoLvCJFGbVp9orv2twO+091+1rSgEzuspBSb5B0y5YQH2UWNVdVj4vfwb8ZwQYKa3UYx s4OTTJxGlF/Anq91OzHfVmy5Ahx22hg9X5HD6pSDBTsS26L2lDbexxZUtsDUplowbhs/ 2lfmCO7JFUU5M1X9ZkOusFlXG2XgDhjZ/iyQkdnmDD1jcvP53GQMnYsOE31sBag7LVo4 RE9QEcXD+hq6Drpk5BY0GxcbX86x/4zxZXfd3C2CfDmqsylLq3RcTQRG+SD2cpO2hDXs GDVg== 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=l6fiO/wAtv6P5CZNakig1H8qCDAwZqXw2lGipkqSqzE=; b=M7GLmklSgedAekQn3liuLBPMtmGrKaqxoTtn1W6kTW0fleqTNZ7fwgozE3JH6ZO0Ky oZ0rSGpKGcKD1BMAAvpHrVRwtnyZXsTRKlmO34qtZ9cr/Hm8fDF3fHfhO0O1mR3ng7bQ Nt812VIcIMQH9PO4jgCJ10P5YiROKF6cCQ/e3BToVM681DRHdkJaBcmcO85+4gSzN+34 jNFBOX4YJdn3ZMrd22zxS/MVKbuyNIJA5Butq+FMTtKawcmwGYf+FKqoQyuZr6o4wgxp v97dUs6ilg9wuiEQUUmCKUCIMZ8LBl0E4GJyZhCKCELXpre60m1VpkG++77Vq4ZV9CAM nuPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W4YhMBbj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 19si780118pgh.54.2022.02.14.13.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:14:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W4YhMBbj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59C0F21EC23; Mon, 14 Feb 2022 12:33:36 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233841AbiBNJxZ (ORCPT + 99 others); Mon, 14 Feb 2022 04:53:25 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245711AbiBNJuP (ORCPT ); Mon, 14 Feb 2022 04:50:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EE9725C70; Mon, 14 Feb 2022 01:41:21 -0800 (PST) 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 C1648B80DC6; Mon, 14 Feb 2022 09:41:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B5D5C340E9; Mon, 14 Feb 2022 09:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831678; bh=V15VGBn00w1et87y3cyAAiWXo3+4uZjqzx2UrF7AUiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W4YhMBbj7Xcfg46LDURIGYUBDCGi9Y7tKOlyXsriv/eAU/KQ5GFZ3UH9aSNTfoG/k TYzQUJGcRIWAVOQ8Eus4FXtuvzhkcuteVsGUJ0/FNlk+Zea61R88HjNYxzcqA7LPwa 8jRLtSvZicqh2TBDZpBAfUe0NI/h5PLQ7TFCvb9s= 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 060/116] drm/vc4: hdmi: Allow DBLCLK modes even if horz timing is odd. Date: Mon, 14 Feb 2022 10:25:59 +0100 Message-Id: <20220214092500.813769226@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 1d118965965f89948236ebe23072bb1fca5e7832 ] The 2711 pixel valve can't produce odd horizontal timings, and checks were added to vc4_hdmi_encoder_atomic_check and vc4_hdmi_encoder_mode_valid to filter out/block selection of such modes. Modes with DRM_MODE_FLAG_DBLCLK double all the horizontal timing values before programming them into the PV. The PV values, therefore, can not be odd, and so the modes can be supported. Amend the filtering appropriately. Fixes: 57fb32e632be ("drm/vc4: hdmi: Block odd horizontal timings") Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220127135116.298278-1-maxime@cerno.tech Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 5d5c4e9a86218..a308f2d05d173 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -800,6 +800,7 @@ static int vc4_hdmi_encoder_atomic_check(struct drm_encoder *encoder, unsigned long long tmds_rate; if (vc4_hdmi->variant->unsupported_odd_h_timings && + !(mode->flags & DRM_MODE_FLAG_DBLCLK) && ((mode->hdisplay % 2) || (mode->hsync_start % 2) || (mode->hsync_end % 2) || (mode->htotal % 2))) return -EINVAL; @@ -834,6 +835,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder, struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); if (vc4_hdmi->variant->unsupported_odd_h_timings && + !(mode->flags & DRM_MODE_FLAG_DBLCLK) && ((mode->hdisplay % 2) || (mode->hsync_start % 2) || (mode->hsync_end % 2) || (mode->htotal % 2))) return MODE_H_ILLEGAL; -- 2.34.1