Re: [Intel-gfx] [PATCH 5/5] drm/dp/mst: Provide better debugs for NAK replies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2018-12-07 at 16:57 -0800, Dhinakaran Pandiyan wrote:
> On Fri, 2018-09-28 at 21:04 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Decode the NAK reply fields to make it easier to parse the logs.
> 
> A lot better than seeing the error codes. 
> 
> 
> 0-day's found a conflicting definition that's missing an undef. With
> that addressed, 
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/drm_dp_mst_topology.c | 65
> > ++++++++++++++++++++++++++++++++++-
> >  include/drm/drm_dp_helper.h           |  1 +
> >  2 files changed, 65 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c
> > b/drivers/gpu/drm/drm_dp_mst_topology.c
> > index c0f754364cc7..1178c1655f9a 100644
> > --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> > @@ -66,6 +66,64 @@ static bool drm_dp_validate_guid(struct
> > drm_dp_mst_topology_mgr *mgr,
> >  static int drm_dp_mst_register_i2c_bus(struct drm_dp_aux *aux);
> >  static void drm_dp_mst_unregister_i2c_bus(struct drm_dp_aux *aux);
> >  static void drm_dp_mst_kick_tx(struct drm_dp_mst_topology_mgr
> > *mgr);
> > +
> > +#define STR(x) [DP_ ## x] = #x
> > +
> > +static const char *drm_dp_mst_req_type_str(u8 req_type)
> > +{
> > +	static const char * const req_type_str[] = {
> > +		STR(GET_MSG_TRANSACTION_VERSION),
> > +		STR(LINK_ADDRESS),
> > +		STR(CONNECTION_STATUS_NOTIFY),
> > +		STR(ENUM_PATH_RESOURCES),
> > +		STR(ALLOCATE_PAYLOAD),
> > +		STR(QUERY_PAYLOAD),
> > +		STR(RESOURCE_STATUS_NOTIFY),
> > +		STR(CLEAR_PAYLOAD_ID_TABLE),
> > +		STR(REMOTE_DPCD_READ),
> > +		STR(REMOTE_DPCD_WRITE),
> > +		STR(REMOTE_I2C_READ),
> > +		STR(REMOTE_I2C_WRITE),
> > +		STR(POWER_UP_PHY),
> > +		STR(POWER_DOWN_PHY),
> > +		STR(SINK_EVENT_NOTIFY),
> > +		STR(QUERY_STREAM_ENC_STATUS),
> > +	};
> > +
> > +	if (req_type >= ARRAY_SIZE(req_type_str) ||
> > +	    !req_type_str[req_type])
> > +		return "unknown";
> > +
> > +	return req_type_str[req_type];
> > +}

drm_dp_sideband_parse_reply() could also use the decoded string.

-DK

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux