All of lore.kernel.org
 help / color / mirror / Atom feed
* [FAIL bisect] Sound card probe error
@ 2018-05-14 10:17   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 10:17 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Marek Szyprowski,
	Sylwester Nawrocki, Mark Brown, Inki Dae, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, Andrzej Hajda

Hi All,

I experienced an issue on today's next 20180514. Found on Odroid XU3
board (Exynos5422, ARMv7, octa-core) with exynos_defconfig.

1. No sound card is probed:
[    6.717698] ALSA device list:
[    6.719303]   No soundcards found.
(expected: #0: Odroid-XU3)


2. Oops happens:
[  OK  ] Started udev Kernel Device Manager.
Unable to handle kernel paging request at virtual address c0f324ac
[   36.229430] [<c05764ac>] (platform_drv_probe) from [<c0573fd8>]
(driver_probe_device+0x2e0/0x4b4)
[   36.238258] [<c0573fd8>] (driver_probe_device) from [<c0571fb8>]
(bus_for_each_drv+0x74/0xb8)
[   36.246746] [<c0571fb8>] (bus_for_each_drv) from [<c0573bb0>]
(__device_attach+0xd4/0x168)
[   36.254974] [<c0573bb0>] (__device_attach) from [<c0572e78>]
(bus_probe_device+0x88/0x90)
[   36.263121] [<c0572e78>] (bus_probe_device) from [<c0573434>]
(deferred_probe_work_func+0x64/0x184)
[   36.272144] [<c0573434>] (deferred_probe_work_func) from
[<c0146950>] (process_one_work+0x220/0x8e8)
[   36.281236] [<c0146950>] (process_one_work) from [<c0147050>]
(worker_thread+0x38/0x584)
[   36.289293] [<c0147050>] (worker_thread) from [<c014d96c>]
(kthread+0x138/0x168)
[   36.296652] [<c014d96c>] (kthread) from [<c01010b4>]
(ret_from_fork+0x14/0x20)


3. No DRM device is probed/found.

I could not find any specific reasons of this failure (like earlier
failures... except some probe deferrals which are happening almost
alwats).

Full kernel log of issue:
http://www.krzk.eu/#/builders/1/builds/1978/steps/10/logs/serial0
Example of good boot:
http://www.krzk.eu/#/builders/1/builds/1953/steps/10/logs/serial0
\
Bisected to:
8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
commit 8c123c14bbba4add148536b6d47a9226deda2f7a
Author: Ulf Hansson <ulf.hansson@linaro.org>
Date:   Thu Apr 26 10:53:06 2018 +0200

    driver core: Respect all error codes from dev_pm_domain_attach()

    The limitation of being able to check only for -EPROBE_DEFER from
    dev_pm_domain_attach() has been removed. Hence let's respect all error
    codes and bail out accordingly.

    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

:040000 040000 26c27c583ac4557a3982b4a6bf6b3b4ff8386449
997a872ddca1c876024cf49c3e7fc68d15cd8fed M drivers


bisect log:
git bisect start
# good: [66e1c94db3cd4e094de66a6be68c3ab6d17e0c52] Merge branch
'x86-pti-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 66e1c94db3cd4e094de66a6be68c3ab6d17e0c52
# bad: [af37b24ae6b3e7eac272417c9af591c58baa8f93] Add linux-next
specific files for 20180514
git bisect bad af37b24ae6b3e7eac272417c9af591c58baa8f93
# bad: [0e9cda8f772f6c66693629b383d33a63a8333b48] Merge
remote-tracking branch 'bluetooth/master'
git bisect bad 0e9cda8f772f6c66693629b383d33a63a8333b48
# good: [a458037d65ab42098252b52889543fb836226d33] Merge
remote-tracking branch 'jc_docs/docs-next'
git bisect good a458037d65ab42098252b52889543fb836226d33
# good: [a37fb855f6e8e9eafac046721393f68f48eb5f91] net: dsa: fix
added_by_user switchdev notification
git bisect good a37fb855f6e8e9eafac046721393f68f48eb5f91
# bad: [3ee48ebb5dfef1a167b15ab9a4168134837b6e7c] Merge
remote-tracking branch 'pm/linux-next'
git bisect bad 3ee48ebb5dfef1a167b15ab9a4168134837b6e7c
# good: [89eaaf2d19a6cfff0a16014405c2a65b5257b8a1] media: lgdt330x:
don't use an uninitialized state
git bisect good 89eaaf2d19a6cfff0a16014405c2a65b5257b8a1
# good: [89eaaf2d19a6cfff0a16014405c2a65b5257b8a1] media: lgdt330x:
don't use an uninitialized state
git bisect good 89eaaf2d19a6cfff0a16014405c2a65b5257b8a1
# good: [6d2eaece20ffe783cdbcedd7ef2d6ae51d846d33] media: xilinx:
regroup caps on querycap
git bisect good 6d2eaece20ffe783cdbcedd7ef2d6ae51d846d33
# bad: [91965db07c20058e207e8ea14a47fe0ec891896d] Merge branch
'pm-core' into linux-next
git bisect bad 91965db07c20058e207e8ea14a47fe0ec891896d
# bad: [e298050322459ccd8aaa0f7edd422f630ce4e9b4] Merge branch
'pm-domains' into linux-next
git bisect bad e298050322459ccd8aaa0f7edd422f630ce4e9b4
# good: [097b29f3e6f5ec6781e5e3048e4a285edd79c357] Merge branch
'pm-cpufreq-sched' into linux-next
git bisect good 097b29f3e6f5ec6781e5e3048e4a285edd79c357
# good: [4d73e6885c07847488201e8df4da9ed56c25e21b] amba: Respect all
error codes from dev_pm_domain_attach()
git bisect good 4d73e6885c07847488201e8df4da9ed56c25e21b
# bad: [ecbc0460e7f16aca23f6dd34527fbf751eaf1453] mmc: sdio: Respect
all error codes from dev_pm_domain_attach()
git bisect bad ecbc0460e7f16aca23f6dd34527fbf751eaf1453
# bad: [f24b7891ddbf4f1d509253d6e0bcfdcfbdadf4fd] i2c: Respect all
error codes from dev_pm_domain_attach()
git bisect bad f24b7891ddbf4f1d509253d6e0bcfdcfbdadf4fd
# bad: [8c123c14bbba4add148536b6d47a9226deda2f7a] driver core: Respect
all error codes from dev_pm_domain_attach()
git bisect bad 8c123c14bbba4add148536b6d47a9226deda2f7a
# first bad commit: [8c123c14bbba4add148536b6d47a9226deda2f7a] driver
core: Respect all error codes from dev_pm_domain_attach()

Let me know if you need any more data.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 10:17   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 10:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi All,

I experienced an issue on today's next 20180514. Found on Odroid XU3
board (Exynos5422, ARMv7, octa-core) with exynos_defconfig.

1. No sound card is probed:
[    6.717698] ALSA device list:
[    6.719303]   No soundcards found.
(expected: #0: Odroid-XU3)


2. Oops happens:
[  OK  ] Started udev Kernel Device Manager.
Unable to handle kernel paging request at virtual address c0f324ac
[   36.229430] [<c05764ac>] (platform_drv_probe) from [<c0573fd8>]
(driver_probe_device+0x2e0/0x4b4)
[   36.238258] [<c0573fd8>] (driver_probe_device) from [<c0571fb8>]
(bus_for_each_drv+0x74/0xb8)
[   36.246746] [<c0571fb8>] (bus_for_each_drv) from [<c0573bb0>]
(__device_attach+0xd4/0x168)
[   36.254974] [<c0573bb0>] (__device_attach) from [<c0572e78>]
(bus_probe_device+0x88/0x90)
[   36.263121] [<c0572e78>] (bus_probe_device) from [<c0573434>]
(deferred_probe_work_func+0x64/0x184)
[   36.272144] [<c0573434>] (deferred_probe_work_func) from
[<c0146950>] (process_one_work+0x220/0x8e8)
[   36.281236] [<c0146950>] (process_one_work) from [<c0147050>]
(worker_thread+0x38/0x584)
[   36.289293] [<c0147050>] (worker_thread) from [<c014d96c>]
(kthread+0x138/0x168)
[   36.296652] [<c014d96c>] (kthread) from [<c01010b4>]
(ret_from_fork+0x14/0x20)


3. No DRM device is probed/found.

I could not find any specific reasons of this failure (like earlier
failures... except some probe deferrals which are happening almost
alwats).

Full kernel log of issue:
http://www.krzk.eu/#/builders/1/builds/1978/steps/10/logs/serial0
Example of good boot:
http://www.krzk.eu/#/builders/1/builds/1953/steps/10/logs/serial0
\
Bisected to:
8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
commit 8c123c14bbba4add148536b6d47a9226deda2f7a
Author: Ulf Hansson <ulf.hansson@linaro.org>
Date:   Thu Apr 26 10:53:06 2018 +0200

    driver core: Respect all error codes from dev_pm_domain_attach()

    The limitation of being able to check only for -EPROBE_DEFER from
    dev_pm_domain_attach() has been removed. Hence let's respect all error
    codes and bail out accordingly.

    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

:040000 040000 26c27c583ac4557a3982b4a6bf6b3b4ff8386449
997a872ddca1c876024cf49c3e7fc68d15cd8fed M drivers


bisect log:
git bisect start
# good: [66e1c94db3cd4e094de66a6be68c3ab6d17e0c52] Merge branch
'x86-pti-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect good 66e1c94db3cd4e094de66a6be68c3ab6d17e0c52
# bad: [af37b24ae6b3e7eac272417c9af591c58baa8f93] Add linux-next
specific files for 20180514
git bisect bad af37b24ae6b3e7eac272417c9af591c58baa8f93
# bad: [0e9cda8f772f6c66693629b383d33a63a8333b48] Merge
remote-tracking branch 'bluetooth/master'
git bisect bad 0e9cda8f772f6c66693629b383d33a63a8333b48
# good: [a458037d65ab42098252b52889543fb836226d33] Merge
remote-tracking branch 'jc_docs/docs-next'
git bisect good a458037d65ab42098252b52889543fb836226d33
# good: [a37fb855f6e8e9eafac046721393f68f48eb5f91] net: dsa: fix
added_by_user switchdev notification
git bisect good a37fb855f6e8e9eafac046721393f68f48eb5f91
# bad: [3ee48ebb5dfef1a167b15ab9a4168134837b6e7c] Merge
remote-tracking branch 'pm/linux-next'
git bisect bad 3ee48ebb5dfef1a167b15ab9a4168134837b6e7c
# good: [89eaaf2d19a6cfff0a16014405c2a65b5257b8a1] media: lgdt330x:
don't use an uninitialized state
git bisect good 89eaaf2d19a6cfff0a16014405c2a65b5257b8a1
# good: [89eaaf2d19a6cfff0a16014405c2a65b5257b8a1] media: lgdt330x:
don't use an uninitialized state
git bisect good 89eaaf2d19a6cfff0a16014405c2a65b5257b8a1
# good: [6d2eaece20ffe783cdbcedd7ef2d6ae51d846d33] media: xilinx:
regroup caps on querycap
git bisect good 6d2eaece20ffe783cdbcedd7ef2d6ae51d846d33
# bad: [91965db07c20058e207e8ea14a47fe0ec891896d] Merge branch
'pm-core' into linux-next
git bisect bad 91965db07c20058e207e8ea14a47fe0ec891896d
# bad: [e298050322459ccd8aaa0f7edd422f630ce4e9b4] Merge branch
'pm-domains' into linux-next
git bisect bad e298050322459ccd8aaa0f7edd422f630ce4e9b4
# good: [097b29f3e6f5ec6781e5e3048e4a285edd79c357] Merge branch
'pm-cpufreq-sched' into linux-next
git bisect good 097b29f3e6f5ec6781e5e3048e4a285edd79c357
# good: [4d73e6885c07847488201e8df4da9ed56c25e21b] amba: Respect all
error codes from dev_pm_domain_attach()
git bisect good 4d73e6885c07847488201e8df4da9ed56c25e21b
# bad: [ecbc0460e7f16aca23f6dd34527fbf751eaf1453] mmc: sdio: Respect
all error codes from dev_pm_domain_attach()
git bisect bad ecbc0460e7f16aca23f6dd34527fbf751eaf1453
# bad: [f24b7891ddbf4f1d509253d6e0bcfdcfbdadf4fd] i2c: Respect all
error codes from dev_pm_domain_attach()
git bisect bad f24b7891ddbf4f1d509253d6e0bcfdcfbdadf4fd
# bad: [8c123c14bbba4add148536b6d47a9226deda2f7a] driver core: Respect
all error codes from dev_pm_domain_attach()
git bisect bad 8c123c14bbba4add148536b6d47a9226deda2f7a
# first bad commit: [8c123c14bbba4add148536b6d47a9226deda2f7a] driver
core: Respect all error codes from dev_pm_domain_attach()

Let me know if you need any more data.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 10:17   ` Krzysztof Kozlowski
@ 2018-05-14 12:22     ` Sylwester Nawrocki
  -1 siblings, 0 replies; 22+ messages in thread
From: Sylwester Nawrocki @ 2018-05-14 12:22 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Ulf Hansson
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Marek Szyprowski,
	Mark Brown, Inki Dae, linux-samsung-soc, linux-kernel,
	linux-arm-kernel, Andrzej Hajda

Hi,

On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:

> Bisected to:
> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
> Author: Ulf Hansson <ulf.hansson@linaro.org>
> Date:   Thu Apr 26 10:53:06 2018 +0200
> 
>     driver core: Respect all error codes from dev_pm_domain_attach()
> 
>     The limitation of being able to check only for -EPROBE_DEFER from
>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>     codes and bail out accordingly.
> 
>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The DRM driver creates the HDMI codec but its registration fails, due
to some missing clocks. The clock are missing because the exynos5-subcmu
driver probing fails.

[    0.678578] exynos5-subcmu: probe of GSC failed with error -17
[    0.679250] exynos5-subcmu: probe of MFC failed with error -17
[    0.679992] exynos5-subcmu: probe of DISP failed with error -17

The exynos5-subcmu driver before registering platform device makes 
of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
call will fail, as dev->pm_domain is already set. Previously the error
was masked by code removed in the above commit and platform_drv_probe()
was could complete successfully.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:22     ` Sylwester Nawrocki
  0 siblings, 0 replies; 22+ messages in thread
From: Sylwester Nawrocki @ 2018-05-14 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:

> Bisected to:
> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
> Author: Ulf Hansson <ulf.hansson@linaro.org>
> Date:   Thu Apr 26 10:53:06 2018 +0200
> 
>     driver core: Respect all error codes from dev_pm_domain_attach()
> 
>     The limitation of being able to check only for -EPROBE_DEFER from
>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>     codes and bail out accordingly.
> 
>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The DRM driver creates the HDMI codec but its registration fails, due
to some missing clocks. The clock are missing because the exynos5-subcmu
driver probing fails.

[    0.678578] exynos5-subcmu: probe of GSC failed with error -17
[    0.679250] exynos5-subcmu: probe of MFC failed with error -17
[    0.679992] exynos5-subcmu: probe of DISP failed with error -17

The exynos5-subcmu driver before registering platform device makes 
of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
call will fail, as dev->pm_domain is already set. Previously the error
was masked by code removed in the above commit and platform_drv_probe()
was could complete successfully.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:22     ` Sylwester Nawrocki
@ 2018-05-14 12:29       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:29 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Ulf Hansson, Greg Kroah-Hartman, Rafael J. Wysocki,
	Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, Andrzej Hajda

On Mon, May 14, 2018 at 2:22 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> Hi,
>
> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>
>> Bisected to:
>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>
>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>
>>     The limitation of being able to check only for -EPROBE_DEFER from
>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>     codes and bail out accordingly.
>>
>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The DRM driver creates the HDMI codec but its registration fails, due
> to some missing clocks. The clock are missing because the exynos5-subcmu
> driver probing fails.
>
> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>
> The exynos5-subcmu driver before registering platform device makes
> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
> call will fail, as dev->pm_domain is already set. Previously the error
> was masked by code removed in the above commit and platform_drv_probe()
> was could complete successfully.

Thanks Sylwester!

Ah, I missed these messages because I was looking at err dmesg level
(and for some reason these are warn). Anyway do you have any thoughts
how is it connected with missing Odroid XU3 sound card and max98090
codec?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:29       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 14, 2018 at 2:22 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> Hi,
>
> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>
>> Bisected to:
>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>
>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>
>>     The limitation of being able to check only for -EPROBE_DEFER from
>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>     codes and bail out accordingly.
>>
>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The DRM driver creates the HDMI codec but its registration fails, due
> to some missing clocks. The clock are missing because the exynos5-subcmu
> driver probing fails.
>
> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>
> The exynos5-subcmu driver before registering platform device makes
> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
> call will fail, as dev->pm_domain is already set. Previously the error
> was masked by code removed in the above commit and platform_drv_probe()
> was could complete successfully.

Thanks Sylwester!

Ah, I missed these messages because I was looking at err dmesg level
(and for some reason these are warn). Anyway do you have any thoughts
how is it connected with missing Odroid XU3 sound card and max98090
codec?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:22     ` Sylwester Nawrocki
@ 2018-05-14 12:30       ` Ulf Hansson
  -1 siblings, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2018-05-14 12:30 UTC (permalink / raw)
  To: Sylwester Nawrocki, Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Marek Szyprowski,
	Mark Brown, Inki Dae, linux-samsung-soc,
	Linux Kernel Mailing List, Linux ARM, Andrzej Hajda

On 14 May 2018 at 14:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
> Hi,
>
> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>
>> Bisected to:
>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>
>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>
>>     The limitation of being able to check only for -EPROBE_DEFER from
>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>     codes and bail out accordingly.
>>
>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The DRM driver creates the HDMI codec but its registration fails, due
> to some missing clocks. The clock are missing because the exynos5-subcmu
> driver probing fails.
>
> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>
> The exynos5-subcmu driver before registering platform device makes
> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
> call will fail, as dev->pm_domain is already set. Previously the error
> was masked by code removed in the above commit and platform_drv_probe()
> was could complete successfully.

Thanks for providing this information!

I was about to tell that I overlooked the fact that there is more than
one way to assign PM domain pointers to devices. To fix the problem,
dev_pm_domain_attach() should return 0, not -EEXIST when it finds and
existing PM domain pointer.

Does the below patch fix the problem?

From: Ulf Hansson <ulf.hansson@linaro.org>
Date: Mon, 14 May 2018 14:26:16 +0200
Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain
 exists

As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
to devices, clearly we must allow a device to have the pointer already
being assigned. For this reason, return 0 instead of -EEXIST.

Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/base/power/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index 5e4b481..390868c 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -106,7 +106,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on)
        int ret;

        if (dev->pm_domain)
-               return -EEXIST;
+               return 0;

        ret = acpi_dev_pm_attach(dev, power_on);
        if (!ret)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:30       ` Ulf Hansson
  0 siblings, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2018-05-14 12:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 May 2018 at 14:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
> Hi,
>
> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>
>> Bisected to:
>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>
>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>
>>     The limitation of being able to check only for -EPROBE_DEFER from
>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>     codes and bail out accordingly.
>>
>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The DRM driver creates the HDMI codec but its registration fails, due
> to some missing clocks. The clock are missing because the exynos5-subcmu
> driver probing fails.
>
> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>
> The exynos5-subcmu driver before registering platform device makes
> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
> call will fail, as dev->pm_domain is already set. Previously the error
> was masked by code removed in the above commit and platform_drv_probe()
> was could complete successfully.

Thanks for providing this information!

I was about to tell that I overlooked the fact that there is more than
one way to assign PM domain pointers to devices. To fix the problem,
dev_pm_domain_attach() should return 0, not -EEXIST when it finds and
existing PM domain pointer.

Does the below patch fix the problem?

From: Ulf Hansson <ulf.hansson@linaro.org>
Date: Mon, 14 May 2018 14:26:16 +0200
Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain
 exists

As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
to devices, clearly we must allow a device to have the pointer already
being assigned. For this reason, return 0 instead of -EEXIST.

Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/base/power/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c
index 5e4b481..390868c 100644
--- a/drivers/base/power/common.c
+++ b/drivers/base/power/common.c
@@ -106,7 +106,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on)
        int ret;

        if (dev->pm_domain)
-               return -EEXIST;
+               return 0;

        ret = acpi_dev_pm_attach(dev, power_on);
        if (!ret)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:29       ` Krzysztof Kozlowski
@ 2018-05-14 12:36         ` Marek Szyprowski
  -1 siblings, 0 replies; 22+ messages in thread
From: Marek Szyprowski @ 2018-05-14 12:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sylwester Nawrocki
  Cc: Ulf Hansson, Greg Kroah-Hartman, Rafael J. Wysocki, Mark Brown,
	Inki Dae, linux-samsung-soc, linux-kernel, linux-arm-kernel,
	Andrzej Hajda

Hi Krzysztof,

On 2018-05-14 14:29, Krzysztof Kozlowski wrote:
> On Mon, May 14, 2018 at 2:22 PM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> Hi,
>>
>> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>>
>>> Bisected to:
>>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>>
>>>      driver core: Respect all error codes from dev_pm_domain_attach()
>>>
>>>      The limitation of being able to check only for -EPROBE_DEFER from
>>>      dev_pm_domain_attach() has been removed. Hence let's respect all error
>>>      codes and bail out accordingly.
>>>
>>>      Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>      Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>      Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> The DRM driver creates the HDMI codec but its registration fails, due
>> to some missing clocks. The clock are missing because the exynos5-subcmu
>> driver probing fails.
>>
>> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
>> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
>> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>>
>> The exynos5-subcmu driver before registering platform device makes
>> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
>> call will fail, as dev->pm_domain is already set. Previously the error
>> was masked by code removed in the above commit and platform_drv_probe()
>> was could complete successfully.
> Thanks Sylwester!
>
> Ah, I missed these messages because I was looking at err dmesg level
> (and for some reason these are warn). Anyway do you have any thoughts
> how is it connected with missing Odroid XU3 sound card and max98090
> codec?

Odroid XU3 sound card driver is waiting for HDMI codec, which is being 
created
by Exynos DRM HDMI driver, which was deferred by lack of clocks.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:36         ` Marek Szyprowski
  0 siblings, 0 replies; 22+ messages in thread
From: Marek Szyprowski @ 2018-05-14 12:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Krzysztof,

On 2018-05-14 14:29, Krzysztof Kozlowski wrote:
> On Mon, May 14, 2018 at 2:22 PM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> Hi,
>>
>> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>>
>>> Bisected to:
>>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>>
>>>      driver core: Respect all error codes from dev_pm_domain_attach()
>>>
>>>      The limitation of being able to check only for -EPROBE_DEFER from
>>>      dev_pm_domain_attach() has been removed. Hence let's respect all error
>>>      codes and bail out accordingly.
>>>
>>>      Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>      Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>      Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> The DRM driver creates the HDMI codec but its registration fails, due
>> to some missing clocks. The clock are missing because the exynos5-subcmu
>> driver probing fails.
>>
>> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
>> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
>> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>>
>> The exynos5-subcmu driver before registering platform device makes
>> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
>> call will fail, as dev->pm_domain is already set. Previously the error
>> was masked by code removed in the above commit and platform_drv_probe()
>> was could complete successfully.
> Thanks Sylwester!
>
> Ah, I missed these messages because I was looking at err dmesg level
> (and for some reason these are warn). Anyway do you have any thoughts
> how is it connected with missing Odroid XU3 sound card and max98090
> codec?

Odroid XU3 sound card driver is waiting for HDMI codec, which is being 
created
by Exynos DRM HDMI driver, which was deferred by lack of clocks.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:29       ` Krzysztof Kozlowski
@ 2018-05-14 12:40         ` Sylwester Nawrocki
  -1 siblings, 0 replies; 22+ messages in thread
From: Sylwester Nawrocki @ 2018-05-14 12:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Ulf Hansson, Greg Kroah-Hartman, Rafael J. Wysocki,
	Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, Andrzej Hajda

On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
> Ah, I missed these messages because I was looking at err dmesg level
> (and for some reason these are warn). Anyway do you have any thoughts
> how is it connected with missing Odroid XU3 sound card and max98090
> codec?

One reason is that the DRM driver registers an ASoC codec object which
is required for the sound card registration to complete. But I wonder
why there is no any error messages related to this.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:40         ` Sylwester Nawrocki
  0 siblings, 0 replies; 22+ messages in thread
From: Sylwester Nawrocki @ 2018-05-14 12:40 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
> Ah, I missed these messages because I was looking at err dmesg level
> (and for some reason these are warn). Anyway do you have any thoughts
> how is it connected with missing Odroid XU3 sound card and max98090
> codec?

One reason is that the DRM driver registers an ASoC codec object which
is required for the sound card registration to complete. But I wonder
why there is no any error messages related to this.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:30       ` Ulf Hansson
@ 2018-05-14 12:43         ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:43 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sylwester Nawrocki, Greg Kroah-Hartman, Rafael J. Wysocki,
	Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	Linux Kernel Mailing List, Linux ARM, Andrzej Hajda

On Mon, May 14, 2018 at 2:30 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 14 May 2018 at 14:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>> Hi,
>>
>> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>>
>>> Bisected to:
>>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>>
>>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>>
>>>     The limitation of being able to check only for -EPROBE_DEFER from
>>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>>     codes and bail out accordingly.
>>>
>>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> The DRM driver creates the HDMI codec but its registration fails, due
>> to some missing clocks. The clock are missing because the exynos5-subcmu
>> driver probing fails.
>>
>> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
>> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
>> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>>
>> The exynos5-subcmu driver before registering platform device makes
>> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
>> call will fail, as dev->pm_domain is already set. Previously the error
>> was masked by code removed in the above commit and platform_drv_probe()
>> was could complete successfully.
>
> Thanks for providing this information!
>
> I was about to tell that I overlooked the fact that there is more than
> one way to assign PM domain pointers to devices. To fix the problem,
> dev_pm_domain_attach() should return 0, not -EEXIST when it finds and
> existing PM domain pointer.
>
> Does the below patch fix the problem?
>
> From: Ulf Hansson <ulf.hansson@linaro.org>
> Date: Mon, 14 May 2018 14:26:16 +0200
> Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain
>  exists
>
> As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
> to devices, clearly we must allow a device to have the pointer already
> being assigned. For this reason, return 0 instead of -EEXIST.
>
> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/base/power/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


Yes, this fixes the issue.
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:43         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 14, 2018 at 2:30 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 14 May 2018 at 14:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>> Hi,
>>
>> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>>
>>> Bisected to:
>>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>>
>>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>>
>>>     The limitation of being able to check only for -EPROBE_DEFER from
>>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>>     codes and bail out accordingly.
>>>
>>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> The DRM driver creates the HDMI codec but its registration fails, due
>> to some missing clocks. The clock are missing because the exynos5-subcmu
>> driver probing fails.
>>
>> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
>> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
>> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>>
>> The exynos5-subcmu driver before registering platform device makes
>> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
>> call will fail, as dev->pm_domain is already set. Previously the error
>> was masked by code removed in the above commit and platform_drv_probe()
>> was could complete successfully.
>
> Thanks for providing this information!
>
> I was about to tell that I overlooked the fact that there is more than
> one way to assign PM domain pointers to devices. To fix the problem,
> dev_pm_domain_attach() should return 0, not -EEXIST when it finds and
> existing PM domain pointer.
>
> Does the below patch fix the problem?
>
> From: Ulf Hansson <ulf.hansson@linaro.org>
> Date: Mon, 14 May 2018 14:26:16 +0200
> Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain
>  exists
>
> As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
> to devices, clearly we must allow a device to have the pointer already
> being assigned. For this reason, return 0 instead of -EEXIST.
>
> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/base/power/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)


