[RFC] drm/i915: Split out intel_vtd_active and run_as_guest to own header

Lucas De Marchi lucas.demarchi at intel.com
Mon Mar 28 20:48:33 UTC 2022


On Fri, Mar 25, 2022 at 02:09:33PM +0200, Jani Nikula wrote:
>On Fri, 25 Mar 2022, Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com> wrote:
>> On 24/03/2022 18:57, Jani Nikula wrote:
>>> On Thu, 24 Mar 2022, Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com> wrote:
>>>> On 24/03/2022 11:57, Jani Nikula wrote:
>>>>> On Thu, 24 Mar 2022, Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com> wrote:
>>>>>> On 24/03/2022 09:31, Jani Nikula wrote:
>>>>>>> On Tue, 22 Mar 2022, Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com> wrote:
>>>>>>>> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>>>>>>>
>>>>>>>> ...
>>>>>>>>
>>>>>>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>>>>>>>> Cc: Jani Nikula <jani.nikula at intel.com>
>>>>>>>> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>>>>>>>> ---
>>>>>>>> Typed up how I see it - bash away.
>>>>>>>
>>>>>>> So is intel_vtd_active() so performance critical that it needs to be
>>>>>>> inline?
>>>>>>>
>>>>>>> We're passing struct drm_i915_private * everywhere we can, and it just
>>>>>>> feels silly to use struct drm_device * to avoid the include.
>>>>>>>
>>>>>>> Static inlines considered harmful. :p
>>>>>>
>>>>>> Same as it is ;), and gee, who was it that he said he was just trying to
>>>>>> declutter i915_drv.h.. ;p
>>>>>
>>>>> Not at the cost of clarity elsewhere!
>>>>
>>>> To be clear now you oppose intel_vtd_active taking struct device? I
>>>> thought you expressed general agreement when I presented the idea in the
>>>> previous thread.
>>>>
>>>> I don't mind hugely to go either way, but I also don't see how taking
>>>> struct device makes anything unclear. (I only think
>>>> intel_vtd_run_as_guest is really wrong in this story but that's old news.)
>>>>
>>>> And if I make it take i915 then I would want to name it i915_vtd_active
>>>> as well. But then you wouldn't like that.
>>>>
>>>> Should we just stuff all this into i915_utils for now, as I think Lucas
>>>> suggested? Static inline or not, I don't care.
>>>
>>> Just general grumpiness.
>>>
>>> Acked-by: Jani Nikula <jani.nikula at intel.com>
>>
>> No worries. Ack is for this version or with i915_ prefixes in
>> i915_utils.h/c?
>
>Both. Either. ;)

great, let's go with the one adding it to i915_util.h/c then.

thanks
Lucas De Marchi

>
>>
>> Regards,
>>
>> Tvrtko
>
>-- 
>Jani Nikula, Intel Open Source Graphics Center


More information about the dri-devel mailing list