[igt-dev] [PATCH i-g-t 7/8] lib/debugfs: use regular module param functions for prefault_disable

Jani Nikula jani.nikula at intel.com
Wed Apr 22 06:13:44 UTC 2020


On Tue, 21 Apr 2020, Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com> wrote:
> On 21.4.2020 21.36, Chris Wilson wrote:
>> Quoting Juha-Pekka Heikkila (2020-04-21 19:30:00)
>>> On 21.4.2020 21.10, Chris Wilson wrote:
>>>> Quoting Juha-Pekka Heikkila (2020-04-21 17:17:24)
>>>>> From: Jani Nikula <jani.nikula at intel.com>
>>>>>
>>>>> Functional change switches from igt_require to igt_assert on errors.
>>>>
>>>> Adding entirely unused functions for fun?
>>>
>>> That probably is from legacy, Jani's igt branch that I took was not very
>>> new.
>>>
>>> Chris, you have opinion about patch 6/8 on what's going on there?
>>> There's in __igt_params_open(..) those two blocks of file checking which
>>> on first block is checking if wanted parameter file is in selected
>>> device directory and second block is just about 'guessing' default
>>> device name. I'm somehow thinking there would be easier way for those
>>> but I didn't find other way so I ended up reading and parsing files. It
>>> seems to work but not feeling comfortable with it.
>> 
>> Heh, not guilty of igt_set_module_param(). I would rip out any implicit
>> device lookup and make sure there's always a device fd to work with. If
>> that is not possible, then make the module name a parameter.
>
> I'll need to give it some thought with making module name as parameter. 
> There's not many tests that would require change but those tests will 
> need to be added with some code that will recognize what driver are they on.

I think way back when I initially wrote this stuff, the implicit device
lookup was more widespread in igt than it is now. Always passing the fd
should be the end goal IMO, and passing the module name should be a
transitional thing if switching everything to fd is too much work right
now.

BR,
Jani.



-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the igt-dev mailing list