diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-05 07:39:06 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-05 07:39:06 -0500 |
commit | 76bf7087fb2118aee16370821975f8a58febf68a (patch) | |
tree | c1a110c82b60b400dd5ac94c73317b284f0a19dc /drivers/gpu/drm/nouveau/nouveau_connector.c | |
parent | e3e389f931a14ddf43089c7db92fc5d74edf93a4 (diff) | |
parent | 661e50bc853209e41a5c14a290ca4decc43cbfd1 (diff) | |
download | blackbird-obmc-linux-76bf7087fb2118aee16370821975f8a58febf68a.tar.gz blackbird-obmc-linux-76bf7087fb2118aee16370821975f8a58febf68a.zip |
Merge commit 'v4.16-rc4~0' into patchwork
* commit 'v4.16-rc4~0': (900 commits)
Linux 4.16-rc4
memremap: fix softlockup reports at teardown
libnvdimm: re-enable deep flush for pmem devices via fsync()
MAINTAINERS: take over Kconfig maintainership
vfio: disable filesystem-dax page pinning
kconfig: fix line number in recursive inclusion error message
Coccinelle: memdup: Fix typo in warning messages
i2c: octeon: Prevent error message on bus error
parisc: Reduce irq overhead when run in qemu
parisc: Use cr16 interval timers unconditionally on qemu
parisc: Check if secondary CPUs want own PDC calls
parisc: Hide virtual kernel memory layout
parisc: Fix ordering of cache and TLB flushes
kconfig: Update ncurses package names for menuconfig
kbuild/kallsyms: trivial typo fix
kbuild: test --build-id linker flag by ld-option instead of cc-ldoption
kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
kconfig: Don't leak choice names during parsing
sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE
kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list
...
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_connector.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 69d6e61a01ec..6ed9cb053dfa 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -570,9 +570,15 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) nv_connector->edid = NULL; } - ret = pm_runtime_get_sync(connector->dev->dev); - if (ret < 0 && ret != -EACCES) - return conn_status; + /* Outputs are only polled while runtime active, so acquiring a + * runtime PM ref here is unnecessary (and would deadlock upon + * runtime suspend because it waits for polling to finish). + */ + if (!drm_kms_helper_is_poll_worker()) { + ret = pm_runtime_get_sync(connector->dev->dev); + if (ret < 0 && ret != -EACCES) + return conn_status; + } nv_encoder = nouveau_connector_ddc_detect(connector); if (nv_encoder && (i2c = nv_encoder->i2c) != NULL) { @@ -647,8 +653,10 @@ detect_analog: out: - pm_runtime_mark_last_busy(connector->dev->dev); - pm_runtime_put_autosuspend(connector->dev->dev); + if (!drm_kms_helper_is_poll_worker()) { + pm_runtime_mark_last_busy(connector->dev->dev); + pm_runtime_put_autosuspend(connector->dev->dev); + } return conn_status; } |