Skip to contentSkip to conversation

drm/amd/display: Don't re-enable CRC when CONFIG_DEBUG_FS isn't defined

PATCH In review Nicholas Kazlauskas 2 participants 2 messages Feb 4, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Don't re-enable CRC when CONFIG_DEBUG_FS isn't defined

[Why]
When CONFIG_DEBUG_FS isn't defined then amdgpu_dm_crtc_set_crc_source is NULL. This causes a compilation error since it's being called unconditionally.

[How]
Guard the call based on CONFIG_DEBUG_FS - CRC capture isn't supported without this.

Cc Leo Li <[email protected]>
Cc Harry Wentland <[email protected]>
Fixes 43a6a02eb355 ("drm/amd/display: Re-enable CRC capture following modeset")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
index a2453900e15a..cacb8fe5a1ad 100644
@@ -5284,9 +5284,11 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 
 		manage_dm_interrupts(adev, acrtc, true);
 
+#ifdef CONFIG_DEBUG_FS
 		/* The stream has changed so CRC capture needs to re-enabled. */
 		if (dm_new_crtc_state->crc_enabled)
 			amdgpu_dm_crtc_set_crc_source(crtc, "auto");
+#endif
 	}
 
 	/* update planes when needed per crtc*/
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20190204143207.6292-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org

Reviewed-by Harry Wentland
#2 lore raw
Quoted 5 lines · Nicholas Kazlauskas

[Why]
When CONFIG_DEBUG_FS isn't defined then amdgpu_dm_crtc_set_crc_source is NULL. This causes a compilation error since it's being called unconditionally.

Quoted 8 lines

[How]
Guard the call based on CONFIG_DEBUG_FS - CRC capture isn't supported without this.

Cc Leo Li <[email protected]>
Cc Harry Wentland <[email protected]>
Fixes 43a6a02eb355 ("drm/amd/display: Re-enable CRC capture following modeset")

Harry

Quoted 11 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index a2453900e15a..cacb8fe5a1ad 100644
@@ -5284,9 +5284,11 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) · line 5294

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
 		manage_dm_interrupts(adev, acrtc, true);
 
+#ifdef CONFIG_DEBUG_FS
 		/* The stream has changed so CRC capture needs to re-enabled. */
 		if (dm_new_crtc_state->crc_enabled)
 			amdgpu_dm_crtc_set_crc_source(crtc, "auto");
+#endif
 	}
 
 	/* update planes when needed per crtc*/

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx