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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AE5DC433E1 for ; Wed, 15 Jul 2020 13:53:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB30920657 for ; Wed, 15 Jul 2020 13:53:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="whe9O96Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB30920657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject: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=DoY4A6Yz54FnmM01S+T4ppuZLttUYfboK1sRgiBbA/g=; b=whe9O96ZWrtDjoXwGqj5f3u2k sr+ahVnGh7wuGGV6AZmko0TQnbxnD6cJMts5k9tbfQqff4guyGag9yH3bYvo1Hj7emIktxKNvHztd XQeDDLsR/RZqypY33poW0+w9fjcVcjrGPsbkYYJJp4PPDX92rWxPJQwpkTscDfjIlGq33D44j5FzE Fn13NVW4rR/u+0hjPYo99HoJVRu85R3GgY42pt+mNPP9kfTh/vBUfXps5Ke085z18c0yeZfLf1E5Q uDXDzq0LTSRhBRqmvZj3g7w9aIgES4piNPNil3JvpugDWKtnduGzy/UZa9GNXHOFe4Pq5XiOhVLQ0 M8+dQR5tg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvhpF-0005af-Sl; Wed, 15 Jul 2020 13:51:57 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvhpB-0005ZJ-Km for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 13:51:55 +0000 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id B7D4820008; Wed, 15 Jul 2020 13:51:46 +0000 (UTC) Date: Wed, 15 Jul 2020 15:51:45 +0200 From: Paul Kocialkowski To: Ezequiel Garcia Subject: Re: [PATCH] media: cedrus: Propagate OUTPUT resolution to CAPTURE Message-ID: <20200715135145.GA2019248@aptenodytes> References: <20200514153903.341287-1-nicolas.dufresne@collabora.com> <3c8a235ebb0bf76bcffeb8c6b983cd4c95d77459.camel@collabora.com> MIME-Version: 1.0 In-Reply-To: <3c8a235ebb0bf76bcffeb8c6b983cd4c95d77459.camel@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_095153_862825_7EF1F767 X-CRM114-Status: GOOD ( 21.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Nicolas Dufresne , kernel@collabora.com, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Maxime Ripard , Hans Verkuil , Chen-Yu Tsai , stable@vger.kernel.org, Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: multipart/mixed; boundary="===============5234705828894223572==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5234705828894223572== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed 15 Jul 20, 08:57, Ezequiel Garcia wrote: > It seems this one felt thru the cracks. Sorry for the delay. >=20 > On Thu, 2020-05-14 at 11:39 -0400, Nicolas Dufresne wrote: > > As per spec, the CAPTURE resolution should be automatically set based on > > the OTUPUT resolution. This patch properly propagate width/height to the > > capture when the OUTPUT format is set and override the user provided > > width/height with configured OUTPUT resolution when the CAPTURE fmt is > > updated. > >=20 > > This also prevents userspace from selecting a CAPTURE resolution that is > > too small, avoiding unwanted page faults. > >=20 > > Signed-off-by: Nicolas Dufresne >=20 > This looks correct. Looks like there's no issue with alignment (that will get applied as well), which was a possible concern. Thanks for reviewing! Acked-by: Paul Kocialkowski Cheers, Paul > Reviewed-by: Ezequiel Garcia >=20 > Thanks, > Ezequiel >=20 > > --- > > drivers/staging/media/sunxi/cedrus/cedrus_video.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > >=20 > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/driver= s/staging/media/sunxi/cedrus/cedrus_video.c > > index 16d82309e7b6..a6d6b15adc2e 100644 > > --- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c > > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c > > @@ -247,6 +247,8 @@ static int cedrus_try_fmt_vid_cap(struct file *file= , void *priv, > > return -EINVAL; > > =20 > > pix_fmt->pixelformat =3D fmt->pixelformat; > > + pix_fmt->width =3D ctx->src_fmt.width; > > + pix_fmt->height =3D ctx->src_fmt.height; > > cedrus_prepare_format(pix_fmt); > > =20 > > return 0; > > @@ -319,11 +321,14 @@ static int cedrus_s_fmt_vid_out(struct file *file= , void *priv, > > break; > > } > > =20 > > - /* Propagate colorspace information to capture. */ > > + /* Propagate format information to capture. */ > > ctx->dst_fmt.colorspace =3D f->fmt.pix.colorspace; > > ctx->dst_fmt.xfer_func =3D f->fmt.pix.xfer_func; > > ctx->dst_fmt.ycbcr_enc =3D f->fmt.pix.ycbcr_enc; > > ctx->dst_fmt.quantization =3D f->fmt.pix.quantization; > > + ctx->dst_fmt.width =3D ctx->src_fmt.width; > > + ctx->dst_fmt.height =3D ctx->src_fmt.height; > > + cedrus_prepare_format(&ctx->dst_fmt); > > =20 > > return 0; > > } > > --=20 > > 2.26.2 > >=20 > >=20 >=20 >=20 --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --n8g4imXOkfNTN/H1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAl8PCfAACgkQ3cLmz3+f v9Hn4Af9EzN5gnaUQKr1CzXC653L4rnjwlGYHhQ1ctQj7EtF8LgF6iugRO1UMIF9 nKLxp3yyElrKlWAE3DpaVDmb4cilu8IzSeO3T6f9XtUwaAhJcsmP+QEeQ3QLT2R/ yclIp4Nv7u93jYLvPDXKLf4BPQ1Gjrrhh1R9fEda+GV/lVkaY6jzFBoGwPRCr7Ix t0FWyHNrOH+FfAAWm+gmqWB4Molnl3cd1vYcvWBbM8Yf7VbDL3DyvUA6NhUCcs64 f5OUBpJVGArH7HxL/sHB7pmqG4pcsQeljXE1GPuV77+/AJ/AlvpVslpWyC4sOx1C PdDbVhi/dtKugkhQNAtUN2fnmFHRAg== =49po -----END PGP SIGNATURE----- --n8g4imXOkfNTN/H1-- --===============5234705828894223572== 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 --===============5234705828894223572==--