From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Graunke Subject: Re: [RFC 06/22] drm/i915: Add a HAS_CMD_PARSER getparam Date: Thu, 05 Dec 2013 01:38:00 -0800 Message-ID: <52A04978.2090506@whitecape.org> References: <1385484699-51596-1-git-send-email-bradley.d.volkin@intel.com> <1385484699-51596-7-git-send-email-bradley.d.volkin@intel.com> <20131127125128.GY27344@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by gabe.freedesktop.org (Postfix) with ESMTP id 65843FB0F2 for ; Thu, 5 Dec 2013 01:35:20 -0800 (PST) Received: from homiemail-a60.g.dreamhost.com (caiajhbdcbbj.dreamhost.com [208.97.132.119]) by hapkido.dreamhost.com (Postfix) with ESMTP id ED482DDFAF for ; Thu, 5 Dec 2013 01:35:19 -0800 (PST) In-Reply-To: <20131127125128.GY27344@phenom.ffwll.local> 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: Daniel Vetter , bradley.d.volkin@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 11/27/2013 04:51 AM, Daniel Vetter wrote: > On Tue, Nov 26, 2013 at 08:51:23AM -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 | 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 5aeb103..f0a4638 100644 >> --- a/drivers/gpu/drm/i915/i915_dma.c >> +++ b/drivers/gpu/drm/i915/i915_dma.c >> @@ -1003,6 +1003,9 @@ static int i915_getparam(struct drm_device *dev, void *data, >> case I915_PARAM_HAS_EXEC_HANDLE_LUT: >> value = 1; >> break; >> + case I915_PARAM_HAS_CMD_PARSER: >> + value = 1; > > I think we need to have a CMD_PARSER_VER flag here which we can increment > every time we add new registers for additional features. Examples would be > extensions for OA, or the L3 cache control stuff the media/compute guys > want. I think we should also add a comment (maybe right here) which > explains for each version what has been added. Otherwise userspace has no > idea what kind of additional restricted commands it can submit. > -Daniel The CMD_PARSER_VER idea makes sense to me, too. That way userspace can easily check whether it's allowed to do something, and we can extend that in the future. --Ken