[Intel-gfx] [PATCH] drm/i915: Make i915 events part of uapi

Chad Versace chad.versace at linux.intel.com
Wed Jul 17 23:12:21 CEST 2013


On 07/16/2013 10:07 PM, Daniel Vetter wrote:
> On Tue, Jul 16, 2013 at 04:41:13PM -0700, Ben Widawsky wrote:
>> Make the uevent strings part of the user API for people who wish to
>> write their own listeners.
>>
>> CC: Chad Versace <chad.versace at linux.intel.com>
>> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
>
> One thing I've toyed around with a bit is that we should add kerneldoc to
> our uapi headers and create a DocBook out of it (maybe as a subsection in
> the drm userspace api chapter). I guess the DocBook integration needs an
> overall approach, but we should start to add comments to each piece of
> userspace api to clearly spec them. See below for what I have in mind ...

Yes, docs please. I don't have the kernel-fu of a kernel-dev, so without
docs I don't know what these events mean and what to expect from them.

>> -	parity_event[0] = "L3_PARITY_ERROR=1";
>> +	parity_event[0] = I915_L3_PARITY_EVENT"=1";

Small nitpick. I usually find string concatenation more readable like this,
with a space:
     parity_event[0] = I915_L3_PARITY_EVENT "=1";
But, that's just my preference, so feel free to ignore me.

>> +#define I915_L3_PARITY_EVENT "L3_PARITY_ERROR"
>> +#define I915_ERROR_EVENT "ERROR"
>> +#define I915_RESET_EVENT "RESET"

Maybe this is a dumb question... since these are uevents, do you think the names
would be improved by given them a "UEVENT" suffix? Like I915_ERROR_UEVENT? Or is
that dumb, because these tokens are intended to serve more purposes than uevents?



More information about the Intel-gfx mailing list