diff mbox

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

Message ID 1530612771-2990-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 3, 2018, 10:12 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)

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

Comments

Chris Wilson July 3, 2018, 10:27 a.m. UTC | #1
Quoting hang.yuan@linux.intel.com (2018-07-03 11:12:51)
> 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)
> 
> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_pci.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 55543f1..904f0bf 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -770,6 +770,12 @@ static void __exit i915_exit(void)
>  module_init(i915_init);
>  module_exit(i915_exit);
>  
> +#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 not in drivers/gpu/drm/i915/gvt/gvt.c?
-Chris
hang.yuan@linux.intel.com July 4, 2018, 2:55 a.m. UTC | #2
On 07/03/2018 06:27 PM, Chris Wilson wrote:
> Quoting hang.yuan@linux.intel.com (2018-07-03 11:12:51)
>> 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)
>>
>> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_pci.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
>> index 55543f1..904f0bf 100644
>> --- a/drivers/gpu/drm/i915/i915_pci.c
>> +++ b/drivers/gpu/drm/i915/i915_pci.c
>> @@ -770,6 +770,12 @@ static void __exit i915_exit(void)
>>   module_init(i915_init);
>>   module_exit(i915_exit);
>>   
>> +#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 not in drivers/gpu/drm/i915/gvt/gvt.c?
> -Chris
Henry: I will move it to gvt.c. Thanks.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 55543f1..904f0bf 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -770,6 +770,12 @@  static void __exit i915_exit(void)
 module_init(i915_init);
 module_exit(i915_exit);
 
+#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
+
 MODULE_AUTHOR("Tungsten Graphics, Inc.");
 MODULE_AUTHOR("Intel Corporation");