From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 43/48] drm/i915: Warn on gem_pin usage Date: Wed, 18 Dec 2013 16:25:48 +0100 Message-ID: <20131218152548.GN26371@phenom.ffwll.local> References: <20131206215521.GA6922@bwidawsk.net> <1386367941-7131-1-git-send-email-benjamin.widawsky@intel.com> <1386367941-7131-43-git-send-email-benjamin.widawsky@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 92BFEFCE87 for ; Wed, 18 Dec 2013 07:24:56 -0800 (PST) Received: by mail-ea0-f177.google.com with SMTP id n15so3637305ead.36 for ; Wed, 18 Dec 2013 07:24:55 -0800 (PST) Content-Disposition: inline In-Reply-To: <1386367941-7131-43-git-send-email-benjamin.widawsky@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Ben Widawsky Cc: Intel GFX , Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Fri, Dec 06, 2013 at 02:11:28PM -0800, Ben Widawsky wrote: > The pin IOCTL is leftover from the days of yore. It allows you to take a > buffer, pin it, and receive the offset of that buffer. The IOCTL does > not support the newer notion of contexts and VM, and therefore is not > suitable for modern usage. > > The unsolvable problem is, "which address space do I pin this in?" > > As there are still mechanisms to do things only with the GGTT, and this > could potentially have benefit as workarounds, leave it in place, but > provide a warning to users. > > Request-to-not-deprecate-by: Chris Wilson > Signed-off-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_gem.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index f7114ae..a03c262 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -3950,6 +3950,8 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data, > goto out; > } > > + if (USES_FULL_PPGTT(dev)) > + DRM_DEBUG_DRIVER("Pinning with full PPGTT is not recommended\n"); I disagree. If we need this for a w/a we need a real w/a, not some root-only hack. I'll add a patch to reject pin on pre-gen6. -Daniel > obj->user_pin_count++; > obj->pin_filp = file; > > -- > 1.8.4.2 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch