From patchwork Fri Dec 3 10:54:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12654841 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 539D9C433F5 for ; Fri, 3 Dec 2021 10:54:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD5C073375; Fri, 3 Dec 2021 10:54:25 +0000 (UTC) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F26D73375 for ; Fri, 3 Dec 2021 10:54:24 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id D92C558019A; Fri, 3 Dec 2021 05:54:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 03 Dec 2021 05:54:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:content-type:mime-version :content-transfer-encoding; s=fm1; bh=WZahf8+vLTHLrsggBHorEtLHTI WxDQNXGBNZIZ0ND4U=; b=li7Xe+/ANIQi2qbi//Uy44uJMTqbt+Gk5YAbizNxcR GXjl1FnAECPG60yzi3wcq1RJkxzwVebHO28eHKIAIyfO/PZlN8tmuPPc7W7CXH1i IUd2qSpjnFA42hfX/nbLLdMT+XBsbWG/Q0JWpl1cE35jAxHJlZkLtqRH9XZ0i2Uc qejS8hZ1O2ogJy2FlsYK237L8WylhAxCRaCjSoEpuYLQfnEtZ9hpQBwN4SNwtZAc +442o2CI5+dRx6L9xJiCATN3TbM8SISEde8xh0yGw/+G6WdZNpLJhwxiqT+mBzyH Zd+a1NUqMZDRqjeAhoDGf7JyNibQ1juQC/pZdkxtgJDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=WZahf8 +vLTHLrsggBHorEtLHTIWxDQNXGBNZIZ0ND4U=; b=njmmfY75lXyy02f25KSD6V ja30dKxSEV6kioyW9wKWiyBsWcCEGy/a6d63DhVLIB8hYCPuIAQLf2nvh8WOnS6v EikzkD7WkaXg70kS4lvvDJjc3Q1gvvjgE+64hnk3xFpMghPuc29ACzeMU0x7Xn0t +NQATYUI68GAXYlRMumm8dhd9o/igWE9xrwx4s7NKU0g04mwSQ1NSn0wIVlRsua8 ZmFI0RdRDJp3qAv2RNKm+SAZRPwi1rnAdaDD2y9NCX8hcvn9id5g6E4krIA75IvQ p2Ia6VqLm6c2niydvb1uzq+PSRy0ISdi9AX/0BlDnZJl8Q+1KLvB0YeGKdBrUZmw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieejgddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgtggfgsehtqhertdertdejnecuhfhrohhmpeforgigihhmvgcu tfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvg hrnhepteetledtudejhffftdeugfduffelleelheejgeegffduvddvgfdvhffhlefgteff necuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Dec 2021 05:54:22 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 00/11] drm/vc4: hdmi: Yet Another Approach to HDMI YUV output Date: Fri, 3 Dec 2021 11:54:09 +0100 Message-Id: <20211203105420.573494-1-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 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" Hi, This is another attempt at supporting the HDMI YUV output in the vc4 HDMI driver. This is a follow-up of https://lore.kernel.org/dri-devel/20210317154352.732095-1-maxime@cerno.tech/ And the discussions that occured recently on the mailing lists and IRC about this. The series mentioned above had multiple issues, the main one being that it was a bit too much complicated for what we wanted to achieve. This series is taking a much simpler approach with an ad-hoc solution. I think some parts of it could still be moved to KMS helpers (notably, the output format enum, and the helper to set the infoframe for it) and structures (the output format stored in drm_connector_state). This would also interact nicely with the work done here: https://lore.kernel.org/dri-devel/20211118103814.524670-1-maxime@cerno.tech/ This can come as a second step though. The other issues with the first attempt was that nothing was reported to userspace about the decision we made about the format, and that this decision was essentially policy, without any way for the userspace to influence it. Those two points however are being worked on by Werner in a cross-driver effort: https://lore.kernel.org/dri-devel/e452775c-5b95-bbfd-e818-f1480f556336@tuxedocomputers.com/ Since it's a KMS decision, I don't think we should hold off any driver as long as it's consistent with what the other drivers are doing. Let me know what you think, Maxime Maxime Ripard (11): drm/edid: Rename drm_hdmi_avi_infoframe_colorspace to _colorimetry drm/vc4: hdmi: Add full range RGB helper drm/vc4: hdmi: Use full range helper in csc functions drm/vc4: hdmi: Move XBAR setup to csc_setup drm/vc4: hdmi: Replace CSC_CTL hardcoded value by defines drm/vc4: hdmi: Define colorspace matrices drm/vc4: hdmi: Change CSC callback prototype drm/vc4: hdmi: Move clock validation to its own function drm/vc4: hdmi: Move clock calculation into its own function drm/vc4: hdmi: Support HDMI YUV output drm/vc4: hdmi: Force YUV422 if the rate is too high drivers/gpu/drm/drm_edid.c | 8 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 324 +++++++++++++++----- drivers/gpu/drm/vc4/vc4_hdmi.h | 13 +- drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 6 + drivers/gpu/drm/vc4/vc4_regs.h | 19 ++ include/drm/drm_edid.h | 4 +- 8 files changed, 290 insertions(+), 88 deletions(-)