Yes, this fixes the issue.
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:40         ` Sylwester Nawrocki
@ 2018-05-14 12:45           ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:45 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Ulf Hansson, Greg Kroah-Hartman, Rafael J. Wysocki,
	Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, Andrzej Hajda

On Mon, May 14, 2018 at 2:40 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
>> Ah, I missed these messages because I was looking at err dmesg level
>> (and for some reason these are warn). Anyway do you have any thoughts
>> how is it connected with missing Odroid XU3 sound card and max98090
>> codec?
>
> One reason is that the DRM driver registers an ASoC codec object which
> is required for the sound card registration to complete. But I wonder
> why there is no any error messages related to this.

Thanks Marek and Sylwester. Another point is that probably OOPS later
should not happen...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:45           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 14, 2018 at 2:40 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
>> Ah, I missed these messages because I was looking at err dmesg level
>> (and for some reason these are warn). Anyway do you have any thoughts
>> how is it connected with missing Odroid XU3 sound card and max98090
>> codec?
>
> One reason is that the DRM driver registers an ASoC codec object which
> is required for the sound card registration to complete. But I wonder
> why there is no any error messages related to this.

Thanks Marek and Sylwester. Another point is that probably OOPS later
should not happen...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:45           ` Krzysztof Kozlowski
@ 2018-05-14 12:50             ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:50 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, Andrzej Hajda

