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=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham 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 79D9DC43381 for ; Thu, 21 Mar 2019 10:13:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49DE2218AE for ; Thu, 21 Mar 2019 10:13:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728022AbfCUKNk (ORCPT ); Thu, 21 Mar 2019 06:13:40 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:54535 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727903AbfCUKNj (ORCPT ); Thu, 21 Mar 2019 06:13:39 -0400 X-Originating-IP: 90.88.33.153 Received: from localhost (aaubervilliers-681-1-92-153.w90-88.abo.wanadoo.fr [90.88.33.153]) (Authenticated sender: maxime.ripard@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5434560003; Thu, 21 Mar 2019 10:13:36 +0000 (UTC) Date: Thu, 21 Mar 2019 11:13:35 +0100 From: Maxime Ripard To: Paul Kocialkowski Cc: Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , Mauro Carvalho Chehab , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [RFC PATCH 03/20] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp Message-ID: <20190321101335.wws44wdh42jazboq@flea> References: <6e5850afb02cc2851fe3229122fb3cb4869dc108.1553032382.git-series.maxime.ripard@bootlin.com> <2ef894df9d9e79d4a89e745e95c79bbb6a2505e4.camel@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3fgryhrccqk3ctcg" Content-Disposition: inline In-Reply-To: <2ef894df9d9e79d4a89e745e95c79bbb6a2505e4.camel@bootlin.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3fgryhrccqk3ctcg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2019 at 03:24:26PM +0100, Paul Kocialkowski wrote: > Hi, > > Le mardi 19 mars 2019 =E0 22:57 +0100, Maxime Ripard a =E9crit : > > So far, the drm_format_plane_cpp function was operating on the format's > > fourcc and was doing a lookup to retrieve the drm_format_info structure= and > > return the cpp. > > > > However, this is inefficient since in most cases, we will have the > > drm_format_info pointer already available so we shouldn't have to perfo= rm a > > new lookup. Some drm_fourcc functions also already operate on the > > drm_format_info pointer for that reason, so the API is quite inconsiste= nt > > there. > > Well, it seems that drm_fourcc functions that take a drm_format_info > have a drm_format_info prefix, so having this would be more consistent. > > And given what the helper does, I think it would make good sense to > switch it over to an inline drm_format_info_plane_cpp helper. > > What do you think? That makes total sense, I'll change it. Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --3fgryhrccqk3ctcg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXJNjzwAKCRDj7w1vZxhR xeDxAP9igUy53jj/yNPXFCSDY7e7I/oyTqzXAlWmASCZBvYc8QEAoY9iAzv0Sp6E 4o3AlROC52GmSYBbNWGK0MvLa14chgY= =J/XE -----END PGP SIGNATURE----- --3fgryhrccqk3ctcg-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [RFC PATCH 03/20] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp Date: Thu, 21 Mar 2019 11:13:35 +0100 Message-ID: <20190321101335.wws44wdh42jazboq@flea> References: <6e5850afb02cc2851fe3229122fb3cb4869dc108.1553032382.git-series.maxime.ripard@bootlin.com> <2ef894df9d9e79d4a89e745e95c79bbb6a2505e4.camel@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2098278542==" Return-path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id ED52B6E045 for ; Thu, 21 Mar 2019 10:13:39 +0000 (UTC) In-Reply-To: <2ef894df9d9e79d4a89e745e95c79bbb6a2505e4.camel@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Paul Kocialkowski Cc: Thomas Petazzoni , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans Verkuil , Sean Paul , Laurent Pinchart , Sakari Ailus , Daniel Vetter , Mauro Carvalho Chehab , linux-media@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org --===============2098278542== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3fgryhrccqk3ctcg" Content-Disposition: inline --3fgryhrccqk3ctcg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2019 at 03:24:26PM +0100, Paul Kocialkowski wrote: > Hi, > > Le mardi 19 mars 2019 =E0 22:57 +0100, Maxime Ripard a =E9crit : > > So far, the drm_format_plane_cpp function was operating on the format's > > fourcc and was doing a lookup to retrieve the drm_format_info structure= and > > return the cpp. > > > > However, this is inefficient since in most cases, we will have the > > drm_format_info pointer already available so we shouldn't have to perfo= rm a > > new lookup. Some drm_fourcc functions also already operate on the > > drm_format_info pointer for that reason, so the API is quite inconsiste= nt > > there. > > Well, it seems that drm_fourcc functions that take a drm_format_info > have a drm_format_info prefix, so having this would be more consistent. > > And given what the helper does, I think it would make good sense to > switch it over to an inline drm_format_info_plane_cpp helper. > > What do you think? That makes total sense, I'll change it. Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --3fgryhrccqk3ctcg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXJNjzwAKCRDj7w1vZxhR xeDxAP9igUy53jj/yNPXFCSDY7e7I/oyTqzXAlWmASCZBvYc8QEAoY9iAzv0Sp6E 4o3AlROC52GmSYBbNWGK0MvLa14chgY= =J/XE -----END PGP SIGNATURE----- --3fgryhrccqk3ctcg-- --===============2098278542== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============2098278542==--