diff options
author | Dingchen Zhang <dingchen.zhang@amd.com> | 2019-05-29 18:52:52 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-07-18 14:18:09 -0500 |
commit | 8fb843d179a6fff1bfe037601b06980ba9a56167 (patch) | |
tree | 61b660486247fe4798031885238f796ef96c2fce /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | |
parent | 14b2584636c66efbb9a8dd1c702d5da73ecf620d (diff) | |
download | linux-8fb843d179a6fff1bfe037601b06980ba9a56167.tar.gz linux-8fb843d179a6fff1bfe037601b06980ba9a56167.tar.bz2 linux-8fb843d179a6fff1bfe037601b06980ba9a56167.zip |
drm/amd/display: add functionality to get pipe CRC source.
[Why]
We need to check the pipe crc source through debugfs for bypass mode test.
[How]
add implementation of amdgpu_dm_crtc_get_crc_sources and hook into drm_crtc
callback get_crc_sources.
Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c index 9af270161a0e..b966e1410484 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c @@ -30,6 +30,13 @@ #include "amdgpu_dm.h" #include "dc.h" +static const char *const pipe_crc_sources[] = { + "none", + "crtc", + "dprx", + "auto", +}; + static enum amdgpu_dm_pipe_crc_source dm_parse_crc_source(const char *source) { if (!source || !strcmp(source, "none")) @@ -42,6 +49,13 @@ static enum amdgpu_dm_pipe_crc_source dm_parse_crc_source(const char *source) return AMDGPU_DM_PIPE_CRC_SOURCE_INVALID; } +const char *const *amdgpu_dm_crtc_get_crc_sources(struct drm_crtc *crtc, + size_t *count) +{ + *count = ARRAY_SIZE(pipe_crc_sources); + return pipe_crc_sources; +} + int amdgpu_dm_crtc_verify_crc_source(struct drm_crtc *crtc, const char *src_name, size_t *values_cnt) |