On Mon, May 14, 2018 at 2:45 PM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Mon, May 14, 2018 at 2:40 PM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
>>> Ah, I missed these messages because I was looking at err dmesg level
>>> (and for some reason these are warn). Anyway do you have any thoughts
>>> how is it connected with missing Odroid XU3 sound card and max98090
>>> codec?
>>
>> One reason is that the DRM driver registers an ASoC codec object which
>> is required for the sound card registration to complete. But I wonder
>> why there is no any error messages related to this.
>
> Thanks Marek and Sylwester. Another point is that probably OOPS later
> should not happen...

Separate topic (trim Cc list):

... and this means that disabling Exynos DRM causes lack of Audio. I
tried it now and indeed without DRM there is no audio again. I think
it is not nice... There are not many such use cases but there are
(playing audio from console/ssh with a headless board).\

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 12:50             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-14 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, May 14, 2018 at 2:45 PM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Mon, May 14, 2018 at 2:40 PM, Sylwester Nawrocki
> <s.nawrocki@samsung.com> wrote:
>> On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
>>> Ah, I missed these messages because I was looking at err dmesg level
>>> (and for some reason these are warn). Anyway do you have any thoughts
>>> how is it connected with missing Odroid XU3 sound card and max98090
>>> codec?
>>
>> One reason is that the DRM driver registers an ASoC codec object which
>> is required for the sound card registration to complete. But I wonder
>> why there is no any error messages related to this.
>
> Thanks Marek and Sylwester. Another point is that probably OOPS later
> should not happen...

