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

Submitted by Kazlauskas, Nicholas on Feb. 4, 2019, 2:32 p.m.

Details

Message ID 20190204143207.6292-1-nicholas.kazlauskas@amd.com
State Accepted
Commit cc7e422d3db338bf00ac73b4575668d149a25a34
Headers show
Series "drm/amd/display: Don't re-enable CRC when CONFIG_DEBUG_FS isn't defined" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Kazlauskas, Nicholas Feb. 4, 2019, 2:32 p.m.
[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 <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Fixes: 43a6a02eb355 ("drm/amd/display: Re-enable CRC capture following modeset")
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a2453900e15a..cacb8fe5a1ad 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -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*/

Comments

On 2019-02-04 9:32 a.m., Nicholas Kazlauskas wrote:
> [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 <sunpeng.li@amd.com>

> Cc: Harry Wentland <harry.wentland@amd.com>

> Fixes: 43a6a02eb355 ("drm/amd/display: Re-enable CRC capture following modeset")

> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>


Reviewed-by: Harry Wentland <harry.wentland@amd.com>


Harry

> ---

>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

> index a2453900e15a..cacb8fe5a1ad 100644

> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

> @@ -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*/

>