[Intel-gfx] [RFC 06/22] drm/i915: Add a HAS_CMD_PARSER getparam
Volkin, Bradley D
bradley.d.volkin at intel.com
Thu Dec 5 18:22:50 CET 2013
On Thu, Dec 05, 2013 at 01:38:00AM -0800, Kenneth Graunke wrote:
> On 11/27/2013 04:51 AM, Daniel Vetter wrote:
> > On Tue, Nov 26, 2013 at 08:51:23AM -0800, bradley.d.volkin at intel.com wrote:
> >> From: Brad Volkin <bradley.d.volkin at intel.com>
> >>
> >> So userspace can query the kernel for command parser support.
> >>
> >> OTC-Tracker: AXIA-4631
> >> Change-Id: I58af650db9f6753c2dcac9c54ab432fd31db302f
> >> Signed-off-by: Brad Volkin <bradley.d.volkin at intel.com>
> >> ---
> >> 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.
Ok. Any reason to keep both HAS_CMD_PARSER and CMD_PARSER_VER? Seems like
just the version should be enough.
Brad
>
> --Ken
More information about the Intel-gfx
mailing list