diff mbox

[v3] drm/i915/gvt: declare gvt as i915's soft dependency

Message ID 1530673665-3561-1-git-send-email-hang.yuan@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

hang.yuan@linux.intel.com July 4, 2018, 3:07 a.m. UTC
From: Hang Yuan <hang.yuan@linux.intel.com>

This helps initramfs builder and other tools to know the full dependencies
of i915 and have gvt module loaded with i915.

v2: add condition and change to pre-dependency (Chris)
v3: move declaration to gvt.c. (Chris)

Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
---
 drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Chris Wilson July 4, 2018, 9:21 a.m. UTC | #1
Quoting hang.yuan@linux.intel.com (2018-07-04 04:07:45)
> From: Hang Yuan <hang.yuan@linux.intel.com>
> 
> This helps initramfs builder and other tools to know the full dependencies
> of i915 and have gvt module loaded with i915.
> 
> v2: add condition and change to pre-dependency (Chris)
> v3: move declaration to gvt.c. (Chris)
> 
> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
> index 4e65266..00f487e9 100644
> --- a/drivers/gpu/drm/i915/gvt/gvt.c
> +++ b/drivers/gpu/drm/i915/gvt/gvt.c
> @@ -468,3 +468,10 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
>         kfree(gvt);
>         return ret;
>  }
> +
> +#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
> +MODULE_SOFTDEP("pre: kvmgt");
> +#elif IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT)
> +MODULE_SOFTDEP("pre: xengt");
> +#endif

This looks like the best one can do under the constraints of the macro.
It matches my limited knowledge of how this works, so
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
hang.yuan@linux.intel.com July 4, 2018, 9:30 a.m. UTC | #2
Thank you for the help to improve the patch! - Henry

On 07/04/2018 05:21 PM, Chris Wilson wrote:
> Quoting hang.yuan@linux.intel.com (2018-07-04 04:07:45)
>> From: Hang Yuan <hang.yuan@linux.intel.com>
>>
>> This helps initramfs builder and other tools to know the full dependencies
>> of i915 and have gvt module loaded with i915.
>>
>> v2: add condition and change to pre-dependency (Chris)
>> v3: move declaration to gvt.c. (Chris)
>>
>> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
>> index 4e65266..00f487e9 100644
>> --- a/drivers/gpu/drm/i915/gvt/gvt.c
>> +++ b/drivers/gpu/drm/i915/gvt/gvt.c
>> @@ -468,3 +468,10 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
>>          kfree(gvt);
>>          return ret;
>>   }
>> +
>> +#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
>> +MODULE_SOFTDEP("pre: kvmgt");
>> +#elif IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT)
>> +MODULE_SOFTDEP("pre: xengt");
>> +#endif
> 
> This looks like the best one can do under the constraints of the macro.
> It matches my limited knowledge of how this works, so
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
>
Zhenyu Wang July 5, 2018, 7:21 a.m. UTC | #3
On 2018.07.04 11:07:45 +0800, intel-gfx-bounces@lists.freedesktop.org wrote:
> From: Hang Yuan <hang.yuan@linux.intel.com>
> 
> This helps initramfs builder and other tools to know the full dependencies
> of i915 and have gvt module loaded with i915.
> 
> v2: add condition and change to pre-dependency (Chris)
> v3: move declaration to gvt.c. (Chris)
> 
> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
> index 4e65266..00f487e9 100644
> --- a/drivers/gpu/drm/i915/gvt/gvt.c
> +++ b/drivers/gpu/drm/i915/gvt/gvt.c
> @@ -468,3 +468,10 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
>  	kfree(gvt);
>  	return ret;
>  }
> +
> +#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
> +MODULE_SOFTDEP("pre: kvmgt");
> +#elif IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT)
> +MODULE_SOFTDEP("pre: xengt");
> +#endif
> +

Why xengt? it's not in upstream at all, so should be splitted and
apply to its topic branch only.
hang.yuan@linux.intel.com July 5, 2018, 7:53 a.m. UTC | #4
On 07/05/2018 03:21 PM, Zhenyu Wang wrote:
> On 2018.07.04 11:07:45 +0800, intel-gfx-bounces@lists.freedesktop.org wrote:
>> From: Hang Yuan <hang.yuan@linux.intel.com>
>>
>> This helps initramfs builder and other tools to know the full dependencies
>> of i915 and have gvt module loaded with i915.
>>
>> v2: add condition and change to pre-dependency (Chris)
>> v3: move declaration to gvt.c. (Chris)
>>
>> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
>> index 4e65266..00f487e9 100644
>> --- a/drivers/gpu/drm/i915/gvt/gvt.c
>> +++ b/drivers/gpu/drm/i915/gvt/gvt.c
>> @@ -468,3 +468,10 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
>>   	kfree(gvt);
>>   	return ret;
>>   }
>> +
>> +#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
>> +MODULE_SOFTDEP("pre: kvmgt");
>> +#elif IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT)
>> +MODULE_SOFTDEP("pre: xengt");
>> +#endif
>> +
> 
> Why xengt? it's not in upstream at all, so should be splitted and
> apply to its topic branch only.
Henry: I understand xengt_mpt is not in upstream but general part of gvt 
like gvt.c is in upstream.
The change of the patch is in the general part. Do you think so?
Jani Nikula July 5, 2018, 12:30 p.m. UTC | #5
On Thu, 05 Jul 2018, intel-gfx-bounces@lists.freedesktop.org wrote:
> On 07/05/2018 03:21 PM, Zhenyu Wang wrote:
>> On 2018.07.04 11:07:45 +0800, intel-gfx-bounces@lists.freedesktop.org wrote:
>>> From: Hang Yuan <hang.yuan@linux.intel.com>
>>>
>>> This helps initramfs builder and other tools to know the full dependencies
>>> of i915 and have gvt module loaded with i915.
>>>
>>> v2: add condition and change to pre-dependency (Chris)
>>> v3: move declaration to gvt.c. (Chris)
>>>
>>> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/gvt/gvt.c | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
>>> index 4e65266..00f487e9 100644
>>> --- a/drivers/gpu/drm/i915/gvt/gvt.c
>>> +++ b/drivers/gpu/drm/i915/gvt/gvt.c
>>> @@ -468,3 +468,10 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
>>>   	kfree(gvt);
>>>   	return ret;
>>>   }
>>> +
>>> +#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
>>> +MODULE_SOFTDEP("pre: kvmgt");
>>> +#elif IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT)
>>> +MODULE_SOFTDEP("pre: xengt");
>>> +#endif
>>> +
>> 
>> Why xengt? it's not in upstream at all, so should be splitted and
>> apply to its topic branch only.
> Henry: I understand xengt_mpt is not in upstream but general part of gvt 
> like gvt.c is in upstream.
> The change of the patch is in the general part. Do you think so?

AFAICT upstream IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT) is always false;
there's no such config.

BR,
Jani.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
index 4e65266..00f487e9 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.c
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
@@ -468,3 +468,10 @@  int intel_gvt_init_device(struct drm_i915_private *dev_priv)
 	kfree(gvt);
 	return ret;
 }
+
+#if IS_ENABLED(CONFIG_DRM_I915_GVT_KVMGT)
+MODULE_SOFTDEP("pre: kvmgt");
+#elif IS_ENABLED(CONFIG_DRM_I915_GVT_XENGT)
+MODULE_SOFTDEP("pre: xengt");
+#endif
+