* [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
@ 2018-03-29 7:12 Yang
2018-03-29 8:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] " Patchwork
` (4 more replies)
0 siblings, 5 replies; 20+ messages in thread
From: Yang @ 2018-03-29 7:12 UTC (permalink / raw)
To: intel-gfx; +Cc: Yang Shi, Bo He
From: Yang Shi <yang.a.shi@intel.com>
snd_hdac driver would use the component interface from i915 driver.
if i915 driver do the audio component intialization too late, snd_hdac
driver will meet ipanic.
Signed-off-by: Bo He <bo.he@intel.com>
Signed-off-by: Yang Shi <yang.a.shi@intel.com>
---
drivers/gpu/drm/i915/i915_drv.c | 2 --
drivers/gpu/drm/i915/intel_display.c | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 2f5209d..9d25d7e 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
if (IS_GEN5(dev_priv))
intel_gpu_ips_init(dev_priv);
- intel_audio_init(dev_priv);
-
/*
* Some ports require correctly set-up hpd registers for detection to
* work properly (leading to ghost connected connector status), e.g. VGA
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f288bcc..a471c88 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device *dev)
dev->mode_config.funcs = &intel_mode_funcs;
+ intel_audio_init(dev_priv);
+
init_llist_head(&dev_priv->atomic_helper.free_list);
INIT_WORK(&dev_priv->atomic_helper.free_work,
intel_atomic_helper_free_state_worker);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 20+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
@ 2018-03-29 8:07 ` Patchwork
2018-03-29 8:25 ` ✓ Fi.CI.BAT: success " Patchwork
` (3 subsequent siblings)
4 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2018-03-29 8:07 UTC (permalink / raw)
To: Yang; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
URL : https://patchwork.freedesktop.org/series/40858/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
f402e6914a54 drm/i915: move audio component intialization before audio driver use it
-:4: WARNING:TYPO_SPELLING: 'intialization' may be misspelled - perhaps 'initialization'?
#4:
Subject: [PATCH] drm/i915: move audio component intialization before audio
-:8: WARNING:TYPO_SPELLING: 'intialization' may be misspelled - perhaps 'initialization'?
#8:
if i915 driver do the audio component intialization too late, snd_hdac
total: 0 errors, 2 warnings, 0 checks, 16 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
2018-03-29 8:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] " Patchwork
@ 2018-03-29 8:25 ` Patchwork
2018-03-29 11:39 ` ✓ Fi.CI.IGT: " Patchwork
` (2 subsequent siblings)
4 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2018-03-29 8:25 UTC (permalink / raw)
To: Yang; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
URL : https://patchwork.freedesktop.org/series/40858/
State : success
== Summary ==
Series 40858v1 series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
https://patchwork.freedesktop.org/api/1.0/series/40858/revisions/1/mbox/
---- Known issues:
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
fail -> PASS (fi-cfl-s3) fdo#100368
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a-frame-sequence:
fail -> PASS (fi-cfl-s3) fdo#103481 +1
Subgroup suspend-read-crc-pipe-c:
pass -> INCOMPLETE (fi-bxt-dsi) fdo#103927
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:429s
fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:385s
fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:536s
fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:296s
fi-bxt-dsi total:243 pass:216 dwarn:0 dfail:0 fail:0 skip:26
fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:515s
fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:517s
fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:510s
fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:410s
fi-cfl-s3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:561s
fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:516s
fi-cnl-y3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:591s
fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:425s
fi-gdg-551 total:285 pass:176 dwarn:0 dfail:0 fail:1 skip:108 time:317s
fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:542s
fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:404s
fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:421s
fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:471s
fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:433s
fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:474s
fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:461s
fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:508s
fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:662s
fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:445s
fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:532s
fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:506s
fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:489s
fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:428s
fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:447s
fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:555s
fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:398s
Blacklisted hosts:
fi-cnl-psr total:285 pass:255 dwarn:4 dfail:0 fail:0 skip:26 time:511s
fi-glk-j4005 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:484s
4668e88d66074a81aae645e0db0391e7ea9afe8a drm-tip: 2018y-03m-28d-20h-45m-29s UTC integration manifest
f402e6914a54 drm/i915: move audio component intialization before audio driver use it
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8528/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
2018-03-29 8:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] " Patchwork
2018-03-29 8:25 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-03-29 11:39 ` Patchwork
2018-03-29 11:55 ` [PATCH 1/1] " Chris Wilson
2018-04-27 7:59 ` Jani Nikula
4 siblings, 0 replies; 20+ messages in thread
From: Patchwork @ 2018-03-29 11:39 UTC (permalink / raw)
To: Yang; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/1] drm/i915: move audio component intialization before audio driver use it
URL : https://patchwork.freedesktop.org/series/40858/
State : success
== Summary ==
---- Known issues:
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
incomplete -> PASS (shard-hsw) fdo#103540
Test kms_flip:
Subgroup 2x-flip-vs-expired-vblank:
fail -> PASS (shard-hsw) fdo#102887
Subgroup plain-flip-ts-check:
fail -> PASS (shard-hsw) fdo#100368
Test kms_rotation_crc:
Subgroup sprite-rotation-180:
pass -> FAIL (shard-snb) fdo#103925
Test kms_vblank:
Subgroup pipe-a-accuracy-idle:
fail -> PASS (shard-hsw) fdo#102583
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
shard-apl total:3495 pass:1831 dwarn:1 dfail:0 fail:7 skip:1655 time:12847s
shard-hsw total:3495 pass:1782 dwarn:1 dfail:0 fail:2 skip:1709 time:11560s
shard-snb total:3495 pass:1374 dwarn:1 dfail:0 fail:3 skip:2117 time:6936s
Blacklisted hosts:
shard-kbl total:3495 pass:1959 dwarn:1 dfail:0 fail:7 skip:1528 time:9189s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8528/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
` (2 preceding siblings ...)
2018-03-29 11:39 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-03-29 11:55 ` Chris Wilson
2018-03-29 13:15 ` Jani Nikula
2018-04-10 7:14 ` Shi, Yang A
2018-04-27 7:59 ` Jani Nikula
4 siblings, 2 replies; 20+ messages in thread
From: Chris Wilson @ 2018-03-29 11:55 UTC (permalink / raw)
To: intel-gfx; +Cc: Yang Shi, Bo He
Quoting Yang (2018-03-29 08:12:13)
> From: Yang Shi <yang.a.shi@intel.com>
>
> snd_hdac driver would use the component interface from i915 driver.
> if i915 driver do the audio component intialization too late, snd_hdac
> driver will meet ipanic.
>
> Signed-off-by: Bo He <bo.he@intel.com>
> Signed-off-by: Yang Shi <yang.a.shi@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 2 --
> drivers/gpu/drm/i915/intel_display.c | 2 ++
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 2f5209d..9d25d7e 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
> if (IS_GEN5(dev_priv))
> intel_gpu_ips_init(dev_priv);
>
> - intel_audio_init(dev_priv);
> -
> /*
> * Some ports require correctly set-up hpd registers for detection to
> * work properly (leading to ghost connected connector status), e.g. VGA
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f288bcc..a471c88 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device *dev)
>
> dev->mode_config.funcs = &intel_mode_funcs;
>
> + intel_audio_init(dev_priv);
Has info->num_pipes been finalized yet? Does the component framework
expose the device to the external clients (if so, it can not be done
before we are ready).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 11:55 ` [PATCH 1/1] " Chris Wilson
@ 2018-03-29 13:15 ` Jani Nikula
2018-04-10 7:23 ` Shi, Yang A
2018-04-10 7:14 ` Shi, Yang A
1 sibling, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2018-03-29 13:15 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Yang Shi, Bo He
On Thu, 29 Mar 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Yang (2018-03-29 08:12:13)
>> From: Yang Shi <yang.a.shi@intel.com>
>>
>> snd_hdac driver would use the component interface from i915 driver.
>> if i915 driver do the audio component intialization too late, snd_hdac
>> driver will meet ipanic.
>>
>> Signed-off-by: Bo He <bo.he@intel.com>
>> Signed-off-by: Yang Shi <yang.a.shi@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_drv.c | 2 --
>> drivers/gpu/drm/i915/intel_display.c | 2 ++
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
>> index 2f5209d..9d25d7e 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.c
>> +++ b/drivers/gpu/drm/i915/i915_drv.c
>> @@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
>> if (IS_GEN5(dev_priv))
>> intel_gpu_ips_init(dev_priv);
>>
>> - intel_audio_init(dev_priv);
>> -
>> /*
>> * Some ports require correctly set-up hpd registers for detection to
>> * work properly (leading to ghost connected connector status), e.g. VGA
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index f288bcc..a471c88 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device *dev)
>>
>> dev->mode_config.funcs = &intel_mode_funcs;
>>
>> + intel_audio_init(dev_priv);
>
> Has info->num_pipes been finalized yet? Does the component framework
> expose the device to the external clients (if so, it can not be done
> before we are ready).
Hmmh, the same patch seems to have been sent twice. I replied at [1].
BR,
Jani.
[1] http://mid.mail-archive.com/87k1tvciec.fsf@intel.com
> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 11:55 ` [PATCH 1/1] " Chris Wilson
2018-03-29 13:15 ` Jani Nikula
@ 2018-04-10 7:14 ` Shi, Yang A
1 sibling, 0 replies; 20+ messages in thread
From: Shi, Yang A @ 2018-04-10 7:14 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: He, Bo
> -----Original Message-----
> From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> Sent: Thursday, March 29, 2018 7:56 PM
> To: Shi, Yang A <yang.a.shi@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: Shi, Yang A <yang.a.shi@intel.com>; He, Bo <bo.he@intel.com>
> Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915: move audio component intialization
> before audio driver use it
>
> Quoting Yang (2018-03-29 08:12:13)
> > From: Yang Shi <yang.a.shi@intel.com>
> >
> > snd_hdac driver would use the component interface from i915 driver.
> > if i915 driver do the audio component intialization too late, snd_hdac
> > driver will meet ipanic.
> >
> > Signed-off-by: Bo He <bo.he@intel.com>
> > Signed-off-by: Yang Shi <yang.a.shi@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_drv.c | 2 --
> > drivers/gpu/drm/i915/intel_display.c | 2 ++
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > b/drivers/gpu/drm/i915/i915_drv.c index 2f5209d..9d25d7e 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private
> *dev_priv)
> > if (IS_GEN5(dev_priv))
> > intel_gpu_ips_init(dev_priv);
> >
> > - intel_audio_init(dev_priv);
> > -
> > /*
> > * Some ports require correctly set-up hpd registers for detection to
> > * work properly (leading to ghost connected connector
> > status), e.g. VGA diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index f288bcc..a471c88 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device *dev)
> >
> > dev->mode_config.funcs = &intel_mode_funcs;
> >
> > + intel_audio_init(dev_priv);
>
> Has info->num_pipes been finalized yet? Does the component framework expose the
> device to the external clients (if so, it can not be done before we are ready).
> -Chris
Yes, info->num_pipes is finalized yet. This audio component will be used in audio driver snd_hdac_i915_init.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 13:15 ` Jani Nikula
@ 2018-04-10 7:23 ` Shi, Yang A
2018-04-10 7:56 ` Jani Nikula
0 siblings, 1 reply; 20+ messages in thread
From: Shi, Yang A @ 2018-04-10 7:23 UTC (permalink / raw)
To: Jani Nikula, Chris Wilson, intel-gfx; +Cc: He, Bo
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>Sent: Thursday, March 29, 2018 9:16 PM
>To: Chris Wilson <chris@chris-wilson.co.uk>; Shi, Yang A <yang.a.shi@intel.com>;
>intel-gfx@lists.freedesktop.org
>Cc: Shi, Yang A <yang.a.shi@intel.com>; He, Bo <bo.he@intel.com>
>Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915: move audio component intialization
>before audio driver use it
>
>On Thu, 29 Mar 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> Quoting Yang (2018-03-29 08:12:13)
>>> From: Yang Shi <yang.a.shi@intel.com>
>>>
>>> snd_hdac driver would use the component interface from i915 driver.
>>> if i915 driver do the audio component intialization too late,
>>> snd_hdac driver will meet ipanic.
>>>
>>> Signed-off-by: Bo He <bo.he@intel.com>
>>> Signed-off-by: Yang Shi <yang.a.shi@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/i915_drv.c | 2 --
>>> drivers/gpu/drm/i915/intel_display.c | 2 ++
>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_drv.c
>>> b/drivers/gpu/drm/i915/i915_drv.c index 2f5209d..9d25d7e 100644
>>> --- a/drivers/gpu/drm/i915/i915_drv.c
>>> +++ b/drivers/gpu/drm/i915/i915_drv.c
>>> @@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private
>*dev_priv)
>>> if (IS_GEN5(dev_priv))
>>> intel_gpu_ips_init(dev_priv);
>>>
>>> - intel_audio_init(dev_priv);
>>> -
>>> /*
>>> * Some ports require correctly set-up hpd registers for detection to
>>> * work properly (leading to ghost connected connector
>>> status), e.g. VGA diff --git a/drivers/gpu/drm/i915/intel_display.c
>>> b/drivers/gpu/drm/i915/intel_display.c
>>> index f288bcc..a471c88 100644
>>> --- a/drivers/gpu/drm/i915/intel_display.c
>>> +++ b/drivers/gpu/drm/i915/intel_display.c
>>> @@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device
>>> *dev)
>>>
>>> dev->mode_config.funcs = &intel_mode_funcs;
>>>
>>> + intel_audio_init(dev_priv);
>>
>> Has info->num_pipes been finalized yet? Does the component framework
>> expose the device to the external clients (if so, it can not be done
>> before we are ready).
>
>Hmmh, the same patch seems to have been sent twice. I replied at [1].
>
>BR,
>Jani.
issue: snd_soc_skl meet "failed to add i915 component master (-19)" when platform don't connect any display output.
i915 do initialization before than skl_probe, but if there is no display output connect, in function drm_dp_dpcd_access, there is a 32 retry for aux i2c transactions. It will meet timeout and do usleep. Then skl_probe function will be scheduled. It will call snd_hdac_i915_init, and it will meet "failed to add i915 component master" error.
And whole snd_soc_skl initialization will be failed, audio can't work normally anymore.
So i915 driver need to move intel_audio_init at the beginning of intel_modeset_init. This will make sure i915_audio_component_init process before snd_hdac_i915_init call it.
BR.
Yang.
>
>
>[1] http://mid.mail-archive.com/87k1tvciec.fsf@intel.com
>
>
>> -Chris
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>--
>Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-10 7:23 ` Shi, Yang A
@ 2018-04-10 7:56 ` Jani Nikula
2018-04-10 8:21 ` Shi, Yang A
0 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2018-04-10 7:56 UTC (permalink / raw)
To: Shi, Yang A, Chris Wilson, intel-gfx; +Cc: He, Bo
On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
> issue: snd_soc_skl meet "failed to add i915 component master (-19)"
> when platform don't connect any display output.
>
> i915 do initialization before than skl_probe, but if there is no
> display output connect, in function drm_dp_dpcd_access, there is a 32
> retry for aux i2c transactions. It will meet timeout and do
> usleep. Then skl_probe function will be scheduled. It will call
> snd_hdac_i915_init, and it will meet "failed to add i915 component
> master" error. And whole snd_soc_skl initialization will be failed,
> audio can't work normally anymore.
>
> So i915 driver need to move intel_audio_init at the beginning of
> intel_modeset_init. This will make sure i915_audio_component_init
> process before snd_hdac_i915_init call it.
We do intel_audio_init() and register the audio component when we are
ready to handle the audio component calls. We are ready at
i915_driver_register(). We are not ready at intel_modeset_init().
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-10 7:56 ` Jani Nikula
@ 2018-04-10 8:21 ` Shi, Yang A
2018-04-10 10:57 ` Jani Nikula
0 siblings, 1 reply; 20+ messages in thread
From: Shi, Yang A @ 2018-04-10 8:21 UTC (permalink / raw)
To: Jani Nikula, Chris Wilson, intel-gfx; +Cc: He, Bo
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>Sent: Tuesday, April 10, 2018 3:57 PM
>To: Shi, Yang A <yang.a.shi@intel.com>; Chris Wilson <chris@chris-wilson.co.uk>;
>intel-gfx@lists.freedesktop.org
>Cc: He, Bo <bo.he@intel.com>
>Subject: RE: [Intel-gfx] [PATCH 1/1] drm/i915: move audio component intialization
>before audio driver use it
>
>On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>> issue: snd_soc_skl meet "failed to add i915 component master (-19)"
>> when platform don't connect any display output.
>>
>> i915 do initialization before than skl_probe, but if there is no
>> display output connect, in function drm_dp_dpcd_access, there is a 32
>> retry for aux i2c transactions. It will meet timeout and do usleep.
>> Then skl_probe function will be scheduled. It will call
>> snd_hdac_i915_init, and it will meet "failed to add i915 component
>> master" error. And whole snd_soc_skl initialization will be failed,
>> audio can't work normally anymore.
>>
>> So i915 driver need to move intel_audio_init at the beginning of
>> intel_modeset_init. This will make sure i915_audio_component_init
>> process before snd_hdac_i915_init call it.
>
>We do intel_audio_init() and register the audio component when we are ready to handle
>the audio component calls. We are ready at i915_driver_register(). We are not ready at
>intel_modeset_init().
>
>BR,
>Jani.
Thanks to comments my patch.
After I check the whole driver code, I think all ops in i915_audio_component_ops should be ready
at the beginning of function intel_modeset_init. So can we move intel_audio_init as early as we can.
Would you like to suggest a better place to do intel_audio_init?
Thanks.
BR.
Yang.
>
>
>--
>Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-10 8:21 ` Shi, Yang A
@ 2018-04-10 10:57 ` Jani Nikula
2018-04-10 13:58 ` Jani Nikula
2018-04-11 2:07 ` Shi, Yang A
0 siblings, 2 replies; 20+ messages in thread
From: Jani Nikula @ 2018-04-10 10:57 UTC (permalink / raw)
To: Shi, Yang A, Chris Wilson, intel-gfx; +Cc: Lucas De Marchi, He, Bo
On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>> issue: snd_soc_skl meet "failed to add i915 component master (-19)"
>>> when platform don't connect any display output.
>>>
>>> i915 do initialization before than skl_probe, but if there is no
>>> display output connect, in function drm_dp_dpcd_access, there is a 32
>>> retry for aux i2c transactions. It will meet timeout and do usleep.
>>> Then skl_probe function will be scheduled. It will call
>>> snd_hdac_i915_init, and it will meet "failed to add i915 component
>>> master" error. And whole snd_soc_skl initialization will be failed,
>>> audio can't work normally anymore.
>>>
>>> So i915 driver need to move intel_audio_init at the beginning of
>>> intel_modeset_init. This will make sure i915_audio_component_init
>>> process before snd_hdac_i915_init call it.
>>
>>We do intel_audio_init() and register the audio component when we are
>>ready to handle the audio component calls. We are ready at
>>i915_driver_register(). We are not ready at intel_modeset_init().
>>
>>BR,
>>Jani.
>
> Thanks to comments my patch.
> After I check the whole driver code, I think all ops in
> i915_audio_component_ops should be ready at the beginning of function
> intel_modeset_init. So can we move intel_audio_init as early as we
> can.
No, that's not true. Just as an example, dev_priv->cdclk.hw.cdclk hasn't
been initialized.
> Would you like to suggest a better place to do intel_audio_init?
I think the call is already where it is supposed to be. We expose
ourselves to the rest of the system when we are ready. If it takes long,
it takes long. I think you have a race in your driver, and you need to
deal with it properly in your driver.
In snd_hdac_i915_init(), I don't think there are any guarantees that the
request_module() call is the one actually probing i915. We might already
be mid-probe. You don't even check or log request_module() return value.
I'm also not 100% sure at what point of driver loading request_module()
returns. I think it's when the module init hook returns, which should be
all right, but again, I don't think you can count on that if it isn't
your request_module() that actually probes i915.
I think the patch at hand is a hack that reduces the window for the
race, and not a real fix. Moreover, it makes the i915 audio component
code fragile by introducing tricky probe order dependencies that we've
been systematically trying to reduce by placing the call where it is
now.
Cc: Lucas for any further input on module probing.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-10 10:57 ` Jani Nikula
@ 2018-04-10 13:58 ` Jani Nikula
2018-04-11 1:37 ` Lucas De Marchi
2018-04-11 2:07 ` Shi, Yang A
1 sibling, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2018-04-10 13:58 UTC (permalink / raw)
To: Shi, Yang A, Chris Wilson, intel-gfx; +Cc: Lucas De Marchi, He, Bo
On Tue, 10 Apr 2018, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>>On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>>> issue: snd_soc_skl meet "failed to add i915 component master (-19)"
>>>> when platform don't connect any display output.
>>>>
>>>> i915 do initialization before than skl_probe, but if there is no
>>>> display output connect, in function drm_dp_dpcd_access, there is a 32
>>>> retry for aux i2c transactions. It will meet timeout and do usleep.
>>>> Then skl_probe function will be scheduled. It will call
>>>> snd_hdac_i915_init, and it will meet "failed to add i915 component
>>>> master" error. And whole snd_soc_skl initialization will be failed,
>>>> audio can't work normally anymore.
>>>>
>>>> So i915 driver need to move intel_audio_init at the beginning of
>>>> intel_modeset_init. This will make sure i915_audio_component_init
>>>> process before snd_hdac_i915_init call it.
>>>
>>>We do intel_audio_init() and register the audio component when we are
>>>ready to handle the audio component calls. We are ready at
>>>i915_driver_register(). We are not ready at intel_modeset_init().
>>>
>>>BR,
>>>Jani.
>>
>> Thanks to comments my patch.
>> After I check the whole driver code, I think all ops in
>> i915_audio_component_ops should be ready at the beginning of function
>> intel_modeset_init. So can we move intel_audio_init as early as we
>> can.
>
> No, that's not true. Just as an example, dev_priv->cdclk.hw.cdclk hasn't
> been initialized.
>
>> Would you like to suggest a better place to do intel_audio_init?
>
> I think the call is already where it is supposed to be. We expose
> ourselves to the rest of the system when we are ready. If it takes long,
> it takes long. I think you have a race in your driver, and you need to
> deal with it properly in your driver.
>
> In snd_hdac_i915_init(), I don't think there are any guarantees that the
> request_module() call is the one actually probing i915. We might already
> be mid-probe. You don't even check or log request_module() return value.
>
> I'm also not 100% sure at what point of driver loading request_module()
> returns. I think it's when the module init hook returns, which should be
> all right, but again, I don't think you can count on that if it isn't
> your request_module() that actually probes i915.
>
> I think the patch at hand is a hack that reduces the window for the
> race, and not a real fix. Moreover, it makes the i915 audio component
> code fragile by introducing tricky probe order dependencies that we've
> been systematically trying to reduce by placing the call where it is
> now.
>
> Cc: Lucas for any further input on module probing.
Apparently there was also a bug in some version of kmod/modprobe which
could have lead to what you're experiencing. Are you running the fixed
version? See [1].
BR,
Jani.
[1] https://github.com/lucasdemarchi/kmod/commit/fd44a98ae2eb5eb32161088954ab21e58e19dfc4
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-10 13:58 ` Jani Nikula
@ 2018-04-11 1:37 ` Lucas De Marchi
[not found] ` <E3ED5BF57CCD1C40876FA2D3385ED5D37B6183A4@SHSMSX101.ccr.corp.intel.com>
0 siblings, 1 reply; 20+ messages in thread
From: Lucas De Marchi @ 2018-04-11 1:37 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Shi, Yang A, He, Bo
On Tue, Apr 10, 2018 at 10:58:28AM -0300, Jani Nikula wrote:
> On Tue, 10 Apr 2018, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> > On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
> >>>On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
> >>>> issue: snd_soc_skl meet "failed to add i915 component master (-19)"
> >>>> when platform don't connect any display output.
> >>>>
> >>>> i915 do initialization before than skl_probe, but if there is no
> >>>> display output connect, in function drm_dp_dpcd_access, there is a 32
> >>>> retry for aux i2c transactions. It will meet timeout and do usleep.
You should not really rely on "module is loaded, I can use it". It may
not be bound to the device yet in case of async probe for example.
You should rather wait for the service you want to use from the driver
to be ready. See documentation of __request_module().
> >>>> Then skl_probe function will be scheduled. It will call
> >>>> snd_hdac_i915_init, and it will meet "failed to add i915 component
> >>>> master" error. And whole snd_soc_skl initialization will be failed,
> >>>> audio can't work normally anymore.
Humn... I fail to see how the usleep() would cause any of this. If the
probe is synchronous (see below) we an eventual call to request_module()
will/should wait for the first probe to finish nonetheless.
To me it seems the error is elsewhere.
> >>>>
> >>>> So i915 driver need to move intel_audio_init at the beginning of
> >>>> intel_modeset_init. This will make sure i915_audio_component_init
> >>>> process before snd_hdac_i915_init call it.
> >>>
> >>>We do intel_audio_init() and register the audio component when we are
> >>>ready to handle the audio component calls. We are ready at
> >>>i915_driver_register(). We are not ready at intel_modeset_init().
> >>>
> >>>BR,
> >>>Jani.
> >>
> >> Thanks to comments my patch.
> >> After I check the whole driver code, I think all ops in
> >> i915_audio_component_ops should be ready at the beginning of function
> >> intel_modeset_init. So can we move intel_audio_init as early as we
> >> can.
> >
> > No, that's not true. Just as an example, dev_priv->cdclk.hw.cdclk hasn't
> > been initialized.
> >
> >> Would you like to suggest a better place to do intel_audio_init?
> >
> > I think the call is already where it is supposed to be. We expose
> > ourselves to the rest of the system when we are ready. If it takes long,
> > it takes long. I think you have a race in your driver, and you need to
> > deal with it properly in your driver.
> >
> > In snd_hdac_i915_init(), I don't think there are any guarantees that the
> > request_module() call is the one actually probing i915. We might already
This should not be relevant in this case. Even if the module is already
mid-probe, request_module() will only return after modprobe returns
(since request_module forces UMH_WAIT_PROC).
If a second call races with the first, it will try to find the module in
the module list and end up waiting for it to complete. See
add_unformed_module().
> > be mid-probe. You don't even check or log request_module() return value.
Checking the return value of request_module() is absolutely the first
thing to do. It's plain broken otherwise... there are many reasons why a
call to request_module() could fail. If your driver is being loaded from
a work queue, if the modprobe binary is not where it should be, if
there's a bug in modprobe, etc etc etc.
> >
> > I'm also not 100% sure at what point of driver loading request_module()
> > returns. I think it's when the module init hook returns, which should be
> > all right, but again, I don't think you can count on that if it isn't
> > your request_module() that actually probes i915.
You can, except if the pci probe is async... In this case modprobe would
return before the rest of the initialization. I'm not totally sure about
this without giving it a deeper look. But then, moving the call anywhere
in that function should produce the same results with enough tries.
> >
> > I think the patch at hand is a hack that reduces the window for the
> > race, and not a real fix. Moreover, it makes the i915 audio component
> > code fragile by introducing tricky probe order dependencies that we've
> > been systematically trying to reduce by placing the call where it is
> > now.
> >
> > Cc: Lucas for any further input on module probing.
>
> Apparently there was also a bug in some version of kmod/modprobe which
> could have lead to what you're experiencing. Are you running the fixed
> version? See [1].
Yep, this might explain as well. But only if i915 is builtin rather than
a module. Is this the case here?
Lucas De Marchi
>
> BR,
> Jani.
>
>
> [1] https://github.com/lucasdemarchi/kmod/commit/fd44a98ae2eb5eb32161088954ab21e58e19dfc4
>
>
> --
> Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-10 10:57 ` Jani Nikula
2018-04-10 13:58 ` Jani Nikula
@ 2018-04-11 2:07 ` Shi, Yang A
2018-04-11 9:48 ` Jani Nikula
1 sibling, 1 reply; 20+ messages in thread
From: Shi, Yang A @ 2018-04-11 2:07 UTC (permalink / raw)
To: Jani Nikula, Chris Wilson, intel-gfx; +Cc: De Marchi, Lucas, He, Bo
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>Sent: Tuesday, April 10, 2018 6:57 PM
>To: Shi, Yang A <yang.a.shi@intel.com>; Chris Wilson <chris@chris-wilson.co.uk>;
>intel-gfx@lists.freedesktop.org
>Cc: He, Bo <bo.he@intel.com>; De Marchi, Lucas <lucas.demarchi@intel.com>
>Subject: RE: [Intel-gfx] [PATCH 1/1] drm/i915: move audio component intialization
>before audio driver use it
>
>On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>>On Tue, 10 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>>> issue: snd_soc_skl meet "failed to add i915 component master (-19)"
>>>> when platform don't connect any display output.
>>>>
>>>> i915 do initialization before than skl_probe, but if there is no
>>>> display output connect, in function drm_dp_dpcd_access, there is a
>>>> 32 retry for aux i2c transactions. It will meet timeout and do usleep.
>>>> Then skl_probe function will be scheduled. It will call
>>>> snd_hdac_i915_init, and it will meet "failed to add i915 component
>>>> master" error. And whole snd_soc_skl initialization will be failed,
>>>> audio can't work normally anymore.
>>>>
>>>> So i915 driver need to move intel_audio_init at the beginning of
>>>> intel_modeset_init. This will make sure i915_audio_component_init
>>>> process before snd_hdac_i915_init call it.
>>>
>>>We do intel_audio_init() and register the audio component when we are
>>>ready to handle the audio component calls. We are ready at
>>>i915_driver_register(). We are not ready at intel_modeset_init().
>>>
>>>BR,
>>>Jani.
>>
>> Thanks to comments my patch.
>> After I check the whole driver code, I think all ops in
>> i915_audio_component_ops should be ready at the beginning of function
>> intel_modeset_init. So can we move intel_audio_init as early as we
>> can.
>
>No, that's not true. Just as an example, dev_priv->cdclk.hw.cdclk hasn't been initialized.
i915_load_modeset_init->intel_power_domains_init_hw->bxt_display_core_init->bxt_init_cdclk
dev_priv->cdclk.hw.cdclk will be initialized here.
It happened before driver enter into intel_modeset_init.
So it should be safe to be used from audio driver.
>
>> Would you like to suggest a better place to do intel_audio_init?
>
>I think the call is already where it is supposed to be. We expose ourselves to the rest of
>the system when we are ready. If it takes long, it takes long. I think you have a race in
>your driver, and you need to deal with it properly in your driver.
>
No, display driver consume too much time to do initialization when it don't connect any display
Output device.It influence whole audio driver and cause whole audio driver can't works well.
This don't make sense.
>In snd_hdac_i915_init(), I don't think there are any guarantees that the
>request_module() call is the one actually probing i915. We might already be mid-probe.
>You don't even check or log request_module() return value.
This is the issue in audio driver itself. Need be checked by audio driver owner.
BR.
Yang.
Yang Shi, Intel Open Source Technology Center
>
>I'm also not 100% sure at what point of driver loading request_module() returns. I think
>it's when the module init hook returns, which should be all right, but again, I don't think
>you can count on that if it isn't your request_module() that actually probes i915.
>
>I think the patch at hand is a hack that reduces the window for the race, and not a real
>fix. Moreover, it makes the i915 audio component code fragile by introducing tricky
>probe order dependencies that we've been systematically trying to reduce by placing the
>call where it is now.
>
>Cc: Lucas for any further input on module probing.
>
>BR,
>Jani.
>
>--
>Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-11 2:07 ` Shi, Yang A
@ 2018-04-11 9:48 ` Jani Nikula
0 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2018-04-11 9:48 UTC (permalink / raw)
To: Shi, Yang A, Chris Wilson, intel-gfx; +Cc: De Marchi, Lucas, He, Bo
On Wed, 11 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>>No, that's not true. Just as an example, dev_priv->cdclk.hw.cdclk
>>hasn't been initialized.
> i915_load_modeset_init->intel_power_domains_init_hw->bxt_display_core_init->bxt_init_cdclk
> dev_priv->cdclk.hw.cdclk will be initialized here.
> It happened before driver enter into intel_modeset_init.
> So it should be safe to be used from audio driver.
Was it easy to figure that out? Imagine double checking everything
whenever a) intel_audio.c gets changed, or b) anything in our probe that
might impact intel_audio.c gets changed. It's untenable. Our probe
ordering is what it is to manage the complexity of the driver. When
everything is done, we expose the driver to the rest of the system. Same
with sysfs, debugfs, etc.
>>> Would you like to suggest a better place to do intel_audio_init?
>>
>>I think the call is already where it is supposed to be. We expose
>>ourselves to the rest of the system when we are ready. If it takes
>>long, it takes long. I think you have a race in your driver, and you
>>need to deal with it properly in your driver.
>>
> No, display driver consume too much time to do initialization when it
> don't connect any display Output device.It influence whole audio
> driver and cause whole audio driver can't works well. This don't make
> sense.
Our probe takes as long as it takes. It's a complicated driver with
complicated probing to do. Why does your design require i915 to be
probed as part of your probe? The component interface supports the
master and client binding in any order, asynchronously.
If you have issues because of the timing, it's probably a race condition
in your driver. Doing the audio init earlier on our side just papers
over your race condition without actually fixing it.
If we were to optimize our probe, it would probably mean more
parallelism and asynchronous probing, and that in turn means even
stricter requirements for finding the root cause instead of just
fiddling with the call site.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
[not found] ` <E3ED5BF57CCD1C40876FA2D3385ED5D37B6183A4@SHSMSX101.ccr.corp.intel.com>
@ 2018-04-11 12:25 ` Jani Nikula
2018-04-12 3:32 ` Shi, Yang A
0 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2018-04-11 12:25 UTC (permalink / raw)
To: Shi, Yang A, De Marchi, Lucas; +Cc: intel-gfx, He, Bo
On Wed, 11 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
> This issue is not related to request_module. When issue happened,
> request_module get i915 Correctly and return 0 successfully. It just
> be caused by acomp->ops is null in function snd_hdac_i915_init after
> it called Component_master_add_with_match.
>
> If intel_audio_init can be called before it check
> acomp->ops. Everything will goes well. But intel_audio_init is called
> too late because i915 driver go to usleep.
Please add drm.debug=14 module parameter, enable dev_dbg for your
driver, and send us the dmesg.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-11 12:25 ` Jani Nikula
@ 2018-04-12 3:32 ` Shi, Yang A
2018-04-12 8:06 ` Jani Nikula
0 siblings, 1 reply; 20+ messages in thread
From: Shi, Yang A @ 2018-04-12 3:32 UTC (permalink / raw)
To: Jani Nikula, De Marchi, Lucas; +Cc: intel-gfx, He, Bo
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>Sent: Wednesday, April 11, 2018 8:25 PM
>To: Shi, Yang A <yang.a.shi@intel.com>; De Marchi, Lucas
><lucas.demarchi@intel.com>
>Cc: Chris Wilson <chris@chris-wilson.co.uk>; intel-gfx@lists.freedesktop.org; He, Bo
><bo.he@intel.com>; Deak, Imre <imre.deak@intel.com>
>Subject: RE: [Intel-gfx] [PATCH 1/1] drm/i915: move audio component intialization
>before audio driver use it
>
>On Wed, 11 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>> This issue is not related to request_module. When issue happened,
>> request_module get i915 Correctly and return 0 successfully. It just
>> be caused by acomp->ops is null in function snd_hdac_i915_init after
>> it called Component_master_add_with_match.
>>
>> If intel_audio_init can be called before it check
>> acomp->ops. Everything will goes well. But intel_audio_init is called
>> too late because i915 driver go to usleep.
>
>Please add drm.debug=14 module parameter, enable dev_dbg for your driver, and send
>us the dmesg.
>
>BR,
>Jani.
Dmesg is as following:
i915 driver load at about 0.214362.
snd_soc_skl driver is loaded at about 0.853961.
it meet error here.
Then i915 continue to do driver load.
[ 0.214362] [drm:i915_driver_load] No PCH found.
[ 0.214377] [drm:intel_power_domains_init] Allowed DC state mask 09
...
[ 0.217374] [drm:i915_driver_load] ppgtt mode: 3
[ 0.217377] [drm:i915_driver_load] use GPU semaphores? no
[ 0.217381] [drm:i915_driver_load] preemption enabled? no
[ 0.217409] [drm] Memory usable by graphics device = 4078M
[ 0.217414] [drm:i915_ggtt_probe_hw] GMADR size = 256M
[ 0.217418] [drm:i915_ggtt_probe_hw] GTT stolen size = 64M
[ 0.217453] [drm:i915_gem_init_stolen] Memory reserved for graphics device: 65536K, usable: 64512K
[ 0.217467] [drm:sanitize_rc6_option] BIOS enabled RC states: HW_CTRL off HW_RC6 off SW_TARGET_STATE 4
[ 0.217496] [drm:intel_opregion_setup] graphic opregion physical addr: 0x7aedd000
[ 0.217533] [drm:intel_opregion_setup] ASLE supported
[ 0.217541] [drm:intel_opregion_setup] Found valid VBT in ACPI OpRegion (RVDA)
[ 0.217630] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.217633] [drm] Driver supports precise vblank timestamp query.
...
[ 0.853961] snd_soc_skl 0000:00:0e.0: enabling device (0000 -> 0002)
[ 0.859009] snd_soc_skl 0000:00:0e.0: failed to add i915 component master (-19)
[ 0.888176] init: Starting service 'earlyaudioalsa'...
[ 0.888471] init: write_file: Unable to open '/sys/kernel/debug/snd_soc_skl/nhlt/control': No such file or directory
[ 0.902024] trusty trusty: trusty version: 14:57:13 Feb 7 2018
[ 0.902043] trusty trusty: selected api version: 2 (requested 3)
[ 0.904308] trusty-irq trusty-irq: irq from lk = 49
[ 0.910886] trusty-virtio trusty-virtio: initializing
[ 0.911177] trusty_ipc virtio0: vring0: va(pa) ffff88007487a000(0) qsz 32 notifyid 1
[ 0.911185] trusty_ipc virtio0: vring1: va(pa) ffff880074894000(0) qsz 32 notifyid 2
[ 0.911415] trusty-virtio trusty-virtio: initializing done
[ 0.911695] trusty_ipc virtio0: is online
[ 0.916608] trusty-wall trusty-wall: smwall: initialized 4096 bytes
[ 0.919025] trusty-timer trusty-timer: initialized
[ 0.929655] rpmb_sim rpmb_sim: registered RPMB capacity = 131072 of 512 blocks
[ 0.930057] init: Service 'earlyaudioalsa' (pid 1925) exited with status 1
[ 0.930405] init: Starting service 'logd'...
[ 0.941825] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d4003ff
[ 0.950299] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d4003ff
[ 0.952397] logd.auditd: start
[ 0.952416] logd.klogd: 910077775
[ 0.958767] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d4003ff
[ 0.967223] [drm:intel_dp_aux_ch] dp_aux_ch timeout status 0x7d4003ff
BR.
Yang.
Yang Shi, Intel Open Source Technology Center
>
>--
>Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-12 3:32 ` Shi, Yang A
@ 2018-04-12 8:06 ` Jani Nikula
2018-04-12 8:22 ` Shi, Yang A
0 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2018-04-12 8:06 UTC (permalink / raw)
To: Shi, Yang A, De Marchi, Lucas; +Cc: intel-gfx, He, Bo
On Thu, 12 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
> Dmesg is as following:
Full dmesg from boot please.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-04-12 8:06 ` Jani Nikula
@ 2018-04-12 8:22 ` Shi, Yang A
0 siblings, 0 replies; 20+ messages in thread
From: Shi, Yang A @ 2018-04-12 8:22 UTC (permalink / raw)
To: Jani Nikula, De Marchi, Lucas; +Cc: intel-gfx, He, Bo
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>Sent: Thursday, April 12, 2018 4:06 PM
>To: Shi, Yang A <yang.a.shi@intel.com>; De Marchi, Lucas
><lucas.demarchi@intel.com>
>Cc: Chris Wilson <chris@chris-wilson.co.uk>; intel-gfx@lists.freedesktop.org; He, Bo
><bo.he@intel.com>; Deak, Imre <imre.deak@intel.com>
>Subject: RE: [Intel-gfx] [PATCH 1/1] drm/i915: move audio component intialization
>before audio driver use it
>
>On Thu, 12 Apr 2018, "Shi, Yang A" <yang.a.shi@intel.com> wrote:
>> Dmesg is as following:
>
>Full dmesg from boot please.
Done, I already send it directly to you.
Thanks.
BR.
Yang.
>
>BR,
>Jani.
>
>
>--
>Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it
2018-03-29 7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
` (3 preceding siblings ...)
2018-03-29 11:55 ` [PATCH 1/1] " Chris Wilson
@ 2018-04-27 7:59 ` Jani Nikula
4 siblings, 0 replies; 20+ messages in thread
From: Jani Nikula @ 2018-04-27 7:59 UTC (permalink / raw)
To: intel-gfx; +Cc: Yang Shi, Bo He
On Thu, 29 Mar 2018, Yang <yang.a.shi@intel.com> wrote:
> From: Yang Shi <yang.a.shi@intel.com>
>
> snd_hdac driver would use the component interface from i915 driver.
> if i915 driver do the audio component intialization too late, snd_hdac
> driver will meet ipanic.
To follow-up, we figured out off-list that the root cause here were
local async probe changes, and the issue that this patch addresses is
not present upstream.
However, it seems likely that the patch [1] recently proposed by Chris
would cause similar issues. Let's continue the discussion on that
thread.
BR,
Jani.
[1] http://patchwork.freedesktop.org/patch/msgid/20180323083048.13327-1-chris@chris-wilson.co.uk
>
> Signed-off-by: Bo He <bo.he@intel.com>
> Signed-off-by: Yang Shi <yang.a.shi@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 2 --
> drivers/gpu/drm/i915/intel_display.c | 2 ++
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 2f5209d..9d25d7e 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1243,8 +1243,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
> if (IS_GEN5(dev_priv))
> intel_gpu_ips_init(dev_priv);
>
> - intel_audio_init(dev_priv);
> -
> /*
> * Some ports require correctly set-up hpd registers for detection to
> * work properly (leading to ghost connected connector status), e.g. VGA
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f288bcc..a471c88 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14468,6 +14468,8 @@ int intel_modeset_init(struct drm_device *dev)
>
> dev->mode_config.funcs = &intel_mode_funcs;
>
> + intel_audio_init(dev_priv);
> +
> init_llist_head(&dev_priv->atomic_helper.free_list);
> INIT_WORK(&dev_priv->atomic_helper.free_work,
> intel_atomic_helper_free_state_worker);
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-04-27 7:59 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 7:12 [PATCH 1/1] drm/i915: move audio component intialization before audio driver use it Yang
2018-03-29 8:07 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] " Patchwork
2018-03-29 8:25 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-29 11:39 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-29 11:55 ` [PATCH 1/1] " Chris Wilson
2018-03-29 13:15 ` Jani Nikula
2018-04-10 7:23 ` Shi, Yang A
2018-04-10 7:56 ` Jani Nikula
2018-04-10 8:21 ` Shi, Yang A
2018-04-10 10:57 ` Jani Nikula
2018-04-10 13:58 ` Jani Nikula
2018-04-11 1:37 ` Lucas De Marchi
[not found] ` <E3ED5BF57CCD1C40876FA2D3385ED5D37B6183A4@SHSMSX101.ccr.corp.intel.com>
2018-04-11 12:25 ` Jani Nikula
2018-04-12 3:32 ` Shi, Yang A
2018-04-12 8:06 ` Jani Nikula
2018-04-12 8:22 ` Shi, Yang A
2018-04-11 2:07 ` Shi, Yang A
2018-04-11 9:48 ` Jani Nikula
2018-04-10 7:14 ` Shi, Yang A
2018-04-27 7:59 ` Jani Nikula
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.