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>alistair/sunxi64-5.4-dsi
parent
14b2584636
commit
8fb843d179
|
@ -3735,6 +3735,7 @@ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = {
|
|||
.atomic_destroy_state = dm_crtc_destroy_state,
|
||||
.set_crc_source = amdgpu_dm_crtc_set_crc_source,
|
||||
.verify_crc_source = amdgpu_dm_crtc_verify_crc_source,
|
||||
.get_crc_sources = amdgpu_dm_crtc_get_crc_sources,
|
||||
.enable_vblank = dm_enable_vblank,
|
||||
.disable_vblank = dm_disable_vblank,
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -46,10 +46,13 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name);
|
|||
int amdgpu_dm_crtc_verify_crc_source(struct drm_crtc *crtc,
|
||||
const char *src_name,
|
||||
size_t *values_cnt);
|
||||
const char *const *amdgpu_dm_crtc_get_crc_sources(struct drm_crtc *crtc,
|
||||
size_t *count);
|
||||
void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc);
|
||||
#else
|
||||
#define amdgpu_dm_crtc_set_crc_source NULL
|
||||
#define amdgpu_dm_crtc_verify_crc_source NULL
|
||||
#define amdgpu_dm_crtc_get_crc_sources NULL
|
||||
#define amdgpu_dm_crtc_handle_crc_irq(x)
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue