From: Oleg Vasilev Date: Thu, 29 Aug 2019 11:48:49 +0000 (+0300) Subject: drm: always determine branch device with drm_dp_is_branch() X-Git-Tag: v5.10.7~2352^2~6^2~467 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4c32073b8cfb7ad264bf65d40cc7419ff489ea0;p=platform%2Fkernel%2Flinux-rpi.git drm: always determine branch device with drm_dp_is_branch() The helper should always be used. Reviewed-by: Emil Velikov Signed-off-by: Oleg Vasilev Cc: Ville Syrjälä Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20190829114854.1539-2-oleg.vasilev@intel.com --- diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 2c7870a..f629fc5 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -460,8 +460,7 @@ void drm_dp_downstream_debug(struct seq_file *m, int len; uint8_t rev[2]; int type = port_cap[0] & DP_DS_PORT_TYPE_MASK; - bool branch_device = dpcd[DP_DOWNSTREAMPORT_PRESENT] & - DP_DWN_STRM_PORT_PRESENT; + bool branch_device = drm_dp_is_branch(dpcd); seq_printf(m, "\tDP branch device present: %s\n", branch_device ? "yes" : "no"); diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 2f31d22..7f6b3e3 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -3149,7 +3149,7 @@ static bool downstream_hpd_needs_d0(struct intel_dp *intel_dp) * FIXME should really check all downstream ports... */ return intel_dp->dpcd[DP_DPCD_REV] == 0x11 && - intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT && + drm_dp_is_branch(intel_dp->dpcd) && intel_dp->downstream_ports[0] & DP_DS_PORT_HPD; }