]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/amd/display: Fix warning
authorQingqing Zhuo <qingqing.zhuo@amd.com>
Wed, 24 Feb 2021 04:05:20 +0000 (23:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 03:02:43 +0000 (23:02 -0400)
[Why]
- Wrong scope for ifdef
- Missing struct description

[How]
Move ifdef and add comment

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

index d5de288a3061bf2dc8049dffd18732f839e5a9d9..eab55b0dd4a6e6e86e43bc555f7068012aa5228f 100644 (file)
@@ -977,11 +977,12 @@ static void event_mall_stutter(struct work_struct *work)
        else
                dm->active_vblank_irq_count--;
 
-
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
        dc_allow_idle_optimizations(
                dm->dc, dm->active_vblank_irq_count == 0);
 
        DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
+#endif
 
 
        mutex_unlock(&dm->dc_lock);
index b9c658cebd6d025fc2b79210d5d64238b8e4b43b..3ec111736e3af82c77d1015cb80ad2a019e1b1ab 100644 (file)
@@ -245,12 +245,12 @@ struct amdgpu_display_manager {
         */
        struct mutex audio_lock;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN)
        /**
-        * @vblank_work_lock:
+        * @vblank_lock:
         *
         * Guards access to deferred vblank work state.
         */
-#if defined(CONFIG_DRM_AMD_DC_DCN)
        spinlock_t vblank_lock;
 #endif
 
@@ -342,6 +342,11 @@ struct amdgpu_display_manager {
 #endif
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
+       /**
+        * @vblank_workqueue:
+        *
+        * amdgpu workqueue during vblank
+        */
        struct vblank_workqueue *vblank_workqueue;
 #endif
 
@@ -360,12 +365,15 @@ struct amdgpu_display_manager {
         */
        const struct gpu_info_soc_bounding_box_v1_0 *soc_bounding_box;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN)
        /**
         * @active_vblank_irq_count:
         *
         * number of currently active vblank irqs
         */
        uint32_t active_vblank_irq_count;
+#endif
+
 #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
        struct crc_rd_work *crc_rd_wrk;
 #endif