drm/dp_mst: Use drm_dp_dpcd_write_data() to write GUID for non-root MST branch devices
drm_dp_dpcd_write_data() can be used to write the GUID for a non-root MST branch device, similarly to writing the GUID to a root MST branch device, do so. Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://lore.kernel.org/r/20250401103846.686408-2-imre.deak@intel.com
This commit is contained in:
@@ -2192,20 +2192,17 @@ static int drm_dp_check_mstb_guid(struct drm_dp_mst_branch *mstb, guid_t *guid)
|
||||
guid_copy(&mstb->guid, guid);
|
||||
|
||||
if (!drm_dp_validate_guid(mstb->mgr, &mstb->guid)) {
|
||||
struct drm_dp_aux *aux;
|
||||
u8 buf[UUID_SIZE];
|
||||
|
||||
export_guid(buf, &mstb->guid);
|
||||
|
||||
if (mstb->port_parent) {
|
||||
ret = drm_dp_send_dpcd_write(mstb->mgr,
|
||||
mstb->port_parent,
|
||||
DP_GUID, sizeof(buf), buf);
|
||||
if (ret >= 0)
|
||||
ret = ret == sizeof(buf) ? 0 : -EPROTO;
|
||||
} else {
|
||||
ret = drm_dp_dpcd_write_data(mstb->mgr->aux,
|
||||
DP_GUID, buf, sizeof(buf));
|
||||
}
|
||||
if (mstb->port_parent)
|
||||
aux = &mstb->port_parent->aux;
|
||||
else
|
||||
aux = mstb->mgr->aux;
|
||||
|
||||
ret = drm_dp_dpcd_write_data(aux, DP_GUID, buf, sizeof(buf));
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user