summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-10-08 16:37:56 +1000
committerDave Airlie <airlied@redhat.com>2018-10-08 16:37:59 +1000
commit5ba15878f23c4bafb95afa0dabe9d08d89520259 (patch)
tree01e5489d6be31ac96103e110244c716fa78f82b0 /drivers/gpu/drm
parent0238df646e6224016a45505d2c111a24669ebe21 (diff)
parente46368cf77f2cb6304c51d9ff5f147cfb7dc0074 (diff)
downloadblackbird-obmc-linux-5ba15878f23c4bafb95afa0dabe9d08d89520259.tar.gz
blackbird-obmc-linux-5ba15878f23c4bafb95afa0dabe9d08d89520259.zip
Merge branch 'linux-4.19' of git://github.com/skeggsb/linux into drm-fixes
runtime refcount fix for mst connectors. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Ben Skeggs <bskeggs@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA=nydWjs26=TZHqistLXjCwm-vHmrisbP6K=FMZ5gW1wnQ@mail.gmail.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/disp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 5691dfa1db6f..041e7daf8a33 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -900,9 +900,22 @@ static enum drm_connector_status
nv50_mstc_detect(struct drm_connector *connector, bool force)
{
struct nv50_mstc *mstc = nv50_mstc(connector);
+ enum drm_connector_status conn_status;
+ int ret;
+
if (!mstc->port)
return connector_status_disconnected;
- return drm_dp_mst_detect_port(connector, mstc->port->mgr, mstc->port);
+
+ ret = pm_runtime_get_sync(connector->dev->dev);
+ if (ret < 0 && ret != -EACCES)
+ return connector_status_disconnected;
+
+ conn_status = drm_dp_mst_detect_port(connector, mstc->port->mgr,
+ mstc->port);
+
+ pm_runtime_mark_last_busy(connector->dev->dev);
+ pm_runtime_put_autosuspend(connector->dev->dev);
+ return conn_status;
}
static void
OpenPOWER on IntegriCloud