From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 12/13] drm/i915: Add a CMD_PARSER_VERSION getparam Date: Thu, 30 Jan 2014 10:19:15 +0100 Message-ID: <20140130091915.GL17001@phenom.ffwll.local> References: <1385484699-51596-1-git-send-email-bradley.d.volkin@intel.com> <1391032514-19136-1-git-send-email-bradley.d.volkin@intel.com> <1391032514-19136-13-git-send-email-bradley.d.volkin@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 067DF892AF for ; Thu, 30 Jan 2014 01:19:20 -0800 (PST) Received: by mail-lb0-f176.google.com with SMTP id w7so2297798lbi.35 for ; Thu, 30 Jan 2014 01:19:19 -0800 (PST) Content-Disposition: inline In-Reply-To: <1391032514-19136-13-git-send-email-bradley.d.volkin@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: bradley.d.volkin@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jan 29, 2014 at 01:55:13PM -0800, bradley.d.volkin@intel.com wrote: > From: Brad Volkin > > So userspace can query the kernel for command parser support. > > OTC-Tracker: AXIA-4631 > Change-Id: I58af650db9f6753c2dcac9c54ab432fd31db302f > Signed-off-by: Brad Volkin > --- > drivers/gpu/drm/i915/i915_dma.c | 4 ++++ > include/uapi/drm/i915_drm.h | 1 + > 2 files changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 258b1be..34ba199 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1013,6 +1013,10 @@ static int i915_getparam(struct drm_device *dev, void *data, > case I915_PARAM_HAS_EXEC_HANDLE_LUT: > value = 1; > break; > + case I915_PARAM_CMD_PARSER_VERSION: > + /* TODO: version info (e.g. what is allowed?) */ > + value = 1; I think an increasing integer without any mean special grouping (like major/minor) is good enough. What we need though is a small revision log with one-line blurbs that explain what has been added, e.g. 1: Initial version. 2: Allow streamout related registers 3: Add gen8 support ... I think it would be good to have this as a comment right next to the parser code itself, so what about adding a i915_cmd_parser_get_version function to i915_cmd_parser.c who's only job is to return and integer and contain this comment? -Daniel > + 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 126bfaa..8a3e4ef00 100644 > --- a/include/uapi/drm/i915_drm.h > +++ b/include/uapi/drm/i915_drm.h > @@ -337,6 +337,7 @@ typedef struct drm_i915_irq_wait { > #define I915_PARAM_HAS_EXEC_NO_RELOC 25 > #define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 > #define I915_PARAM_HAS_WT 27 > +#define I915_PARAM_CMD_PARSER_VERSION 28 > > typedef struct drm_i915_getparam { > int param; > -- > 1.8.5.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch