From patchwork Wed Feb 2 23:00:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 528041 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p12N6QbR007811 for ; Wed, 2 Feb 2011 23:06:46 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C63879E9E5 for ; Wed, 2 Feb 2011 15:06:25 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gy0-f177.google.com (mail-gy0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 78A389E955 for ; Wed, 2 Feb 2011 15:01:00 -0800 (PST) Received: by gyg4 with SMTP id 4so236640gyg.36 for ; Wed, 02 Feb 2011 15:01:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=84JPj+t2X2613gUkRaCkFy0L+4ezeewdhoPzNLXA6Hw=; b=QXySgxRRsNMkSfHTUE2fkJ3EfA01KLTN716uCuBJjUNu8jfKapqa6EFmHHZmh0MmBW 8H9WgEyWLo7LKQia0AjPhIYtjMEnq/7besug/CCgKql5BAOAhR8c6MFTK1iTXrc/6/bP SerygWV7tlxPsxASECn6cTD56o5+k51KbzB7E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=tEpTnmA3aKBpbUVjRcipru8BQTOLT5wzFNiRg/Q7wdnvFTyiQhLpvN8C/T8uh/jKt7 jROeUYMRYHBiFjjY5vqpmcsb5RU5LxtjSVrk9uwukfdL6yFnbvW5t0EBRJm9bnPNF72N k8jwUygQ44kAp2yN02W5e2Tp7fFqqXQhEd5b0= Received: by 10.151.84.17 with SMTP id m17mr12216504ybl.261.1296687659942; Wed, 02 Feb 2011 15:00:59 -0800 (PST) Received: from localhost.localdomain ([134.134.139.76]) by mx.google.com with ESMTPS id i10sm79654yhd.10.2011.02.02.15.00.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 02 Feb 2011 15:00:58 -0800 (PST) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Wed, 2 Feb 2011 15:00:20 -0800 Message-Id: <1296687620-27019-9-git-send-email-bwidawsk@gmail.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1296687620-27019-1-git-send-email-bwidawsk@gmail.com> References: <1296687620-27019-1-git-send-email-bwidawsk@gmail.com> Subject: [Intel-gfx] [PATCH 8/8] drm/i915/context: context switch, and PPGTT params X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 02 Feb 2011 23:07:25 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8dbf17c..1c1eecc 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -771,6 +771,12 @@ static int i915_getparam(struct drm_device *dev, void *data, case I915_PARAM_HAS_EXEC_CONSTANTS: value = INTEL_INFO(dev)->gen >= 4; break; + case I915_PARAM_HAS_CONTEXTS: + value = dev_priv->ctx_disable ? 0 : 1; + break; + case I915_PARAM_HAS_PPGTT: + value = HAS_PPGTT(dev); + break; default: DRM_DEBUG_DRIVER("Unknown parameter %d\n", param->param); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index dc7b132..5324742 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -982,6 +982,9 @@ enum intel_chip_family { #define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT) #define HAS_PCH_IBX(dev) (INTEL_PCH_TYPE(dev) == PCH_IBX) +#define HAS_HW_CONTEXTS(dev) (INTEL_INFO(dev)->gen >= 4) +#define HAS_PPGTT(dev) (INTEL_INFO(dev)->gen >= 7) + #include "i915_trace.h" extern struct drm_ioctl_desc i915_ioctls[]; diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 5605e97..dbd0332 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h @@ -295,6 +295,8 @@ typedef struct drm_i915_irq_wait { #define I915_PARAM_HAS_RELAXED_FENCING 12 #define I915_PARAM_HAS_COHERENT_RINGS 13 #define I915_PARAM_HAS_EXEC_CONSTANTS 14 +#define I915_PARAM_HAS_CONTEXTS 15 +#define I915_PARAM_HAS_PPGTT 16 typedef struct drm_i915_getparam { int param;