Separate topic (trim Cc list):

... and this means that disabling Exynos DRM causes lack of Audio. I
tried it now and indeed without DRM there is no audio again. I think
it is not nice... There are not many such use cases but there are
(playing audio from console/ssh with a headless board).\

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:50             ` Krzysztof Kozlowski
@ 2018-05-14 13:34               ` Sylwester Nawrocki
  -1 siblings, 0 replies; 22+ messages in thread
From: Sylwester Nawrocki @ 2018-05-14 13:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	linux-kernel, linux-arm-kernel, Andrzej Hajda

On 05/14/2018 02:50 PM, Krzysztof Kozlowski wrote:
> On Mon, May 14, 2018 at 2:45 PM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> On Mon, May 14, 2018 at 2:40 PM, Sylwester Nawrocki
>> <s.nawrocki@samsung.com> wrote:
>>> On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
>>>> Ah, I missed these messages because I was looking at err dmesg level
>>>> (and for some reason these are warn). Anyway do you have any thoughts
>>>> how is it connected with missing Odroid XU3 sound card and max98090
>>>> codec?
>>> One reason is that the DRM driver registers an ASoC codec object which
>>> is required for the sound card registration to complete. But I wonder
>>> why there is no any error messages related to this.
>> Thanks Marek and Sylwester. Another point is that probably OOPS later
>> should not happen...

