On 11/27/2013 04:51 AM, Daniel Vetter wrote:
> On Tue, Nov 26, 2013 at 08:51:23AM -0800, [email protected] wrote:
>> From: Brad Volkin <[email protected]>
>>
>> So userspace can query the kernel for command parser support.
>>
>> OTC-Tracker: AXIA-4631
>> Change-Id: I58af650db9f6753c2dcac9c54ab432fd31db302f
>> Signed-off-by: Brad Volkin <[email protected]>
>> ---
>>  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
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to