From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:34047 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941974AbcJZM4D (ORCPT ); Wed, 26 Oct 2016 08:56:03 -0400 Received: by mail-wm0-f65.google.com with SMTP id y138so3406614wme.1 for ; Wed, 26 Oct 2016 05:55:17 -0700 (PDT) Date: Wed, 26 Oct 2016 14:55:14 +0200 From: Daniel Vetter To: ville.syrjala@linux.intel.com Cc: dri-devel@lists.freedesktop.org, "Kirill A . Shutemov" , Carlos Santa , stable@vger.kernel.org Subject: Re: [PATCH 4/4] drm/dp/mst: Check peer device type before attempting EDID read Message-ID: <20161026125514.32jyrl44kiywuoz7@phenom.ffwll.local> References: <1477472755-15288-1-git-send-email-ville.syrjala@linux.intel.com> <1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Oct 26, 2016 at 12:05:55PM +0300, ville.syrjala@linux.intel.com wrote: > From: Ville Syrj�l� > > Only certain types of pdts have the DDC bus registered, so check for > that before we attempt the EDID read. Othwewise we risk playing around > with an i2c adapter that doesn't actually exist. > > Cc: stable@vger.kernel.org > Cc: Carlos Santa > Cc: Kirill A. Shutemov > Tested-by: Carlos Santa > Tested-by: Kirill A. Shutemov > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666 > Signed-off-by: Ville Syrj�l� > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c > index 956babc161e5..690d1b407a90 100644 > --- a/drivers/gpu/drm/drm_dp_mst_topology.c > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c > @@ -1162,7 +1162,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb, > drm_dp_put_port(port); > goto out; > } > - if (port->port_num >= DP_MST_LOGICAL_PORT_0) { > + if ((port->pdt == DP_PEER_DEVICE_DP_LEGACY_CONV || > + port->pdt == DP_PEER_DEVICE_SST_SINK) && > + port->port_num >= DP_MST_LOGICAL_PORT_0) { Matches what's in drm_dp_port_setup_pdt. Not sure this is the most reliable way to do this though, but I can't come up with anything better. Reviewed-by: Daniel Vetter > port->cached_edid = drm_get_edid(port->connector, &port->aux.ddc); > drm_mode_connector_set_tile_property(port->connector); > } > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 4/4] drm/dp/mst: Check peer device type before attempting EDID read Date: Wed, 26 Oct 2016 14:55:14 +0200 Message-ID: <20161026125514.32jyrl44kiywuoz7@phenom.ffwll.local> References: <1477472755-15288-1-git-send-email-ville.syrjala@linux.intel.com> <1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com> Sender: stable-owner@vger.kernel.org To: ville.syrjala@linux.intel.com Cc: dri-devel@lists.freedesktop.org, "Kirill A . Shutemov" , Carlos Santa , stable@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On Wed, Oct 26, 2016 at 12:05:55PM +0300, ville.syrjala@linux.intel.com wrote: > From: Ville Syrjälä > > Only certain types of pdts have the DDC bus registered, so check for > that before we attempt the EDID read. Othwewise we risk playing around > with an i2c adapter that doesn't actually exist. > > Cc: stable@vger.kernel.org > Cc: Carlos Santa > Cc: Kirill A. Shutemov > Tested-by: Carlos Santa > Tested-by: Kirill A. Shutemov > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666 > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c > index 956babc161e5..690d1b407a90 100644 > --- a/drivers/gpu/drm/drm_dp_mst_topology.c > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c > @@ -1162,7 +1162,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb, > drm_dp_put_port(port); > goto out; > } > - if (port->port_num >= DP_MST_LOGICAL_PORT_0) { > + if ((port->pdt == DP_PEER_DEVICE_DP_LEGACY_CONV || > + port->pdt == DP_PEER_DEVICE_SST_SINK) && > + port->port_num >= DP_MST_LOGICAL_PORT_0) { Matches what's in drm_dp_port_setup_pdt. Not sure this is the most reliable way to do this though, but I can't come up with anything better. Reviewed-by: Daniel Vetter > port->cached_edid = drm_get_edid(port->connector, &port->aux.ddc); > drm_mode_connector_set_tile_property(port->connector); > } > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch