[Intel-gfx] [RFC 2/3] drm/i915: Extend I915_PARAMS_FOR_EACH with default member value
Michal Wajdeczko
michal.wajdeczko at intel.com
Mon Sep 25 09:31:29 UTC 2017
On Fri, 22 Sep 2017 21:05:11 +0200, Jani Nikula <jani.nikula at intel.com>
wrote:
> On Fri, 22 Sep 2017, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>> Quoting Michal Wajdeczko (2017-09-22 15:27:25)
>>> By combining default value into helper macro we can initialize
>>> modparams struct in the same automatic way as it was declared.
>>> This will initialize members in the same order as declared
>>> and additionally will disallow declaring new member without
>>> proper default value for it.
>>>
>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>>> Cc: Jani Nikula <jani.nikula at intel.com>
>>> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
>>
>> Overall, I think this is a positive change. I'm not completely happy
>> that the param() macro is more readable than the struct assignment, but
>> that is offset by the reduction in duplication.
>
> I'm also not completely happy that the default values get moved away
> from the param descriptions. (Hmm, what next, putting the permissions
> and descriptions in I915_PARAMS_FOR_EACH too?! :o)
>
In fact, I was already trying that ;)
https://patchwork.freedesktop.org/patch/162037/
> There's also the benefit of being able to highlight the changed values
> and displaying the defaults in debugfs if desired.
And such highlight was also there
https://patchwork.freedesktop.org/patch/162038/
Michal
>
> On the series,
>
> Acked-by: Jani Nikula <jani.nikula at intel.com>
>
More information about the Intel-gfx
mailing list