From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 2/3] drm/panfrost: Expose HW counters to userspace Date: Fri, 05 Apr 2019 08:36:32 -0700 Message-ID: <87wok8tqf3.fsf@anholt.net> References: <20190404152051.17996-1-boris.brezillon@collabora.com> <20190404152051.17996-3-boris.brezillon@collabora.com> <20190404154129.GA2999@rosenzweig.io> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1084689356==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id A31128991C for ; Fri, 5 Apr 2019 15:36:35 +0000 (UTC) In-Reply-To: <20190404154129.GA2999@rosenzweig.io> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Alyssa Rosenzweig , Boris Brezillon Cc: Rob Herring , kernel@collabora.com, dri-devel@lists.freedesktop.org, Neil Armstrong List-Id: dri-devel@lists.freedesktop.org --===============1084689356== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Alyssa Rosenzweig writes: >> @@ -55,6 +63,15 @@ struct drm_panfrost_submit { >>=20=20 >> /** A combination of PANFROST_JD_REQ_* */ >> __u32 requirements; >> + >> + /** Pointer to a u32 array of perfmons that should be attached to the = job. */ >> + __u64 perfmon_handles; >> + >> + /** Number of perfmon handles passed in (size is that times 4). */ >> + __u32 perfmon_handle_count; >> + >> + /** Unused field, should be set to 0. */ >> + __u32 padding; > > Bleep blorp. If we're modifying _submit, we'll need to be swift about > merging this ahead of the main code to make sure we don't break the > UABI. Although I guess if we're just adding fields at the end, that's a > nonissue. You can extend ioctl structs safely. When older userspace passes theirs in, it has the shorter length encoded in the cmd. The kernel allocates the newest version's space, copies in the shorter struct, and zero-extends the rest. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlyndgEACgkQtdYpNtH8 nuiMphAAn56hfvBzerYC1ktp2KK/rTeHT7zY21FsbiTG+kn6buQY8ZEwz1JYjrDY KUdzLiJSUHvf+iaq6nYCD7fHyAToMHyBDEi1ltwN6gAoMBKJ4tBVIfig8e3ClA19 DWrIAFuzHsjcFSJocPuHGx8wpxbIlkFIeIvRNSIQR/bJtTse69qbmXUhNsHSTfPi QphpV7hH9b7AlFxenMPHepQ0IN7jbWheUNALsR3XvTNegWyA653dIbMFQrIQlHnV EdKHoXxGzsO8Ev6DKljosnADGyxiMvDmm3BM/0tnodyYTXDugXibO+5rktD07QeY fJdX9BnNozNIPTeFn8v40Kw63xN8xAV0mPl2RqV4eax+jy0NB/hAafGnrK7JLbMP 1yBCpAanFWjk1jTf2XvsOwjPuu0aTIZIiS7aIOzW2pNJPGwnfRsG71kM/t/T8SEG n8dHR2OJ+/7L//C7HHVr6t9hP+SBBtGsX0v5Yi77Bha77nC4YzE1ZD+ZGFH4T6fi SnOs+c99+QuZ/Ar6IkboZ3Iq91ySdZzpRiWTBAalfZY0wcyMj+Mmhm7FBNs2chX4 A70e10rTXq6ebTa9eXsl7GgDZMAddQLk/v9Zl+EfhiqQTWdXnlUK7d1lopqo1dRu BQkHdOtcqq03aL2JrAnODS7hXZ1LG7KmCx2NRC42BqXMxMPwlP0= =Veeh -----END PGP SIGNATURE----- --=-=-=-- --===============1084689356== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1084689356==--