diff options
author | 2018-08-21 14:08:56 +0530 | |
---|---|---|
committer | 2018-08-22 09:47:58 -0700 | |
commit | c0811a7d5befe34a17772760100e26b09a561c0e (patch) | |
tree | f964f8165d4c67a01d534979a2afda41ba67a10d /include/drm | |
parent | drm/vkms/crc: Implement verify_crc_source callback (diff) | |
download | linux-c0811a7d5befe34a17772760100e26b09a561c0e.tar.gz linux-c0811a7d5befe34a17772760100e26b09a561c0e.tar.bz2 linux-c0811a7d5befe34a17772760100e26b09a561c0e.zip |
drm/crc: Cleanup crtc_crc_open function
This patch make changes to allocate crc-entries buffer before
enabling CRC generation.
It moves all the failure check early in the function before setting
the source or memory allocation.
Now set_crc_source takes only two variable inputs, values_cnt we
already gets as part of verify_crc_source.
Changes since V1:
- refactor code to use single spin lock
Changes since V2:
- rebase
Changes since V3:
- rebase on top of VKMS driver
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Leo Li <sunpeng.li@amd.com> (V2)
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (V3)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180821083858.26275-3-mahesh1.kumar@intel.com
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_crtc.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index f2dd180a867a..b21437bc95bf 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -744,8 +744,7 @@ struct drm_crtc_funcs { * * 0 on success or a negative error code on failure. */ - int (*set_crc_source)(struct drm_crtc *crtc, const char *source, - size_t *values_cnt); + int (*set_crc_source)(struct drm_crtc *crtc, const char *source); /** * @verify_crc_source: * |