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 11:21:34 +0100 Message-ID: <20150130102133.GD16744@ulmo> References: <1422559121-24477-1-git-send-email-seanpaul@chromium.org> <20150130094935.GB16744@ulmo> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1685432322==" Return-path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BEB26E0AC for ; Fri, 30 Jan 2015 02:21:37 -0800 (PST) Received: by mail-wg0-f51.google.com with SMTP id k14so25950070wgh.10 for ; Fri, 30 Jan 2015 02:21:36 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Erik Faye-Lund Cc: marcheu@chromium.org, "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org --===============1685432322== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GpGaEY17fSl8rd50" Content-Disposition: inline --GpGaEY17fSl8rd50 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 30, 2015 at 11:15:30AM +0100, Erik Faye-Lund wrote: > On Fri, Jan 30, 2015 at 10:49 AM, Thierry Reding > wrote: > > 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. > >> > >> 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. >=20 > I also saw the patch, and had the same reaction. I'm fine with > changing the ABI, it was done already anyway > (cbfbbabb89b37f6bad05f478d906a385149f288d, "drm/tegra: Remove > gratuitous pad field"). And as you say, this is only in staging so > nobody is really relying on it, except grate and libdrm (in which this > is clearly marked as experimental). I'm fine with just changing it, > and updating grate and libdrm accordingly. Okay, I can prepare a patch for libdrm and push it if we decide to go ahead with this plan. Rob, Sean, (anyone,) any objections to just changing the ABI? I made another pass through the list of IOCTL argument structures and couldn't spot any others that would have the same issue. Perhaps we're finally approaching a point where we can remove the dependency on STAGING? Thierry --GpGaEY17fSl8rd50 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUy1stAAoJEN0jrNd/PrOh7RoQAMCHBHHY5NB4m+XF5YcBsG7M AyfLPBGsaJJ1Lh8kas3Ucb6xk4x+4tyqC6pyllZzFkkLH6EyN3F1hXq/7TnusL5v tjT029JPaDXvyffyoPqr1vaqRi8/+GjhuYF4qkSK5e2lpwzfikvl6PTPfl6vo+Rb nvI26qHrG/6pcCTN+I7rE8aiNIgtYZns327bBuHpUtnXsyDsmSEN1ULyUt3AfYEo V/Wi2DFKEU3vxVzSK0fae6vpaXGn1Ru8UaVyx9ufpk9mU8SmoP2GfTHj9YzXOhuh IkpMkjvf1+Mv3r0MqKypK9PwKyvKVjROBdPT64L6BiOGOr8lFTWxmrY+ncK46KZ3 +PxWBsxMmGEMhF/vD+1FBD1u4+nNyI2WazTHcZj90BPkAPoVjkjW1NbhWrZXaOeG JA5uEEAZHeg5ymg/nhuzigc2aQ6R1VLNokimWXiX/Ee+DeM+UaV9edrotHiSOzzg iKvhoIO3yTlH5l4HUU8we0Wp4VMnveJ+FHLAexYW8ObwzIlaoxp0aDq0ID3uuZE1 t9X6YZqwQCX9mQR1qqXvSbf3tnG7NTbROl3p3JkHpiA1PlMvg/6yLM95z5QNtehY McWTPdSbwO9o6hWwIKKjQtIdZ/2CaUpQoSPHcJGHbZbY/qeaZwA2IbJgCLz8oaOb fkb/HBXQ1ZYBKooRKFt2 =h6ga -----END PGP SIGNATURE----- --GpGaEY17fSl8rd50-- --===============1685432322== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1685432322==--