From: Wayne Lin <[email protected]>

The completion flag is not used in secure display today.
Remove unnecessary code.

Reviewed-by: Tom Chung <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
Signed-off-by: Chuanyu Tseng <[email protected]>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 7 -------
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 1 -
 2 files changed, 8 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 1b03f2bf8d7a..dd79866df1fd 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
@@ -812,7 +812,6 @@ void amdgpu_dm_crtc_handle_crc_window_irq(struct drm_crtc 
*crtc)
        unsigned long flags1;
        bool forward_roi_change = false;
        bool notify_ta = false;
-       bool all_crc_ready = true;
        struct dc_stream_state *stream_state;
        int i;
 
@@ -936,9 +935,6 @@ void amdgpu_dm_crtc_handle_crc_window_irq(struct drm_crtc 
*crtc)
                        continue;
                }
 
-               if (!crtc_ctx->crc_info.crc[i].crc_ready)
-                       all_crc_ready = false;
-
                if (reset_crc_frame_count[i] || 
crtc_ctx->crc_info.crc[i].frame_count == UINT_MAX)
                        /* Reset the reference frame count after user update 
the ROI
                         * or it reaches the maximum value.
@@ -948,9 +944,6 @@ void amdgpu_dm_crtc_handle_crc_window_irq(struct drm_crtc 
*crtc)
                        crtc_ctx->crc_info.crc[i].frame_count += 1;
        }
        spin_unlock_irqrestore(&crtc_ctx->crc_info.lock, flags1);
-
-       if (all_crc_ready)
-               complete_all(&crtc_ctx->crc_info.completion);
 }
 
 void amdgpu_dm_crtc_secure_display_create_contexts(struct amdgpu_device *adev)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
index 95bdb8699d7f..8538513ea879 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
@@ -70,7 +70,6 @@ struct crc_data {
 
 struct crc_info {
        struct crc_data crc[MAX_CRC_WINDOW_NUM];
-       struct completion completion;
        spinlock_t lock;
 };
 
-- 
2.43.0

Reply via email to