From patchwork Tue Nov 2 14:59:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12599081 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A509C433FE for ; Tue, 2 Nov 2021 14:59:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7F81D608FE for ; Tue, 2 Nov 2021 14:59:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F81D608FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B1DB72E5D; Tue, 2 Nov 2021 14:59:53 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id 63B4072E66 for ; Tue, 2 Nov 2021 14:59:52 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id D83F8580735; Tue, 2 Nov 2021 10:59:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 02 Nov 2021 10:59:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=hTJ7BKbJgWOz+5O5IbhM4vJYVS UaFoMFeonkevEcMiI=; b=YBORQO5IOh+NISy8U/JszU96lurPdCbtlnJ3244b7R tZcuk14fIX+n7ngsSTIm3ZqkSAct0voYALttKYeqSBn23pxGt6MkWiGZd9/3mf5B CZHpeMz80miQQL9bnHpl2RZ4/qH5HGVQbiIwwjmnJoJ3mge7w7hsVrMnZ7960XD4 v2hLGN0obS0cboTEX5rND2ql4I0xcYrK2Vz7Z05YEg0dBPWlqgjQa78IVYavLE4s i+O9Ts5LkUGrC6STtfz+SYCVHg9FdO3R4k//mTAfqsyN//tkW1+ILuzKOyDrHcmU 1H1oeXQ8s04iLCthSRhon7MG2Z1fsmBzuF9gbQCEk7Qw== 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=hTJ7BK bJgWOz+5O5IbhM4vJYVSUaFoMFeonkevEcMiI=; b=ATGJW2JSV3uLMyTjeO2pe1 2DZnFbV3XLu76yNc8Uasfd8q/KGw1cM5dXhPL0sG9rR+foOJegW3KyZ93HKVLCsu FT5h/upiOOVZ3wDRWEgCpL/1TkToxnrygyzIVDayNjHsV4WWvyr9BqOnWmIOayLx U8AOdysRx9LWMGu74EUJ2ANkHtOnG8skD7LmMWVdcXAcEipa68wL57J5zi8f95od IjCM3En75m3uGQ/sZL5b+BlQTge1gk9SDx2j0ghem0QrdoepSa49Qthh2OYTjkxZ y5UXJkPNuYqwFP3jSyLIk6bAkM1nGqyK1rAGetM2Omr1xqhdQxZqVL/C6V24La7A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtddtgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofggtgfgsehtqhertdertdejnecuhfhrohhmpeforgigihhmvgcu tfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvg hrnhepjeevudekjeetieduffduheeiveelieevfeffhfehhfejuddvjeefheejhedtuedv necuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Nov 2021 10:59:46 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 00/13] drm: Add generic helpers for HDMI scrambling Date: Tue, 2 Nov 2021 15:59:31 +0100 Message-Id: <20211102145944.259181-1-maxime@cerno.tech> X-Mailer: git-send-email 2.32.0 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, Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, This is a follow-up of the work to support the interactions between the hotplug and the scrambling support for vc4: https://lore.kernel.org/dri-devel/20210507150515.257424-11-maxime@cerno.tech/ https://lore.kernel.org/dri-devel/20211025152903.1088803-10-maxime@cerno.tech/ Ville feedback was that the same discussion happened some time ago for i915, and resulted in a function to do an full disable/enable cycle on reconnection to avoid breaking the HDMI 2.0 spec. This series improves the current scrambling support by adding generic helpers for usual scrambling-related operations, and builds upon them to provide a generic alternative to intel_hdmi_reset_link. Let me know what you think, Maxime Maxime Ripard (13): drm/connector: Add define for HDMI 1.4 Maximum Pixel Rate drm/connector: Add helper to check if a mode requires scrambling drm/atomic: Add HDMI scrambler state helper drm/atomic: Add HDMI reset link helper drm/scdc: Document hotplug gotchas drm/vc4: hdmi: Remove unused argument in vc4_hdmi_supports_scrambling drm/vc4: hdmi: Remove mutex in detect drm/vc4: hdmi: Remove HDMI flag from encoder drm/vc4: hdmi: Simplify the hotplug handling drm/vc4: hdmi: Simplify the connector state retrieval drm/vc4: hdmi: Switch to detect_ctx drm/vc4: hdmi: Leverage new SCDC atomic_check drm/vc4: hdmi: Reset link on hotplug drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +- drivers/gpu/drm/drm_atomic_helper.c | 109 ++++++++++ drivers/gpu/drm/drm_atomic_state_helper.c | 58 ++++++ drivers/gpu/drm/drm_edid.c | 2 +- drivers/gpu/drm/drm_scdc_helper.c | 13 ++ drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- drivers/gpu/drm/meson/meson_dw_hdmi.c | 4 +- drivers/gpu/drm/radeon/radeon_encoders.c | 2 +- drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 2 +- drivers/gpu/drm/tegra/sor.c | 10 +- drivers/gpu/drm/vc4/vc4_hdmi.c | 232 +++++++++------------ drivers/gpu/drm/vc4/vc4_hdmi.h | 17 +- include/drm/drm_atomic_helper.h | 3 + include/drm/drm_atomic_state_helper.h | 3 + include/drm/drm_connector.h | 27 +++ include/drm/drm_modes.h | 15 ++ 16 files changed, 342 insertions(+), 161 deletions(-)