]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/gpu/drm/drm_dp_mst_topology.c
Merge tag 'noinstr-lds-2020-05-19' into core/rcu
[thirdparty/linux.git] / drivers / gpu / drm / drm_dp_mst_topology.c
index c409867287341c76dbcabf09032427a7ab6601a4..35b62c5d18b40dfe2a28b2c0fd26ce437605e2fb 100644 (file)
@@ -3442,8 +3442,12 @@ static int drm_dp_send_dpcd_write(struct drm_dp_mst_topology_mgr *mgr,
        drm_dp_queue_down_tx(mgr, txmsg);
 
        ret = drm_dp_mst_wait_tx_reply(mstb, txmsg);
-       if (ret > 0 && txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK)
-               ret = -EIO;
+       if (ret > 0) {
+               if (txmsg->reply.reply_type == DP_SIDEBAND_REPLY_NAK)
+                       ret = -EIO;
+               else
+                       ret = size;
+       }
 
        kfree(txmsg);
 fail_put:
@@ -4295,6 +4299,7 @@ int drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state,
        if (pos->vcpi) {
                drm_dp_mst_put_port_malloc(port);
                pos->vcpi = 0;
+               pos->pbn = 0;
        }
 
        return 0;