From patchwork Tue Feb 1 18:16:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 523591 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 p11IIj2W000648 for ; Tue, 1 Feb 2011 18:19:05 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FEF19E8EB for ; Tue, 1 Feb 2011 10:18:45 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gx0-f177.google.com (mail-gx0-f177.google.com [209.85.161.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 635B89E8CE for ; Tue, 1 Feb 2011 10:17:53 -0800 (PST) Received: by gxk21 with SMTP id 21so2709953gxk.36 for ; Tue, 01 Feb 2011 10:17:52 -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=iWS5S1Wgcmx7ieATQ61au5za4Zhaw2Lovt6qDDUm51I=; b=jZ89Dl41/0saTeX3zhgNHGVhkwgrOIX+8VifhsrXxKZsoTCr0k1Wn6y642zDWRJzi6 3qw3aEB6r3KsjGKMqRJNqG4onSUjN+CCzjY0xS40Bh5qner9KUsjagavqKcGluMxNNsf syj2zNM9jUwNyOZVJ4nROTnWVVIFDsXoL3eeE= 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=R99DshmHOp26t+C5+/5I70zLr5F3Rf2OKfK3rdudc6yruE3REElMBcB5s6sul+PQFJ oH8XfGVY/gWIH+91PqVl62+yjny/P23g22KvezKoxEioP+i8mU9QvErccZTDc8A+3cor 6HMYEEkZmLC003NeiFfpThdR243SkaexMoO9A= Received: by 10.90.65.12 with SMTP id n12mr11219223aga.62.1296584272589; Tue, 01 Feb 2011 10:17:52 -0800 (PST) Received: from localhost.localdomain ([67.208.96.87]) by mx.google.com with ESMTPS id f10sm27543608anh.5.2011.02.01.10.17.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 10:17:46 -0800 (PST) From: Ben Widawsky To: intel-gfx@lists.freedesktop.org Date: Tue, 1 Feb 2011 10:16:18 -0800 Message-Id: <1296584186-20446-2-git-send-email-bwidawsk@gmail.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1296584186-20446-1-git-send-email-bwidawsk@gmail.com> References: <1296584186-20446-1-git-send-email-bwidawsk@gmail.com> Subject: [Intel-gfx] [PATCH 1/9] 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]); Tue, 01 Feb 2011 18:19:19 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 17bd766..bbaf60c 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 = HAS_HW_CONTEXTS(dev); + 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 a0149c6..caf0a28 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -950,6 +950,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 0039f1f..26759a8 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h @@ -290,6 +290,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;