From: Jesse Barnes Subject: Re: [RFC 14/44] drm/i915: Added getparam for GPU scheduler Date: Wed, 2 Jul 2014 11:21:42 -0700 Message-ID: <20140702112142.6465d70b@jbarnes-desktop> References: <1403803475-16337-1-git-send-email-John.C.Harrison@Intel.com> <1403803475-16337-15-git-send-email-John.C.Harrison@Intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by gabe.freedesktop.org (Postfix) with ESMTP id B47BB6E5D4 for ; Wed, 2 Jul 2014 11:20:58 -0700 (PDT) Received: by mail-pa0-f43.google.com with SMTP id lf10so13001137pab.30 for ; Wed, 02 Jul 2014 11:20:58 -0700 (PDT) In-Reply-To: <1403803475-16337-15-git-send-email-John.C.Harrison@Intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: John.C.Harrison@Intel.com Cc: Intel-GFX@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 26 Jun 2014 18:24:05 +0100 John.C.Harrison@Intel.com wrote: > From: John Harrison > > This is required by user land validation programs that need to know whether the > scheduler is available for testing or not. > --- > drivers/gpu/drm/i915/i915_dma.c | 3 +++ > include/uapi/drm/i915_drm.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 6c9ce82..1668316 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1035,6 +1035,9 @@ static int i915_getparam(struct drm_device *dev, void *data, > value = 0; > #endif > break; > + case I915_PARAM_HAS_GPU_SCHEDULER: > + value = i915_scheduler_is_enabled(dev); > + break; > default: > DRM_DEBUG("Unknown parameter %d\n", param->param); > return -EINVAL; > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h > index bf54c78..de6f603 100644 > --- a/include/uapi/drm/i915_drm.h > +++ b/include/uapi/drm/i915_drm.h > @@ -341,6 +341,7 @@ typedef struct drm_i915_irq_wait { > #define I915_PARAM_HAS_WT 27 > #define I915_PARAM_CMD_PARSER_VERSION 28 > #define I915_PARAM_HAS_NATIVE_SYNC 30 > +#define I915_PARAM_HAS_GPU_SCHEDULER 31 > > typedef struct drm_i915_getparam { > int param; I guess we have plenty of getparam space available. But another option would be for tests to check for a debugfs file that dumps scheduler info instead, and save the get params for non-debug applications. Either way though: Reviewed-by: Jesse Barnes -- Jesse Barnes, Intel Open Source Technology Center