Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/dp: Drop open-coded drm_dp_is_branch() in drm_dp_read_downstream_info()

Noticed this while fixing another issue in drm_dp_read_downstream_info(),
the open coded DP_DOWNSTREAMPORT_PRESENT check here just duplicates what we
already do in drm_dp_is_branch(), so just get rid of it.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210430223428.10514-2-lyude@redhat.com

+1 -3
+1 -3
drivers/gpu/drm/drm_dp_helper.c
··· 677 677 memset(downstream_ports, 0, DP_MAX_DOWNSTREAM_PORTS); 678 678 679 679 /* No downstream info to read */ 680 - if (!drm_dp_is_branch(dpcd) || 681 - dpcd[DP_DPCD_REV] < DP_DPCD_REV_10 || 682 - !(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT)) 680 + if (!drm_dp_is_branch(dpcd) || dpcd[DP_DPCD_REV] < DP_DPCD_REV_10) 683 681 return 0; 684 682 685 683 /* Some branches advertise having 0 downstream ports, despite also advertising they have a