diff options
author | Abhinav Kumar <abhinavk@codeaurora.org> | 2020-09-13 00:08:14 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-09-15 20:54:35 +0300 |
commit | de3ee25473ba49f2e785e43b5db5e05cb35aad24 (patch) | |
tree | 162f8cd819d4073133794c8f098e18910218519c /drivers/gpu/drm/msm/dp/dp_link.h | |
parent | f913454aae8edaa84264d717e20f175bf616755f (diff) | |
download | linux-de3ee25473ba49f2e785e43b5db5e05cb35aad24.tar.xz |
drm/msm/dp: add debugfs nodes for video pattern tests
Add the debugfs nodes needed for the video pattern
compliance tests to MSM DP driver.
Changes in v2: rebase on top of latest patchset of dependency
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dp/dp_link.h')
-rw-r--r-- | drivers/gpu/drm/msm/dp/dp_link.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_link.h b/drivers/gpu/drm/msm/dp/dp_link.h index e9d54db8fb61..49811b6221e5 100644 --- a/drivers/gpu/drm/msm/dp/dp_link.h +++ b/drivers/gpu/drm/msm/dp/dp_link.h @@ -112,6 +112,29 @@ static inline u32 dp_link_bit_depth_to_bpp(u32 tbd) } } +/** + * dp_test_bit_depth_to_bpc() - convert test bit depth to bpc + * @tbd: test bit depth + * + * Returns the bits per comp (bpc) to be used corresponding to the + * bit depth value. This function assumes that bit depth has + * already been validated. + */ +static inline u32 dp_link_bit_depth_to_bpc(u32 tbd) +{ + switch (tbd) { + case DP_TEST_BIT_DEPTH_6: + return 6; + case DP_TEST_BIT_DEPTH_8: + return 8; + case DP_TEST_BIT_DEPTH_10: + return 10; + case DP_TEST_BIT_DEPTH_UNKNOWN: + default: + return 0; + } +} + u32 dp_link_get_test_bits_depth(struct dp_link *dp_link, u32 bpp); int dp_link_process_request(struct dp_link *dp_link); int dp_link_get_colorimetry_config(struct dp_link *dp_link); |