Skip to contentSkip to conversation

drm/amdgpu/display: guard ttu_regs with CONFIG_DRM_AMD_DC_DCN

PATCH In review Alex Deucher 3 participants 3 messages Mar 31, 2021 – Apr 1, 2021

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu/display: guard ttu_regs with CONFIG_DRM_AMD_DC_DCN

Missing check for CONFIG_DRM_AMD_DC_DCN.

Fixes 752106f5c5cd ("drm/amd/display: Set max TTU on DPG enable")
Cc Wesley Chalmers <[email protected]>
Cc Stephen Rothwell <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
index d9ab134a178f..a270879cbaba 100644
@@ -2599,6 +2599,7 @@ static void commit_planes_for_stream(struct dc *dc,
 		}
 	}
 
+#ifdef CONFIG_DRM_AMD_DC_DCN
 	if (stream->test_pattern.type != DP_TEST_PATTERN_VIDEO_MODE) {
 		struct pipe_ctx *mpcc_pipe;
 		struct pipe_ctx *odm_pipe;
@@ -2607,7 +2608,7 @@ static void commit_planes_for_stream(struct dc *dc,
 			for (odm_pipe = mpcc_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
 				odm_pipe->ttu_regs.min_ttu_vblank = MAX_TTU;
 	}
-
+#endif
 
 	if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed)
 		if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
Signature · 6 lines
2.30.2

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

Ping?

Quoted 35 lines · Alex Deucher

Missing check for CONFIG_DRM_AMD_DC_DCN.

Fixes 752106f5c5cd ("drm/amd/display: Set max TTU on DPG enable")
Cc Wesley Chalmers <[email protected]>
Cc Stephen Rothwell <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
index d9ab134a178f..a270879cbaba 100644
@@ -2599,6 +2599,7 @@ static void commit_planes_for_stream(struct dc *dc,
                }
        }
 
+#ifdef CONFIG_DRM_AMD_DC_DCN
        if (stream->test_pattern.type != DP_TEST_PATTERN_VIDEO_MODE) {
                struct pipe_ctx *mpcc_pipe;
                struct pipe_ctx *odm_pipe;
@@ -2607,7 +2608,7 @@ static void commit_planes_for_stream(struct dc *dc,
                        for (odm_pipe = mpcc_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
                                odm_pipe->ttu_regs.min_ttu_vblank = MAX_TTU;
        }
-
+#endif
 
        if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed)
                if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
--

2.30.2

Quoted 4 lines

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

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

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Alex Deucher
Quoted 6 lines · Alex Deucher

Missing check for CONFIG_DRM_AMD_DC_DCN.

Fixes 752106f5c5cd ("drm/amd/display: Set max TTU on DPG enable")
Cc Wesley Chalmers <[email protected]>
Cc Stephen Rothwell <[email protected]>

Harry

Quoted 18 lines
---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
index d9ab134a178f..a270879cbaba 100644
@@ -2599,6 +2599,7 @@ static void commit_planes_for_stream(struct dc *dc,
  		}
  	}
 
+#ifdef CONFIG_DRM_AMD_DC_DCN
  	if (stream->test_pattern.type != DP_TEST_PATTERN_VIDEO_MODE) {
  		struct pipe_ctx *mpcc_pipe;
  		struct pipe_ctx *odm_pipe;

drivers/gpu/drm/amd/display/dc/core/dc.c static void commit_planes_for_stream(struct dc *dc, · line 2614

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -2607,7 +2608,7 @@ static void commit_planes_for_stream(struct dc *dc,
  			for (odm_pipe = mpcc_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
  				odm_pipe->ttu_regs.min_ttu_vblank = MAX_TTU;
  	}
-
+#endif
 
  	if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed)
  		if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {

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