> Separate topic (trim Cc list):
> 
> ... and this means that disabling Exynos DRM causes lack of Audio. I
> tried it now and indeed without DRM there is no audio again. I think
> it is not nice... There are not many such use cases but there are
> (playing audio from console/ssh with a headless board).\

As we discussed off the mailing list, what we could probably do now
is to add a compile time dependency on CONFIG_DRM_EXYNOS_HDMI, a fallback
to the max98098 codec only when the HDMI driver is disabled. 

That might require modifying snd_soc_of_get_dai_link_codecs() so it can 
skip optional codecs.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 13:34               ` Sylwester Nawrocki
  0 siblings, 0 replies; 22+ messages in thread
From: Sylwester Nawrocki @ 2018-05-14 13:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/14/2018 02:50 PM, Krzysztof Kozlowski wrote:
> On Mon, May 14, 2018 at 2:45 PM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> On Mon, May 14, 2018 at 2:40 PM, Sylwester Nawrocki
>> <s.nawrocki@samsung.com> wrote:
>>> On 05/14/2018 02:29 PM, Krzysztof Kozlowski wrote:
>>>> Ah, I missed these messages because I was looking at err dmesg level
>>>> (and for some reason these are warn). Anyway do you have any thoughts
>>>> how is it connected with missing Odroid XU3 sound card and max98090
>>>> codec?
>>> One reason is that the DRM driver registers an ASoC codec object which
>>> is required for the sound card registration to complete. But I wonder
>>> why there is no any error messages related to this.
>> Thanks Marek and Sylwester. Another point is that probably OOPS later
>> should not happen...

> Separate topic (trim Cc list):
> 
> ... and this means that disabling Exynos DRM causes lack of Audio. I
> tried it now and indeed without DRM there is no audio again. I think
> it is not nice... There are not many such use cases but there are
> (playing audio from console/ssh with a headless board).\

As we discussed off the mailing list, what we could probably do now
is to add a compile time dependency on CONFIG_DRM_EXYNOS_HDMI, a fallback
to the max98098 codec only when the HDMI driver is disabled. 

That might require modifying snd_soc_of_get_dai_link_codecs() so it can 
skip optional codecs.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [FAIL bisect] Sound card probe error
  2018-05-14 12:43         ` Krzysztof Kozlowski
@ 2018-05-14 14:35           ` Ulf Hansson
  -1 siblings, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2018-05-14 14:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rafael J. Wysocki
  Cc: Sylwester Nawrocki, Greg Kroah-Hartman, Rafael J. Wysocki,
	Marek Szyprowski, Mark Brown, Inki Dae, linux-samsung-soc,
	Linux Kernel Mailing List, Linux ARM, Andrzej Hajda

On 14 May 2018 at 14:43, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Mon, May 14, 2018 at 2:30 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 14 May 2018 at 14:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>>> Hi,
>>>
>>> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>>>
>>>> Bisected to:
>>>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>>>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>>>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>>>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>>>
>>>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>>>
>>>>     The limitation of being able to check only for -EPROBE_DEFER from
>>>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>>>     codes and bail out accordingly.
>>>>
>>>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>
>>> The DRM driver creates the HDMI codec but its registration fails, due
>>> to some missing clocks. The clock are missing because the exynos5-subcmu
>>> driver probing fails.
>>>
>>> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
>>> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
>>> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>>>
>>> The exynos5-subcmu driver before registering platform device makes
>>> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
>>> call will fail, as dev->pm_domain is already set. Previously the error
>>> was masked by code removed in the above commit and platform_drv_probe()
>>> was could complete successfully.
>>
>> Thanks for providing this information!
>>
>> I was about to tell that I overlooked the fact that there is more than
>> one way to assign PM domain pointers to devices. To fix the problem,
>> dev_pm_domain_attach() should return 0, not -EEXIST when it finds and
>> existing PM domain pointer.
>>
>> Does the below patch fix the problem?
>>
>> From: Ulf Hansson <ulf.hansson@linaro.org>
>> Date: Mon, 14 May 2018 14:26:16 +0200
>> Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain
>>  exists
>>
>> As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
>> to devices, clearly we must allow a device to have the pointer already
>> being assigned. For this reason, return 0 instead of -EEXIST.
>>
>> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> ---
>>  drivers/base/power/common.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> Yes, this fixes the issue.
> Tested-by: Krzysztof Kozlowski <krzk@kernel.org>

Thanks for the confirmation!

I am going to re-post the patch to include linux-pm, then let's see
how Rafael wants to handle it.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [FAIL bisect] Sound card probe error
@ 2018-05-14 14:35           ` Ulf Hansson
  0 siblings, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2018-05-14 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 May 2018 at 14:43, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Mon, May 14, 2018 at 2:30 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> On 14 May 2018 at 14:22, Sylwester Nawrocki <s.nawrocki@samsung.com> wrote:
