From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v2] drm/v3d: clean caches at the end of render jobs on request from user space Date: Wed, 18 Sep 2019 10:28:40 -0700 Message-ID: <87woe5econ.fsf@anholt.net> References: <20190918091521.9765-1-itoral@igalia.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0926062193==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E9C66F5B1 for ; Wed, 18 Sep 2019 17:28:43 +0000 (UTC) In-Reply-To: <20190918091521.9765-1-itoral@igalia.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: Iago Toral Quiroga List-Id: dri-devel@lists.freedesktop.org --===============0926062193== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Iago Toral Quiroga writes: > Extends the user space ioctl for CL submissions so it can include a reque= st > to flush the cache once the CL execution has completed. Fixes memory > write violation messages reported by the kernel in workloads involving > shader memory writes (SSBOs, shader images, scratch, etc) which sometimes > also lead to GPU resets during Piglit and CTS workloads. > > v2: if v3d_job_init() fails we need to kfree() the job instead of > v3d_job_put() it (Eric Anholt). > > Signed-off-by: Iago Toral Quiroga > Reviewed-by: Eric Anholt > Link: https://patchwork.freedesktop.org/patch/msgid/20190912083516.13797-= 1-itoral@igalia.com > diff --git a/include/uapi/drm/v3d_drm.h b/include/uapi/drm/v3d_drm.h > index 58fbe48c91e9..58d2040ea48c 100644 > --- a/include/uapi/drm/v3d_drm.h > +++ b/include/uapi/drm/v3d_drm.h > @@ -48,6 +48,8 @@ extern "C" { > #define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM= _V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu) > #define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM= _V3D_SUBMIT_CSD, struct drm_v3d_submit_csd) >=20=20 > +#define DRM_V3D_SUBMIT_CL_FLUSH_CACHE_FLAG 0x01 > + Hmm. vc4, msm, panfrost, etnaviv, i915 all name their submit flags without "_FLAG" in the name, can we drop that? Also, I just noticed: You don't have a new param to indicate the availability of the new flag. You're going to need that (unless you've got some other clever plan?) so that new Mesa can detect an old kernel and not expose the GLES 3.1 features that require it. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAl2CaUgACgkQtdYpNtH8 nugaBxAAhHbdmhvKALXTJJDK0hPR9jkaTEBvgzC1FXQEzQ2bgJ+r12PEwu0wFyfe c/nd1rXE5QikN7NJMHR+2GWhCzwPLy9tQGp/GZuo0FTO4AtkqTA7GV9tBy1O3ERH drEcmKomd8N91CgBXfDgpomFt6aCLTi1slJLV0BOXyx1eibKLQhidnGXse4AbZRm oXNkJM6Tn3x/Pxrhu9g9FuxKiAGoqNICxznC8yfno23P6AdAeuARe1yCV/MguonW yKoFtBeBIX7cprc+uv3uInHETT05XrYLPciZjQAAgEq35wp74OLmbdogNlzZzA37 bwG/m4h/Yuu4ciN8B3VITix6AYzhdrP6jmYpP/Ye9LzVinke2VJ65exga2wGcYxw i6DW9BNUKU2j2UeTBA0sgtSqgsx1GzW9+oRAVKrQbGqAr3e4YMR5INutiHqT6Enl H/QsjMv0nrjzhC+OlCn0f6ilcbeQMktNdil6U0kQPt+UGGy8KOYE2NPfmZ/Cuc1q 1OvKqgk2sV2v9kKOl6iLuM2F+F/4UeM+o8qGexHgEvpBQ4mXuc4qxOKLb0m8kHZ/ CfnxP8/NRJtv9hAay3qvVSy5WI366ts4P/Cvm6Na7F0t/Wuzj5vJRCvQcWH1/qOc hliYtrRM63ERuuixoSHKVXDMsDgXWA76ZNvTP5uy7YG5dxA+RU4= =E47I -----END PGP SIGNATURE----- --=-=-=-- --===============0926062193== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0926062193==--