From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE878C433FE for ; Fri, 3 Dec 2021 10:54:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9820A7338D; Fri, 3 Dec 2021 10:54:48 +0000 (UTC) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80D017338E for ; Fri, 3 Dec 2021 10:54:46 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id D9D6058019A; Fri, 3 Dec 2021 05:54:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 03 Dec 2021 05:54:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=t50ddVEhLE5r2 v0NOsgHoz9/ZdcQ3nJCvid/C9Swdbc=; b=TTWF6f461H6mIg/p67oHIm79wJqFP huOVkrAGOISMtl6SC7ybXM3krKyctcNLaqKnWpiW6EAxgfD57d37ysSGgf8c1E90 WVtmWHhQLy2sZ+h6LPmz87KaHT/6Vs2zVJSTO7XlXovAmhSkn2bSm7kYpfMv4cuM GmZi5prJJ8mU5r6KvVwREwqzW4SsKpzlzQbs3WKJ6o3H38ERR5Z4VP+wG2n6QBe6 gwaC5Yq9rgZd0YG9Q4vh969Q+PhoXuVeqJ6XhAnzhs1oHCzJwBnGQBCvKIVxbg+y xbBR/3rdPP7zFnFxYHkmPNW2qCb6pvotbOZ8hJKz1w3ODh0b0G0gVKYgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=t50ddVEhLE5r2v0NOsgHoz9/ZdcQ3nJCvid/C9Swdbc=; b=Ca9ZTzG4 /iC/dXx4W7t8hfB9gvMQgwcPamd666HuuNyGOQ2MDnWXrnsV83YcS1NX0Objq06e GnXvTrqqchJOUbJ5l3EIYRU+bG4AUCtbnJpZlxvu0CJmAMOhMxleAHFEQsjdxTLZ iE+0rnpLIhxl/VcKjFBtuqHG4Yz5AhSOkgo3vb/PqkUxe4xKC3BSMKRB4uuqBp3P OydDFnRecrI+AkpA4WEo7XnyqMQ1mPAGCaOh95vYKSGfoZEq3CG1K5Qxw1LtaFqI M4rc0gPJgbPTQ/dyu4lPxpr+UTX9fj/Ptp0ZodKY9Y76Q8scwlHA4O5VtF4FQvYN tS86Kby/m32k8Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieejgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Dec 2021 05:54:45 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 11/11] drm/vc4: hdmi: Force YUV422 if the rate is too high Date: Fri, 3 Dec 2021 11:54:20 +0100 Message-Id: <20211203105420.573494-12-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211203105420.573494-1-maxime@cerno.tech> References: <20211203105420.573494-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Tim Gover , Dave Stevenson , dri-devel@lists.freedesktop.org, Werner Sembach , Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When using the modes that need the highest pixel rate we support (such as 4k at 60Hz), using a 10 or 12 bpc output will put us over the limit of what we can achieve. In such a case, let's force our output to be YUV422 so that we can go back down under the required clock rate. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 04eb1ab9dad3..5b8b2688a3f4 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1411,8 +1411,15 @@ vc4_hdmi_encoder_compute_config(struct vc4_hdmi *vc4_hdmi, vc4_state, mode, conn_state->max_bpc, format); - if (ret) - return ret; + if (ret) { + format = VC4_HDMI_OUTPUT_YUV422; + ret = vc4_hdmi_encoder_compute_clock(vc4_hdmi, + vc4_state, mode, + conn_state->max_bpc, + format); + if (ret) + return ret; + } vc4_state->output_format = format; return ret; -- 2.33.1