>>> Hi,
>>>
>>> On 05/14/2018 12:17 PM, Krzysztof Kozlowski wrote:
>>>
>>>> Bisected to:
>>>> 8c123c14bbba4add148536b6d47a9226deda2f7a is the first bad commit
>>>> commit 8c123c14bbba4add148536b6d47a9226deda2f7a
>>>> Author: Ulf Hansson <ulf.hansson@linaro.org>
>>>> Date:   Thu Apr 26 10:53:06 2018 +0200
>>>>
>>>>     driver core: Respect all error codes from dev_pm_domain_attach()
>>>>
>>>>     The limitation of being able to check only for -EPROBE_DEFER from
>>>>     dev_pm_domain_attach() has been removed. Hence let's respect all error
>>>>     codes and bail out accordingly.
>>>>
>>>>     Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>>>     Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>
>>> The DRM driver creates the HDMI codec but its registration fails, due
>>> to some missing clocks. The clock are missing because the exynos5-subcmu
>>> driver probing fails.
>>>
>>> [    0.678578] exynos5-subcmu: probe of GSC failed with error -17
>>> [    0.679250] exynos5-subcmu: probe of MFC failed with error -17
>>> [    0.679992] exynos5-subcmu: probe of DISP failed with error -17
>>>
>>> The exynos5-subcmu driver before registering platform device makes
>>> of_genpd_add_device() call, so in platform_drv_probe() dev_pm_domain_attach()
>>> call will fail, as dev->pm_domain is already set. Previously the error
>>> was masked by code removed in the above commit and platform_drv_probe()
>>> was could complete successfully.
>>
>> Thanks for providing this information!
>>
>> I was about to tell that I overlooked the fact that there is more than
>> one way to assign PM domain pointers to devices. To fix the problem,
>> dev_pm_domain_attach() should return 0, not -EEXIST when it finds and
>> existing PM domain pointer.
>>
>> Does the below patch fix the problem?
>>
>> From: Ulf Hansson <ulf.hansson@linaro.org>
>> Date: Mon, 14 May 2018 14:26:16 +0200
>> Subject: [PATCH] PM / Domains: Don't return -EEXIST at attach when PM domain
>>  exists
>>
>> As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
>> to devices, clearly we must allow a device to have the pointer already
>> being assigned. For this reason, return 0 instead of -EEXIST.
>>
>> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> ---
>>  drivers/base/power/common.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> Yes, this fixes the issue.
> Tested-by: Krzysztof Kozlowski <krzk@kernel.org>

