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 C75D9C47DD9 for ; Wed, 28 Feb 2024 15:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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=kyZWrihzJf2//A4TZkfDwPGMNWP8TbS22ERzwRRL8Wo=; b=batxxw2QAv8bN1HjlwP4YWkH+H IrHuRFtDwe2598rezJEV49BuU8mSumeSnoLWlXCH4kBnHXnJOObX7KE8i3gWUJ7/ynxum9ZdBh2d/ xrggO93uyq5ybOZdKfNJdpDtokGapdZVTAJ1CJHZWmQM1gsGdmbn7wXdqfwjH7s3lAgJxFpN9IHNY MZ5CF2E3ItdxYIaDFakZaD3IFNIKiBt3Xn3bHjxsDGDQOKZE3arltuuH1WkECy6k1vKrs7Q8GSVZf CaXaqkHYU4aa7/j1XEmG57JW6YBjv9BIPQxyBRVIGydAvgaxedL5GJv0v+Qd332Jxv1lEJfoPNopP Nu7YJyqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfLsR-00000009tjh-3tku; Wed, 28 Feb 2024 15:29:47 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfLsO-00000009thk-1XNQ for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2024 15:29:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 99C5ACE1B70; Wed, 28 Feb 2024 15:29:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5403CC433F1; Wed, 28 Feb 2024 15:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709134176; bh=lRf/rIbATsUTI1YkCvuC+3znuOvvZIuYq5dyiYZsoXA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H3twjr27b1HacuKRDSNxpv4YwUtDnjvSa7PX91jk2W+KLQn/tKQeVrFP5cBBaFMKY yfqR4EQNDiRuQsYvGU5EAuabsTfXLPkmKGxgd2RgeU1Obd+WbHAuowDK8sGTrok57w oPBzz2RYsBcaPd8y8BjPwKKkrWUhttL4CuV99jxSUsHJLzOALFQZYjM4Pt9y7MKt15 7der0X817Nodjt8yQR9gYxYm/kbUIlm0HjwIhXVLcNrP/NFrzfGKHtFRlxSizYWGp5 RbSXTVrB77BXGBg3NfiFWf3nHoi4D37BJC1kh2TzDhJthU6Urv0W5yhbZkTCH1S73e Q9PP4zay7kgtA== Date: Wed, 28 Feb 2024 16:29:33 +0100 From: Maxime Ripard To: Anatoliy Klymenko Cc: Laurent Pinchart , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Michal Simek , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] drm/atomic-helper: Add select_output_bus_format callback Message-ID: <20240228-nifty-flashy-shrew-905edc@houat> References: <20240226-dp-live-fmt-v1-0-b78c3f69c9d8@amd.com> <20240226-dp-live-fmt-v1-4-b78c3f69c9d8@amd.com> MIME-Version: 1.0 In-Reply-To: <20240226-dp-live-fmt-v1-4-b78c3f69c9d8@amd.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_072944_909457_47440919 X-CRM114-Status: GOOD ( 26.76 ) 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: , Content-Type: multipart/mixed; boundary="===============8752094463662928375==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8752094463662928375== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cidk5nrah5kgputl" Content-Disposition: inline --cidk5nrah5kgputl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Feb 26, 2024 at 08:44:45PM -0800, Anatoliy Klymenko wrote: > Add select_output_bus_format to CRTC atomic helpers callbacks. This > callback Will allow CRTC to participate in media bus format negotiation > over connected DRM bridge chain and impose CRTC-specific restrictions. > A good example is CRTC implemented as FPGA soft IP. This kind of CRTC will > most certainly support a single output media bus format, as supporting > multiple runtime options consumes extra FPGA resources. A variety of > options for FPGA are usually achieved by synthesizing IP with different > parameters. >=20 > Incorporate select_output_bus_format callback into the format negotiation > stage to fix the input bus format of the first DRM bridge in the chain. >=20 > Signed-off-by: Anatoliy Klymenko > --- > drivers/gpu/drm/drm_bridge.c | 19 +++++++++++++++++-- > include/drm/drm_modeset_helper_vtables.h | 31 ++++++++++++++++++++++++++= +++++ > 2 files changed, 48 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c > index 521a71c61b16..453ae3d174b4 100644 > --- a/drivers/gpu/drm/drm_bridge.c > +++ b/drivers/gpu/drm/drm_bridge.c > @@ -32,6 +32,7 @@ > #include > #include > #include > +#include > #include > #include > =20 > @@ -879,7 +880,8 @@ static int select_bus_fmt_recursive(struct drm_bridge= *first_bridge, > unsigned int i, num_in_bus_fmts =3D 0; > struct drm_bridge_state *cur_state; > struct drm_bridge *prev_bridge; > - u32 *in_bus_fmts; > + struct drm_crtc *crtc =3D crtc_state->crtc; > + u32 *in_bus_fmts, in_fmt; > int ret; > =20 > prev_bridge =3D drm_bridge_get_prev_bridge(cur_bridge); > @@ -933,7 +935,20 @@ static int select_bus_fmt_recursive(struct drm_bridg= e *first_bridge, > return -ENOMEM; > =20 > if (first_bridge =3D=3D cur_bridge) { > - cur_state->input_bus_cfg.format =3D in_bus_fmts[0]; > + in_fmt =3D in_bus_fmts[0]; > + if (crtc->helper_private && > + crtc->helper_private->select_output_bus_format) { > + in_fmt =3D crtc->helper_private->select_output_bus_format( > + crtc, > + crtc->state, > + in_bus_fmts, > + num_in_bus_fmts); > + if (!in_fmt) { > + kfree(in_bus_fmts); > + return -ENOTSUPP; > + } > + } > + cur_state->input_bus_cfg.format =3D in_fmt; I don't think we should start poking at the CRTC internals, but we should rather provide a helper here. > cur_state->output_bus_cfg.format =3D out_bus_fmt; > kfree(in_bus_fmts); > return 0; > diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_m= odeset_helper_vtables.h > index 881b03e4dc28..7c21ae1fe3ad 100644 > --- a/include/drm/drm_modeset_helper_vtables.h > +++ b/include/drm/drm_modeset_helper_vtables.h > @@ -489,6 +489,37 @@ struct drm_crtc_helper_funcs { > bool in_vblank_irq, int *vpos, int *hpos, > ktime_t *stime, ktime_t *etime, > const struct drm_display_mode *mode); > + > + /** > + * @select_output_bus_format > + * > + * Called by the first connected DRM bridge to negotiate input media > + * bus format. CRTC is expected to pick preferable media formats from > + * the list supported by the DRM bridge chain. There's nothing restricting it to bridges here. Please rephrase this to remove the bridge mention. The user is typically going to be the encoder, and bridges are just an automagic implementation of an encoder. And generally speaking, I'd really like to have an implementation available before merging this. Maxime --cidk5nrah5kgputl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZd9RXQAKCRDj7w1vZxhR xabiAPwMUBllLVjJ2R8GSARBjyjpbidi/etMNmmjB31GnUsLCQD9GXcs+YhUV+XC WZuXsHmZaEgjQI0Yn+ELSS5uW/RRqgg= =PnFN -----END PGP SIGNATURE----- --cidk5nrah5kgputl-- --===============8752094463662928375== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8752094463662928375==-- 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 5BC76C47DD9 for ; Wed, 28 Feb 2024 16:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To: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=RZgRWz/T0NS2aY9bCavcK9uY/JtX2p/k+NW51K0uxRg=; b=J3ZZN+YHP3EFuehHBL/l2BOTYi hoXC7t7FwBSqT731pbZbLLIBR51sRBrHyNjCgyuBSj2c3zYJDaHs/VZUWA8e4qsqrq5h7WiyYG4lj AcN97upVcWsmHrobSk5sn8QlosT5+bw6l9oBx8FeeaPswqyV3vEpbf3cPtl1syCKzxCseKTP+goGI yqfvRHfgra5aoe6Gc3eWELvQckxXmF0oukuDQ1dTyz56/C7mVrIaTl0yboM+LdtdGTaU0CGNNDPuw vDEKXa3jAC5LJla3cgzbpJl7HpAloE4kgbhL+WW2n33c6U371IyD3OgkK5EnnV4WjZgVeg8yiwgxg bYLP8j1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfMc6-0000000A58V-1qSF; Wed, 28 Feb 2024 16:16:58 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfMc3-0000000A56m-3asv; Wed, 28 Feb 2024 16:16:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 776F4618D8; Wed, 28 Feb 2024 16:16:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB65FC433C7; Wed, 28 Feb 2024 16:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709137011; bh=fErWKInGULVeVxqgQI2zMH4IGVMKKtYkJXd20L7xtH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sZmZYn/wQtnIX3Ao7DScrIzuZTZ3OmuPwAm6201EzNpKwrM7pobEvjOs+wRU2Rk/f NYhJ69FIupcA1l5fjn3ecGzgrtRyNeFj2bPjLMHFsrXnNUlO+ifepw73K5DWTBVwiS /8ltKWfS6D7ubOtpSSG06ul0hV/Jekp8/X2T0UTM8hCgiOLmRRLKIQII2ZbMPQkHwq WVD7NzgaXHzXS4SfcgoP8RiknLVnNzZ+B+/ZqRBuHgbNNtwtYj775EGgo7PkmEN5pw ykI0fXySHnqeNMg+b7D/GX3TQYIXLmf3yjvgnZOtfpEepUFYWLCkU0s64SjBCmPPRq 0/Rl4/cJstcDQ== Date: Wed, 28 Feb 2024 17:16:48 +0100 From: Maxime Ripard To: =?utf-8?B?TWHDrXJh?= Canal Cc: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Jonathan Corbet , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Hans Verkuil , Sebastian Wick , Ville =?utf-8?B?U3lyasOkbMOk?= , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v7 29/36] drm/vc4: tests: Remove vc4_dummy_plane structure Message-ID: <20240228-nifty-flashy-shrew-905edc@houat> References: <20240222-kms-hdmi-connector-state-v7-0-8f4af575fce2@kernel.org> <20240222-kms-hdmi-connector-state-v7-29-8f4af575fce2@kernel.org> <244fe6b9-f295-4c85-908a-014ada0033fa@igalia.com> <2693770c-0d27-4186-87e1-e55a0a5f17a5@igalia.com> MIME-Version: 1.0 In-Reply-To: <2693770c-0d27-4186-87e1-e55a0a5f17a5@igalia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_081656_019360_7FD698F6 X-CRM114-Status: GOOD ( 21.94 ) 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: , Content-Type: multipart/mixed; boundary="===============8642526110301850878==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Message-ID: <20240228161648.RfwuvzO5eFga97HOJTswIG_FwL4Apc1Hh6ZAgMeeJnc@z> --===============8642526110301850878== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bzsukvurqrxvmgmq" Content-Disposition: inline --bzsukvurqrxvmgmq Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 27, 2024 at 07:45:01PM -0300, Ma=EDra Canal wrote: > Hi Maxime, >=20 > On 2/27/24 10:02, Maxime Ripard wrote: > > Hi Ma=EDra, > >=20 > > Thanks for you reviews! > >=20 > > On Mon, Feb 26, 2024 at 09:29:32AM -0300, Ma=EDra Canal wrote: > > > On 2/22/24 15:14, Maxime Ripard wrote: > > > > The vc4_dummy_plane structure is an exact equivalent to vc4_plane, = so we > > >=20 > > > Maybe I understood incorrectly, but isn't the vc4_dummy_plane structu= re > > > equivalent to drm_plane? > >=20 > > Both statements are true :) > >=20 > > vc4 itself uses vc4_plane to holds its plane-related content, but it > > turns out that there's nothing in that structure anymore and vc4_plane > > =3D=3D drm_plane. > >=20 > > In our mock driver, we have another structure meant to store the > > mock-plane-related content which doesn't have anything in it anymore, > > and is thus equivalent to vc4_plane. > >=20 > > So, basically, vc4_dummy_plane =3D=3D vc4_plane =3D=3D drm_plane. > >=20 > > This patch is only about getting rid of vc4_dummy_plane though. > >=20 > > Is it clearer? > >=20 >=20 > Yeah, with that pointed out, you can add my: I'll rephrase for the next version then > Reviewed-by: Ma=EDra Canal Thanks! Maxime --bzsukvurqrxvmgmq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZd9ccAAKCRDj7w1vZxhR xQ/aAQDzU4vVfau883o71TzEeE+lysJ38XPUbtp9Q818fxbvSAD/TfNo9QsQjVLO TjOhPuL8arGdUmexXtTS6jTunClBzAA= =6H0O -----END PGP SIGNATURE----- --bzsukvurqrxvmgmq-- --===============8642526110301850878== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8642526110301850878==--