forked from Freescale/linux-fslc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/dp_mst: Add sideband down request tracing + selftests
Unfortunately the DP MST helpers do not have much in the way of debugging utilities. So, let's add some! This adds basic debugging output for down sideband requests that we send from the driver, so that we can actually discern what's happening when sideband requests timeout. Since there wasn't really a good way of testing that any of this worked, I ended up writing simple selftests that lightly test sideband message encoding and decoding as well. Enjoy! Changes since v1: * Clean up DO_TEST() and sideband_msg_req_encode_decode() - danvet * Get rid of pr_fmt(), just define a prefix string instead and use drm_printf() * Check highest bit of VCPI in drm_dp_decode_sideband_req() - danvet * Make the switch case order between drm_dp_decode_sideband_req() and drm_dp_encode_sideband_req() the same - danvet * Only check DRM_UT_DP - danvet * Clean up sideband_msg_req_equal() from selftests a bit, and add comments explaining why we can't just use memcmp - danvet Cc: Juston Li <juston.li@intel.com> Cc: Imre Deak <imre.deak@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Harry Wentland <hwentlan@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-8-lyude@redhat.com
- Loading branch information
Showing
6 changed files
with
536 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only | ||
* | ||
* Declarations for DP MST related functions which are only used in selftests | ||
* | ||
* Copyright © 2018 Red Hat | ||
* Authors: | ||
* Lyude Paul <lyude@redhat.com> | ||
*/ | ||
|
||
#ifndef _DRM_DP_MST_HELPER_INTERNAL_H_ | ||
#define _DRM_DP_MST_HELPER_INTERNAL_H_ | ||
|
||
#include <drm/drm_dp_mst_helper.h> | ||
|
||
void | ||
drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req, | ||
struct drm_dp_sideband_msg_tx *raw); | ||
int drm_dp_decode_sideband_req(const struct drm_dp_sideband_msg_tx *raw, | ||
struct drm_dp_sideband_msg_req_body *req); | ||
void | ||
drm_dp_dump_sideband_msg_req_body(const struct drm_dp_sideband_msg_req_body *req, | ||
int indent, struct drm_printer *printer); | ||
|
||
#endif /* !_DRM_DP_MST_HELPER_INTERNAL_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.