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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D11D9CF9C5B for ; Mon, 23 Sep 2024 08:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SgNM2GElNdMcRJHJTltweu9BYke0x/1LMERZx+rEzlQ=; b=cX6VFA3yfytNjDP7X6HZaa/P5+ mnHBC+tjZLJyurejKQKNkPRU41dJUjPJZ50A/Yo2Ju+BzwJVUQB80W6sHNx5Txu2T5lKViw1z7ACs reePZYaxMlmxCZScob6Ykm6xk7ClqaZ57MMoIgKyS6Rhpztx4Vcud1myORF/0LIS+P5X+ObZwQHvd E0GEL6MvCrqPG4RmRBodPCjAXzKcsE+srRiKarOhR6fmNV9pefQQWJAn5qAYKeumG+86f8lDoux3H vcBuIWOlgPpcCVHXIf2EO981LCdZwYR6O2x62hOHzMDc/iGKmnbSWgq1z2YaawRNRIu+T3ywg7B2i snE/wwBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sseJd-0000000Gehx-2Yxl; Mon, 23 Sep 2024 08:21:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sseIV-0000000GeY0-0JIC; Mon, 23 Sep 2024 08:19:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4B5325C5816; Mon, 23 Sep 2024 08:19:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CEB1C4CEC4; Mon, 23 Sep 2024 08:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727079589; bh=gQ1xXXNFSQ0hMp/hqA4GAQ7kD/mpS6i/zp2Gmw3vPRw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LeYVMNc/c1PpcDq/PGTNH8EeH683lhQ22/Ye7Wa4pPsxVuDDsLY7Q9JyzQS1As9ys 1FxD65e/lBiV5VktoD0dv2pZ7FLgoeIFKJEwS9agXwshH7aqAKWq63ZP+UjytmPKLu yAIQUsTNGCMG1aQpwo4+9E1W77uhKT3AXbPHR4683BNeokwEgHhRfR2eHDuZoIv+nH WB483aJV+y58kgAC0/JTULv4RpA1WkJEg+q+q2T6+pLYIygf3JBmgW7xmVAplusijv wrTGbbhIB55EzaYYVnuIWO5abH1Uweoc6XHXEdDjVa2BsDSfs8pb/9aWkxwrnz6+mn A7DeNA4vO15LA== Date: Mon, 23 Sep 2024 10:19:46 +0200 From: Maxime Ripard To: Cristian Ciocaltea Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Andy Yan , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mark Yao , Sascha Hauer , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, kernel@collabora.com, Alexandre ARNOUD , Luis de Arquer , Algea Cao Subject: Re: [PATCH v6 1/3] drm/bridge: synopsys: Add DW HDMI QP TX Controller support library Message-ID: <20240923-spirited-wealthy-pelican-4e15dc@penduick> References: <20240906-b4-rk3588-bridge-upstream-v6-0-a3128fb103eb@collabora.com> <20240906-b4-rk3588-bridge-upstream-v6-1-a3128fb103eb@collabora.com> <20240909-horned-congenial-curassow-ebc5fa@houat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="bjmxjjuhmv2zdjhq" Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240923_011955_220933_3661C344 X-CRM114-Status: GOOD ( 24.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --bjmxjjuhmv2zdjhq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 14, 2024 at 10:12:29PM GMT, Cristian Ciocaltea wrote: > Hi Maxime, >=20 > On 9/9/24 6:13 PM, Maxime Ripard wrote: > > Hi, > >=20 > > On Fri, Sep 06, 2024 at 04:17:40AM GMT, Cristian Ciocaltea wrote: > >> +static enum drm_connector_status > >> +dw_hdmi_qp_bridge_detect(struct drm_bridge *bridge) > >> +{ > >> + struct dw_hdmi_qp *hdmi =3D bridge->driver_private; > >> + enum drm_connector_status status; > >> + > >> + status =3D hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); > >> + > >> + dev_dbg(hdmi->dev, "%s conn=3D%d scramb=3D%d\n", __func__, > >> + status =3D=3D connector_status_connected, hdmi->scramb_enabled); > >> + > >> + if (hdmi->scramb_enabled) { > >> + cancel_delayed_work_sync(&hdmi->scramb_work); > >> + > >> + if (status =3D=3D connector_status_connected) > >> + dw_hdmi_qp_check_and_set_scramb(hdmi); > >> + } > >> + > >> + return status; > >> +} > >=20 > > Unfortunately, that won't work. The HDMI Spec has (HDMI 2.0, Section > > 6.1.3.1 - Scrambling Control): > >=20 > > The minimum time period between the write to the Scrambling_Enable bit, > > and the transmission of a scrambled video signal is not specified; > > however the Source shall not begin transmission of a scrambled video > > signal before writing a 1 to the Scrambling_Enable bit. The maximum time > > period between the write to the Scrambling_Enable bit and the > > transmission of a scrambled video signal shall be 100 ms. > >=20 > > So you need to disable the output and enable it again. > >=20 > > vc4 does just that, you can have a look here: > > https://elixir.bootlin.com/linux/v6.10.9/source/drivers/gpu/drm/vc4/vc4= _hdmi.c#L410 >=20 > Thanks for all the details and references! >=20 > Unfortunately I had to drop the scrambling setup for now [1], as I > encountered some issues while attempting to get this implemented as > suggested. Will get back to this and submit it separately when done. Yeah, I think that's the best way forward for now :) Maxime --bjmxjjuhmv2zdjhq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZvEkmgAKCRAnX84Zoj2+ dtqIAYCEGRZltZdX05vOCUhg+bOJmCXtzlvHsgM0R0lqKkF47Ts4/UIXsS4SIBrh GzywXicBfA+E1AnqXzojQFvunTAvhnbNDmkORCYsD6W+6g1tpbLD2aeqkSlYNen/ ghfb0s5gfA== =WJBj -----END PGP SIGNATURE----- --bjmxjjuhmv2zdjhq--