Skip to content

Commit

Permalink
Merge branch 'linux-4.19' of git://github.com/skeggsb/linux into drm-…
Browse files Browse the repository at this point in the history
…fixes

runtime refcount fix for mst connectors.

Signed-off-by: Dave Airlie <[email protected]>
From: Ben Skeggs <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA=nydWjs26=TZHqistLXjCwm-vHmrisbP6K=FMZ5gW1wnQ@mail.gmail.com
  • Loading branch information
airlied committed Oct 8, 2018
2 parents 0238df6 + e46368c commit 5ba1587
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion drivers/gpu/drm/nouveau/dispnv50/disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ba1587

Please sign in to comment.