From: Daniel Vetter Subject: Re: [RFC 14/44] drm/i915: Added getparam for GPU scheduler Date: Mon, 7 Jul 2014 21:11:50 +0200 Message-ID: <20140707191150.GC5821@phenom.ffwll.local> References: <1403803475-16337-1-git-send-email-John.C.Harrison@Intel.com> <1403803475-16337-15-git-send-email-John.C.Harrison@Intel.com> <20140702112142.6465d70b@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by gabe.freedesktop.org (Postfix) with ESMTP id D42316E462 for ; Mon, 7 Jul 2014 12:11:40 -0700 (PDT) Received: by mail-wi0-f178.google.com with SMTP id n15so7271340wiw.5 for ; Mon, 07 Jul 2014 12:11:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140702112142.6465d70b@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jesse Barnes Cc: Intel-GFX@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 02, 2014 at 11:21:42AM -0700, Jesse Barnes wrote: > 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. Yeah, pure testing interfaces should reside in debugfs - much less stringent abi compatibility requirements for that stuff. Also, I want to see these validation tests as igt patches. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch