public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@kernel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: "Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Andy Yan" <andy.yan@rock-chips.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Mark Yao" <markyao0591@gmail.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	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" <aarnoud@me.com>,
	"Luis de Arquer" <ldearquer@gmail.com>,
	"Algea Cao" <algea.cao@rock-chips.com>
Subject: Re: [PATCH v6 1/3] drm/bridge: synopsys: Add DW HDMI QP TX Controller support library
Date: Mon, 23 Sep 2024 10:19:46 +0200	[thread overview]
Message-ID: <20240923-spirited-wealthy-pelican-4e15dc@penduick> (raw)
In-Reply-To: <f8b17995-ce53-45ab-8e68-c7087dbc9786@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]

On Sat, Sep 14, 2024 at 10:12:29PM GMT, Cristian Ciocaltea wrote:
> Hi Maxime,
> 
> On 9/9/24 6:13 PM, Maxime Ripard wrote:
> > Hi,
> > 
> > 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 = bridge->driver_private;
> >> +	enum drm_connector_status status;
> >> +
> >> +	status = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data);
> >> +
> >> +	dev_dbg(hdmi->dev, "%s conn=%d scramb=%d\n", __func__,
> >> +		status == connector_status_connected, hdmi->scramb_enabled);
> >> +
> >> +	if (hdmi->scramb_enabled) {
> >> +		cancel_delayed_work_sync(&hdmi->scramb_work);
> >> +
> >> +		if (status == connector_status_connected)
> >> +			dw_hdmi_qp_check_and_set_scramb(hdmi);
> >> +	}
> >> +
> >> +	return status;
> >> +}
> > 
> > Unfortunately, that won't work. The HDMI Spec has (HDMI 2.0, Section
> > 6.1.3.1 - Scrambling Control):
> > 
> > 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.
> > 
> > So you need to disable the output and enable it again.
> > 
> > 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
> 
> Thanks for all the details and references!
> 
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

  reply	other threads:[~2024-09-23  8:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06  1:17 [PATCH v6 0/3] Add initial support for the Rockchip RK3588 HDMI TX Controller Cristian Ciocaltea
2024-09-06  1:17 ` [PATCH v6 1/3] drm/bridge: synopsys: Add DW HDMI QP TX Controller support library Cristian Ciocaltea
2024-09-09 15:13   ` Maxime Ripard
2024-09-14 19:12     ` Cristian Ciocaltea
2024-09-23  8:19       ` Maxime Ripard [this message]
2024-09-06  1:17 ` [PATCH v6 2/3] dt-bindings: display: rockchip: Add schema for RK3588 HDMI TX Controller Cristian Ciocaltea
2024-09-06  7:40   ` Krzysztof Kozlowski
2024-09-10 15:46     ` Cristian Ciocaltea
2024-09-06  1:17 ` [PATCH v6 3/3] drm/rockchip: Add basic RK3588 HDMI output support Cristian Ciocaltea
2024-09-09  0:42   ` kernel test robot
2024-09-10 11:27   ` Heiko Stübner
2024-09-10 12:06     ` Cristian Ciocaltea
2024-09-10 15:07   ` Heiko Stübner
2024-09-10 15:21     ` Heiko Stübner
2024-09-10 15:41       ` Cristian Ciocaltea
2024-09-10 16:39         ` Heiko Stübner
2024-09-10 20:49           ` Heiko Stübner
2024-09-11  1:51             ` Cristian Ciocaltea
2024-09-10 19:08   ` Heiko Stübner
2024-09-14 18:28     ` Cristian Ciocaltea
2024-09-15  6:13       ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240923-spirited-wealthy-pelican-4e15dc@penduick \
    --to=mripard@kernel.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=aarnoud@me.com \
    --cc=airlied@gmail.com \
    --cc=algea.cao@rock-chips.com \
    --cc=andrzej.hajda@intel.com \
    --cc=andy.yan@rock-chips.com \
    --cc=conor+dt@kernel.org \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=ldearquer@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=markyao0591@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox