From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81B3C3D4117 for ; Fri, 22 May 2026 10:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779447447; cv=none; b=Yn5uDQlAD+P96uxxd+DzOd2WrJ4zuRQnzn/n9wvtfobwtfGOeWZw0KQIpj4DQ2G/sm2aMZkvnoi6TDAXkIEMKdl4G036xK6n3wg0D3VNHoKFL3nJ0/wNUF26iF2HFYklf6kFk4QtbMmJ96YdP1vuUBvRDADWtSBSkfnj9h1/H5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779447447; c=relaxed/simple; bh=RaCiD9C9ee+AQyy4fknkK+gihP8GQ7R1bKyeCWj4GDI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oANnr63YKvI6vSuR+pfJb00GKEmTnLLsPj99mD8mp6FgTshTN+eOox4yIW8Ljns+oVNzzFaP9des2om47xfqP11ALziXVrtnj5DeUvT5uGCv6PtC2pi9jFhMT1dJH/b8IDfFX1p+J8hVnRJT6TebmoleO1CPzDeIUZDkMR6t/BU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=JaBfUJfN; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="JaBfUJfN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1779447438; bh=RaCiD9C9ee+AQyy4fknkK+gihP8GQ7R1bKyeCWj4GDI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=JaBfUJfNr5zqyyEI/gZ60k0uCx5ucNwCUpCb+nz04In5Nr63IGybolGcpcf16P+uB +FvtjHNPxh/5FZKqhnRpMPt7HeklNlIZdeA2eniYfEQYkyfyc+flXL8vunV+BFRZrs GL34YSlf46DWcQF79YZ4aA/dazoqE9dXAoeC+r3b2keMJxHm3/THxSyqC1+TV37aLz TU5ZWAxsNihkH2i/H+cmbJnuqJWGVSZZ+Q80GnFvBEehoLGLGcdxp32PVN7sCRj2RY mlKXZnNftdV6nYkp1r1rCxbV0thIPb6P/SGkaZg9XCieytEFhOkDQztSU0J2F3NY7F 7l+qHsLkBBHyA== Received: from [100.64.0.241] (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id 621F117E0550; Fri, 22 May 2026 12:57:17 +0200 (CEST) Message-ID: Date: Fri, 22 May 2026 13:57:16 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 02/22] drm/connector: Add HDMI 2.0 scrambler infrastructure To: Maxime Ripard Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Sandy Huang , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Andy Yan , Luca Ceresoli , Daniel Stone , kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org References: <20260520-dw-hdmi-qp-scramb-v6-0-24b74603b782@collabora.com> <20260520-dw-hdmi-qp-scramb-v6-2-24b74603b782@collabora.com> <20260521-sweet-devout-panther-44d73c@penduick> Content-Language: en-US From: Cristian Ciocaltea In-Reply-To: <20260521-sweet-devout-panther-44d73c@penduick> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Maxime, On 5/21/26 10:52 AM, Maxime Ripard wrote: > Hi, > > Thanks for working on this! Thanks for your quick review! :-) > > On Wed, May 20, 2026 at 09:38:13PM +0300, Cristian Ciocaltea wrote: >> Add the connector-level infrastructure to support HDMI 2.0 scrambling: >> >> - .scrambler_src_{enable|disable}() callbacks in >> drm_connector_hdmi_funcs for source-side scrambling control >> - A delayed work item (scdc_work) with an associated callback (scdc_cb) >> for periodic monitoring of sink-side scrambling status >> - A scrambler_enabled flag to track whether scrambling is currently >> active >> >> These are intended to be used by SCDC scrambling helpers to coordinate >> scrambling setup and teardown between the source driver and the DRM >> core. >> >> Signed-off-by: Cristian Ciocaltea >> --- >> drivers/gpu/drm/drm_connector.c | 14 +++++++++++ >> include/drm/drm_connector.h | 52 +++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 66 insertions(+) > > So we would need kunit tests for this. Ack. > >> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c >> index 3fa4d2082cd7..91e58362fbc0 100644 >> --- a/drivers/gpu/drm/drm_connector.c >> +++ b/drivers/gpu/drm/drm_connector.c >> @@ -220,6 +220,19 @@ void drm_connector_free_work_fn(struct work_struct *work) >> } >> } [...] >> + /** >> + * @scdc_work: Work item currently used to monitor sink-side scrambling >> + * status and retry setup if the sink resets it. >> + */ >> + struct delayed_work scdc_work; >> + >> + /** @scdc_cb: Callback to be invoked as part of @scdc_work. >> + * >> + * Currently used to monitor sink-side scrambling status and retry >> + * setup if the sink resets it. >> + * >> + * This is assigned by the framework when making use of >> + * drm_scdc_start_scrambling() helper. >> + */ >> + void (*scdc_cb)(struct drm_connector *connector); >> + > > I'm really not sure what the monitor thing is about. If we have setup > the scrambler at enable time, and we set it again on hotplugging, why > would we need to monitor anything? This is similar to 257d36d493e9 ("drm/vc4: hdmi: Add a workqueue to set scrambling") in order to deal with some displays needing a retry on scrambling setup. > Also, scrambling is only relevant for HDMI 2.0. We need a way to expose > that somehow and make sure that HDMI 2.0 drivers actually have > scrambling setup. I assumed drivers that do not reject the HDMI 2.0 rates in their .tmds_char_rate_valid() are implicitly expected to support scrambling. Thinking again we could extend the framework to provide some additional checks, but let's discuss the topic on the SCDC patch. Regards, Cristian