From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2] drm/tegra: Add tegra_gem_mmap2 to fix 64-bit offsets Date: Fri, 30 Jan 2015 10:49:35 +0100 Message-ID: <20150130094935.GB16744@ulmo> References: <1422559121-24477-1-git-send-email-seanpaul@chromium.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1611805473==" Return-path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 90B9789E1A for ; Fri, 30 Jan 2015 01:49:38 -0800 (PST) Received: by mail-wg0-f49.google.com with SMTP id k14so25860729wgh.8 for ; Fri, 30 Jan 2015 01:49:37 -0800 (PST) In-Reply-To: <1422559121-24477-1-git-send-email-seanpaul@chromium.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Sean Paul Cc: marcheu@chromium.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1611805473== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 29, 2015 at 02:18:41PM -0500, Sean Paul wrote: > On 64-bit targets, tegra_gem_mmap doesn't return the > offset to userspace. As such, subsequent calls to mmap(2) > fail. Add a new tegra_gem_mmap2 ioctl to fix this. >=20 > Signed-off-by: Sean Paul > --- > drivers/gpu/drm/tegra/drm.c | 21 +++++++++++++++++++++ > include/uapi/drm/tegra_drm.h | 9 +++++++++ > 2 files changed, 30 insertions(+) To be honest, I'd rather just fix the existing IOCTL to do the right thing on 64-bit. All IOCTLs are still protected by the DRM_TEGRA_STAGING Kconfig symbol which depends on STAGING. We originally did that precisely so we'd have some leeway in fixing things up. And we've done precisely that in the past. The only user of this IOCTL is libdrm and I don't think that has any users aside from a few projects that are still under heavy development (like grate or the xf86-video-opentegra driver). Cc'ing Erik, who's probably the only one that's ever worked with this, besides me. Thierry --vGgW1X5XWziG23Ko Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUy1OvAAoJEN0jrNd/PrOhqLYQALjQMzQONwV0fX5fAkm1x6GM fscLJ2IUrnNeEypexCZ1xyvesx2WBNTH3UOU/1c9I5AonSWC/bMoN9NyDmdJe5VT tBqsY1FwXQz2o77dky9+Gy3Grf0XdUyx/N9USfJ73Xc3d5QGO3rqfAbJBRCBvFC7 WWWa3GkgzkrK22uIK7h8P3Wq7hplP4WuJ2e3VTWgsvJDfOXyV6aWVe+wfMHLWtZy imxfVQtwWuZPA/hG9gcO8GvY6gUmzc7wgFm0sTka2IB9IYVBnwP3OOLVRHGmcF93 YHb073MeFvUQCkA1HY54N/QCv/Lw9BjoEVjYVAbP+u9Z4jGrI4NZrayR6GUKMn3O I1hLYfvsz7SaJPFa266zzygfEJWjCOkBD36nNyBZaQ5az4CBW8oWp5Zpij+smiwF dW+u1zN3KpbD+Af9Tgr9P7l/y5GCgWUd+AuWNLjBo4YGAJv5VIjTTUSJHvDLtsq0 91ooo7HEb0eP2K9pbx59C3xI6/qsIpstBxRnmn/ILfvYPN0AxYRwJazKlxMmfENz vvYuopjbnDzMALsN7J2eHl/Ja39wASzYqWBwRKQzvZMYxwL8H7GX8ks2ikP2hzeM yEYYWonDwpi4oZVsh1CucXRggAB2+h5piRkXjUYTJyvhKCaGs+2nKalC0cAJG/SW ZZia+oqnl1/x58yrk2RL =dWS/ -----END PGP SIGNATURE----- --vGgW1X5XWziG23Ko-- --===============1611805473== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1611805473==--