Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp306767rdb; Thu, 1 Feb 2024 09:02:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdBW35phCuPzg3ZTdUDg6Jc7Ts0XI80AZDL0kGAl5zbuCGhmGuqOfHPuj1XFMp4VYhItLQ X-Received: by 2002:a17:906:74e:b0:a31:7ec3:5332 with SMTP id z14-20020a170906074e00b00a317ec35332mr2329988ejb.22.1706806940823; Thu, 01 Feb 2024 09:02:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706806940; cv=pass; d=google.com; s=arc-20160816; b=cmEFhezRmlVbo+g9RwefQAH6DAdwtMv+07GN96ifrna7hcDyVSmTrxZmXfdB9Lah6+ itey9+r3+h1688aoH8+K3ArNrC2csc/qA7UZGdlTZoJqni4SB9wbqOsAeqHmoI6o5sm2 VdTe60SyHqP4opyMt2N7P9P5F7dwpobz1jAXRZpHM66p1RFFAJTh9oZaq6fNcB3odC6h GDFUiAUT8ljn0SqIwxpcH6yMa522eu6BpY1cP/yw/DbRlDAoeJ2TzwNyVNxqLcZooRp8 xRy7CrAz6mpSxZVXUV15d6rdPw38udy13hOXWqKniDP3cKs4PtLD4qqFohWS0f9+bWSM vUZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ORVetPFkmT4UVVKKyCuUwRmeXNPw9HlZpcxW5dV/1Dk=; fh=3YptABJt2YuXaWn7c7iFdKrQdcICJUyX4YB0PhBN8Po=; b=iPC26L4ktc+13Nzl2acm/rs2tAfwPwIJCU8aA9aFDh//g0hH7SYEAN4dRAd0JYhm9d TCfkHoO1jpgcGBXVbsm6aXOB0r/v2L6fPtQzkKJ0/GGbJJw9hLNiNfx0wEvbh8BLa5RR LnkBuN0rRNBwlmzvF1r0gPzCw68L3EdkR3LRosieQt/pP9NCOT2OyN0+Kd/3rlVx8UHx KgMmba2l5d0i9ZgDVoYLgqXlYwStHM+pndD1IReXvE8B1qiQ4tcbBIU9Z2OSj395VPke W6jCpZ3bxnMd6qL+j/bpDUGTPb7GKDEqMc4O8NNpPjAEZCV8Vey7gV/LSSR4TXzB75YO vYbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F99T2ocV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUqI3xSdW0UZ5xcodCXVp9m9U/MIy0I2Sx/gvTA224fZC3Ghbdtn+8SiPFi7hezLgtZVI5KUIPxIODUZM2qTYb/vpiqFTkVlyT3MN5RUA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lv17-20020a170906bc9100b00a36f27ba554si23802ejb.602.2024.02.01.09.02.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 09:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F99T2ocV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-48565-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48565-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 39A931F22CA6 for ; Thu, 1 Feb 2024 17:01:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97DB11110; Thu, 1 Feb 2024 17:01:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F99T2ocV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E98D15CDD1 for ; Thu, 1 Feb 2024 17:01:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706806865; cv=none; b=ALRMbps4gbJm15Uy9CtfZNVKSdCOy7coOZiK93eRBxwiDOnjVIUajoEZG1clHSSPlH37fts2lEki7gtwgDq3wOr69wnr2QgnT2QGXnQLnkfrIvCx/ap4/SiPnbdMREzwbkIC0tkSAuF3kfSdg+7wd/FuCCQyiveCq/jpmqmbHWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706806865; c=relaxed/simple; bh=ORVetPFkmT4UVVKKyCuUwRmeXNPw9HlZpcxW5dV/1Dk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EkxgHlGe6gwLWCGcFOGRHkmXdaQ2AaToKVHsKt3yCtoH/h3eDl0VPEc21cph1kxNtiUYPwO8dL9ckOPVrWUAOTgtQFoqUpRm3Xe2vqrMDEJLf9+4r5dWFWJxL8KKT805zRIbJ5KE8DVYvKr2Tj+LwzOrTES+vyFQKHfmbEzZRiI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F99T2ocV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5109C433C7; Thu, 1 Feb 2024 17:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706806864; bh=ORVetPFkmT4UVVKKyCuUwRmeXNPw9HlZpcxW5dV/1Dk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=F99T2ocV6qN+IxcFBwsn1LL6d0OPn/uvYQqJ2bqeNJphRnC6Hb19Iz0KZVFjYNc6s cdrGzteR7vwQyZHb44z5Yd1qtb1DHg9xBvK06x2qpVIf/uyzjM8xDzRNkJTMLRTsYG 9ieheOzFg9iddMtn2M1k2ll66EmdnIc4tovtT4atRBTOaHv7ihbp7HnhZcSgaj9mRF Vf0REkKwiiuU4fR4MCwFO9TyAgtP1XDOGomXwI6KRQZEfiYqfnxwXFXk5YsxHL3AqI 6KLyxNZCUfXr9JxLG+NyQjqk3SYXxRqoxD/dic1yTuYWXmUkQ3GVQ5eKyDrvGCoh5z vPH6M5krOt8yg== Date: Thu, 1 Feb 2024 18:01:01 +0100 From: Maxime Ripard To: "Klymenko, Anatoliy" Cc: Laurent Pinchart , "maarten.lankhorst@linux.intel.com" , "tzimmermann@suse.de" , "airlied@gmail.com" , "daniel@ffwll.ch" , "Simek, Michal" , "dri-devel@lists.freedesktop.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: RE: Re: [PATCH 0/4] Fixing live video input in ZynqMP DPSUB Message-ID: <2ytxhpti53e743b5pca3oa5jmscffi4vpsyeh727bcoh4v6cuw@zkz5pqkcv7v2> References: <20240112234222.913138-1-anatoliy.klymenko@amd.com> <6jhwss2wego6yoo5mwmphwawhsj5bbj62gwrzcpapoixwkrkli@g4fbxdooopby> <20240117142343.GD17920@pendragon.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pjqnxa646r7gclj6" Content-Disposition: inline In-Reply-To: --pjqnxa646r7gclj6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2024 at 11:18:30PM +0000, Klymenko, Anatoliy wrote: >=20 >=20 > > -----Original Message----- > > From: Maxime Ripard > > Sent: Friday, January 26, 2024 4:26 AM > > To: Laurent Pinchart > > Cc: Klymenko, Anatoliy ; > > maarten.lankhorst@linux.intel.com; tzimmermann@suse.de; airlied@gmail.c= om; > > daniel@ffwll.ch; Simek, Michal ; dri- > > devel@lists.freedesktop.org; linux-arm-kernel@lists.infradead.org; linu= x- > > kernel@vger.kernel.org > > Subject: Re: Re: [PATCH 0/4] Fixing live video input in ZynqMP DPSUB > >=20 > > On Wed, Jan 17, 2024 at 04:23:43PM +0200, Laurent Pinchart wrote: > > > On Mon, Jan 15, 2024 at 09:28:39AM +0100, Maxime Ripard wrote: > > > > On Fri, Jan 12, 2024 at 03:42:18PM -0800, Anatoliy Klymenko wrote: > > > > > Patches 1/4,2/4,3/4 are minor fixes. > > > > > > > > > > DPSUB requires input live video format to be configured. > > > > > Patch 4/4: The DP Subsystem requires the input live video format = to be > > > > > configured. In this patch we are assuming that the CRTC's bus for= mat is fixed > > > > > and comes from the device tree. This is a proposed solution, as t= here are no > > api > > > > > to query CRTC output bus format. > > > > > > > > > > Is this a good approach to go with? > > > > > > > > I guess you would need to expand a bit on what "live video input" i= s? Is > > > > it some kind of mechanism to bypass memory and take your pixels str= aight > > > > from a FIFO from another device, or something else? > > > > > > Yes and no. > > > > > > The DPSUB integrates DMA engines, a blending engine (two planes), and= a > > > DP encoder. The dpsub driver supports all of this, and creates a DRM > > > device. The DP encoder hardware always takes its input data from the > > > output of the blending engine. > > > > > > The blending engine can optionally take input data from a bus connect= ed > > > to the FPGA fabric, instead of taking it from the DPSUB internal DMA > > > engines. When operating in that mode, the dpsub driver exposes the DP > > > encoder as a bridge, and internally programs the blending engine to > > > disable blending. Typically, the FPGA fabric will then contain a CRTC= of > > > some sort, with a driver that will acquire the DP encoder bridge as > > > usually done. > > > > > > In this mode of operation, it is typical for the IP cores in FPGA fab= ric > > > to be synthesized with a fixed format (as that saves resources), while > > > the DPSUB supports multiple input formats. > >=20 > > Where is that CRTC driver? It's not clear to me why the format would > > need to be in the device tree at all. Format negociation between the > > CRTC and whatever comes next is already done in a number of drivers so > > it would be useful to have that kind of API outside of the bridge > > support. > > One example of such CRTC driver: > https://github.com/Xilinx/linux-xlnx/blob/master/drivers/gpu/drm/xlnx/xln= x_mixer.c It's not > upstreamed yet. Bus format negotiations here are handled by utilizing Xil= inx-specific bridge > framework. Ideally, it would be nice to rework this to comply with the up= stream DRM bridge > framework. > > > > Bridge drivers in the upstream kernel work the other way around, with > > > the bridge hardware supporting a limited set of formats, and the CRTC > > > then being programmed with whatever the bridges chain needs. Here, the > > > negotiation needs to go the other way around, as the CRTC is the > > > limiting factor, not the bridge. > >=20 > > Sounds like there's something to rework in the API then? > >=20 > Adding an optional CRTC callback imposing CRTC specific bus format restri= ctions, which may be > called from here https://github.com/torvalds/linux/blob/master/drivers/gp= u/drm/drm_bridge.c#L935 > would solve the problem. CRTCs and bridges are orthogonal. If anything, I'd expect that callback to be set at the CRTC, encoder and connector levels and filled by the drm_bridge code if relevant. Maxime --pjqnxa646r7gclj6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZbvOTAAKCRDj7w1vZxhR xbVPAP49vGrbelyhqSYUXSE85/vH2qXOXAJu3q1Y/CUU9DUANwEAlmtHkOex/CVN fX5vhl8ixN+4cmpKXQHWEroLwF3pxAQ= =Pm76 -----END PGP SIGNATURE----- --pjqnxa646r7gclj6--