Thanks for the confirmation!

I am going to re-post the patch to include linux-pm, then let's see
how Rafael wants to handle it.

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-05-14 14:35 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180514101728epcas4p3108760546a415b36252df93dfe38e0fb@epcas4p3.samsung.com>
2018-05-14 10:17 ` [FAIL bisect] Sound card probe error Krzysztof Kozlowski
2018-05-14 10:17   ` Krzysztof Kozlowski
2018-05-14 12:22   ` Sylwester Nawrocki
2018-05-14 12:22     ` Sylwester Nawrocki
2018-05-14 12:29     ` Krzysztof Kozlowski
2018-05-14 12:29       ` Krzysztof Kozlowski
2018-05-14 12:36       ` Marek Szyprowski
2018-05-14 12:36         ` Marek Szyprowski
2018-05-14 12:40       ` Sylwester Nawrocki
2018-05-14 12:40         ` Sylwester Nawrocki
2018-05-14 12:45         ` Krzysztof Kozlowski
2018-05-14 12:45           ` Krzysztof Kozlowski
2018-05-14 12:50           ` Krzysztof Kozlowski
2018-05-14 12:50             ` Krzysztof Kozlowski
2018-05-14 13:34             ` Sylwester Nawrocki
2018-05-14 13:34               ` Sylwester Nawrocki
2018-05-14 12:30     ` Ulf Hansson
2018-05-14 12:30       ` Ulf Hansson
2018-05-14 12:43       ` Krzysztof Kozlowski
2018-05-14 12:43         ` Krzysztof Kozlowski
2018-05-14 14:35         ` Ulf Hansson
2018-05-14 14:35           ` Ulf Hansson

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.