From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v2] drm/i915: Promote .format_mod_supported() to the lead role Date: Wed, 30 May 2018 11:30:26 -0700 Message-ID: <87r2lthu7x.fsf@anholt.net> References: <20180319165017.31908-1-ville.syrjala@linux.intel.com> <20180518162159.30305-1-ville.syrjala@linux.intel.com> <877enwu86a.fsf@anholt.net> <20180522163607.GI23723@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0085983310==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C9A16E4AB for ; Wed, 30 May 2018 18:30:28 +0000 (UTC) In-Reply-To: <20180522163607.GI23723@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0085983310== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ville Syrj=C3=A4l=C3=A4 writes: > On Mon, May 21, 2018 at 12:21:01PM -0700, Eric Anholt wrote: >> Ville Syrjala writes: >>=20 >> > From: Ville Syrj=C3=A4l=C3=A4 >> > >> > Up to now we've used the plane's modifier list as the primary >> > source of information for which modifiers are supported by a >> > given plane. In order to allow auxiliary metadata to be embedded >> > within the bits of the modifier we need to stop doing that. >> > >> > Thus we have to make .format_mod_supported() aware of the plane's >> > capabilities and gracefully deal with any modifier being passed >> > in directly from userspace. >>=20 >> This seems like it would be a lot shorter if you just had a helper to >> check if your format and modifier was in drm_plane->format_types and >> drm_plane->modifiers, since then you wouldn't be duplicating your tables >> and you wouldn't need has_ccs either. > > I suppose. And I guess that's where I started originally :/ > > But I'm not sure if it's better go that route or the other route of > reducing the arrays to some simple supersets and also utilize > .format_mod_supported() in plane init to filter out the unsupported > formats when populating the plane's format list. Probably best not > dwell on this too much for now so that we can at least make some > progress :) > >>=20 >> However, it's not my driver and it unblocks vc4's patch, so: >>=20 >> Reviewed-by: Eric Anholt > > Thanks. I'm guessing we should push this into drm-misc-next so > that you can pile your core/sand bits on top? That would be wonderful. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlsO7cIACgkQtdYpNtH8 nuhEEg//fLWnMepfHGOX622DGlmdMFHr6YBDE1fZEqyy85+rl+jJnOas+z0a3Dbq abrf2jalkIjJOCX5nYi3KAPxiXZpJ1Vqtzy+NbnJoRPsaX/h7TH9UaOdTyXb8yii 0yWVOvFkGsY+mVcxdV7pT/m+b6s57E1Ju0411g8yK8dxP79Wjtos9QLKdM9UL3vH E9mhG5PPqKl46m3jcwKEomt/nu7NtoNy6oM0UIzYIsWKWX7y5bNvoGG/o98/Uw8U f/QrlJSa4cK7bNoNGNUbprE/O1pdfbtXx2dJwcB8ahlVfgQIM8omH9Gk0veMXEQ/ If1GAxymMo2FPUU/EmHWCQtXbwyRAl/ITmLB8YZgrBpNZmA+Uio5eXMXN0CWYtHZ gf8leQdYCCs3UXj0Cps1xNJAa+02vU9aZCcHSkr26YVfZwbjiYi18s0Nd+6iUdrq GEcSdQEXrZnOgTDBz7R0pDo8qn6z4E3h2sUd1VwI9EuvdocGqIgLVTn42vBSHjrj oh6dEWOIZxwoR2Z+lNe6RvbuoMTXf3McHOXdqeZC0SmiY/F8SjYnCzo9dxuHBDgy kxwGb6Z1xb1BSDtX9HkbSv6+ICfPH0m+0y4sCI42miQ4jEJ+5lUv6GRdhp8zEB2U MVRPtrWJEf6sY5yt+g5pyT5j32uw+AoaQIiS33k8BM/tGqlIcbc= =ILZO -----END PGP SIGNATURE----- --=-=-=-- --===============0085983310== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0085983310==--