]> git.baikalelectronics.ru Git - kernel.git/commit
drm/dp_mst: Make drm_dp_mst_dpcd_write() consistent with drm_dp_dpcd_write()
authorLyude Paul <lyude@redhat.com>
Fri, 6 Mar 2020 23:49:21 +0000 (18:49 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 10 Mar 2020 18:22:42 +0000 (14:22 -0400)
commit79df8ef06f806f4552a90ec1e205821a05fd44be
tree8d061172623716bd145e7eec81b64867ddd82515
parentd5f53c623e08321e579a510f02b1a3b42345ca1f
drm/dp_mst: Make drm_dp_mst_dpcd_write() consistent with drm_dp_dpcd_write()

Noticed this while having some problems with hubs sometimes not being
detected on the first plug. Every single dpcd read or write function
returns the number of bytes transferred on success or a negative error
code, except apparently for drm_dp_mst_dpcd_write() - which returns 0 on
success.

There's not really any good reason for this difference that I can tell,
and having the two functions give differing behavior means that
drm_dp_dpcd_write() will end up returning 0 on success for MST devices,
but the number of bytes transferred for everything else.

So, fix that and update the kernel doc.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 088e6da76cdf ("drm/dp_mst: Add MST support to DP DPCD R/W functions")
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mikita Lipski <mikita.lipski@amd.com>
Cc: Sean Paul <sean@poorly.run>
Link: https://patchwork.freedesktop.org/patch/msgid/20200306234923.547873-2-lyude@redhat.com
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/drm_dp_mst_topology.c