summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
diff options
context:
space:
mode:
authorWayne Lin <Wayne.Lin@amd.com>2020-10-19 11:32:14 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-11-16 20:19:44 +0300
commitc920888c604d72799d057bbcd9e28a6c003ccfbe (patch)
tree6bd163e32b34c002aef096cc3c00c6756e07eeeb /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
parentc88840f342c985433ff9286dbb3083fdce85170f (diff)
downloadlinux-c920888c604d72799d057bbcd9e28a6c003ccfbe.tar.xz
drm/amd/display: Expose new CRC window property
[Why] Instead of calculating CRC on whole frame, add flexibility to calculate CRC on specific frame region. [How] Add few crc window coordinate properties. By default, CRC is calculated on whole frame unless user space specifies the CRC calculation window. Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Acked-by: Bindu Ramamurthy <bindu.r@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
index 7798eb018257..9ba21f6a9842 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -336,6 +336,13 @@ struct amdgpu_display_manager {
*/
const struct gpu_info_soc_bounding_box_v1_0 *soc_bounding_box;
+#ifdef CONFIG_DEBUG_FS
+ /* set the crc calculation window*/
+ struct drm_property *crc_win_x_start_property;
+ struct drm_property *crc_win_y_start_property;
+ struct drm_property *crc_win_x_end_property;
+ struct drm_property *crc_win_y_end_property;
+#endif
/**
* @mst_encoders:
*
@@ -422,6 +429,15 @@ struct dm_plane_state {
struct dc_plane_state *dc_state;
};
+#ifdef CONFIG_DEBUG_FS
+struct crc_rec {
+ uint16_t x_start;
+ uint16_t y_start;
+ uint16_t x_end;
+ uint16_t y_end;
+ };
+#endif
+
struct dm_crtc_state {
struct drm_crtc_state base;
struct dc_stream_state *stream;
@@ -444,6 +460,9 @@ struct dm_crtc_state {
struct dc_info_packet vrr_infopacket;
int abm_level;
+#ifdef CONFIG_DEBUG_FS
+ struct crc_rec crc_window;
+#endif
};
#define to_dm_crtc_state(x) container_of(x, struct dm_crtc_state, base)