dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Vasilev <oleg.vasilev@intel.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH v2 2/6] drm: always determine branch device with drm_dp_is_branch()
Date: Mon, 15 Jul 2019 14:23:30 +0300	[thread overview]
Message-ID: <20190715112408.20114-3-oleg.vasilev@intel.com> (raw)
In-Reply-To: <20190715112408.20114-1-oleg.vasilev@intel.com>

The helper should always be used.

Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c         | 3 +--
 drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 0b994d083a89..67f7f3e1997b 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -596,8 +596,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 a9db16de2999..b8f8f40b4f3d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2916,7 +2916,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;
 }
 
-- 
2.22.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-07-15 11:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01  8:00 [PATCH 1/2] drm: report dp downstream port type as a subconnector property Oleg Vasilev
2019-07-01  8:00 ` [PATCH 2/2] drm/i915: utilize subconnector property for DP Oleg Vasilev
2019-07-02 12:36 ` [Intel-gfx] [PATCH 1/2] drm: report dp downstream port type as a subconnector property Ville Syrjälä
2019-07-02 13:38 ` Emil Velikov
2019-07-03  8:19   ` Vasilev, Oleg
2019-07-03 13:35     ` [Intel-gfx] " Emil Velikov
2019-07-15 11:23 ` Subconnector property for DP downstream type Oleg Vasilev
2019-07-15 11:23   ` [PATCH v2 1/6] drm: move DP_MAX_DOWNSTREAM_PORTS from i915 to drm core Oleg Vasilev
2019-07-15 11:23   ` Oleg Vasilev [this message]
2019-07-15 11:23   ` [PATCH v2 3/6] drm: report dp downstream port type as a subconnector property Oleg Vasilev
2019-07-15 11:23   ` [PATCH v2 4/6] drm/i915: utilize subconnector property for DP Oleg Vasilev
2019-07-15 11:23   ` [PATCH v2 5/6] drm/nouveau: " Oleg Vasilev
2019-07-15 12:15     ` Emil Velikov
     [not found]   ` <20190715112408.20114-1-oleg.vasilev-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-07-15 11:23     ` [PATCH v2 6/6] drm/amdgpu: " Oleg Vasilev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190715112408.20114-3-oleg.vasilev@intel.com \
    --to=oleg.vasilev@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox