aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4013-drm-amd-display-Remove-set-but-not-used-variables-pp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4013-drm-amd-display-Remove-set-but-not-used-variables-pp.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4013-drm-amd-display-Remove-set-but-not-used-variables-pp.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4013-drm-amd-display-Remove-set-but-not-used-variables-pp.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4013-drm-amd-display-Remove-set-but-not-used-variables-pp.patch
new file mode 100644
index 00000000..1c658472
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4013-drm-amd-display-Remove-set-but-not-used-variables-pp.patch
@@ -0,0 +1,90 @@
+From 2ad9e7aee166febfa02889c1501714a1b9ffc0b9 Mon Sep 17 00:00:00 2001
+From: zhengbin <zhengbin13@huawei.com>
+Date: Sat, 5 Oct 2019 10:44:36 +0800
+Subject: [PATCH 4013/4256] drm/amd/display: Remove set but not used variables
+ 'pp_smu', 'old_pipe'
+
+Fixes gcc '-Wunused-but-set-variable' warning:
+
+drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function dce110_enable_audio_stream:
+drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:949:23: warning: variable pp_smu set but not used [-Wunused-but-set-variable]
+drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function dce110_disable_audio_stream:
+drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:983:23: warning: variable pp_smu set but not used [-Wunused-but-set-variable]
+drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function dce110_program_front_end_for_pipe:
+drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:2429:19: warning: variable old_pipe set but not used [-Wunused-but-set-variable]
+
+'pp_smu' is not used since commit 170a2398d2d8 ("drm/amd/display:
+make clk_mgr call enable_pme_wa")
+
+'old_pipe' is not used since commit 65d38262b3e8 ("drm/amd/display:
+fbc state could not reach while enable fbc")
+
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: zhengbin <zhengbin13@huawei.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+index c273490ddcab..e11509506376 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+@@ -941,7 +941,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
+ {
+ /* notify audio driver for audio modes of monitor */
+ struct dc *core_dc;
+- struct pp_smu_funcs *pp_smu = NULL;
+ struct clk_mgr *clk_mgr;
+ unsigned int i, num_audio = 1;
+
+@@ -954,9 +953,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
+ if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled == true)
+ return;
+
+- if (core_dc->res_pool->pp_smu)
+- pp_smu = core_dc->res_pool->pp_smu;
+-
+ if (pipe_ctx->stream_res.audio) {
+ for (i = 0; i < MAX_PIPES; i++) {
+ /*current_state not updated yet*/
+@@ -981,7 +977,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
+ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
+ {
+ struct dc *dc;
+- struct pp_smu_funcs *pp_smu = NULL;
+ struct clk_mgr *clk_mgr;
+
+ if (!pipe_ctx || !pipe_ctx->stream)
+@@ -998,9 +993,6 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
+ if (pipe_ctx->stream_res.audio) {
+ pipe_ctx->stream_res.audio->enabled = false;
+
+- if (dc->res_pool->pp_smu)
+- pp_smu = dc->res_pool->pp_smu;
+-
+ if (dc_is_dp_signal(pipe_ctx->stream->signal))
+ pipe_ctx->stream_res.stream_enc->funcs->dp_audio_disable(
+ pipe_ctx->stream_res.stream_enc);
+@@ -2461,7 +2453,6 @@ static void dce110_program_front_end_for_pipe(
+ struct dc *dc, struct pipe_ctx *pipe_ctx)
+ {
+ struct mem_input *mi = pipe_ctx->plane_res.mi;
+- struct pipe_ctx *old_pipe = NULL;
+ struct dc_plane_state *plane_state = pipe_ctx->plane_state;
+ struct xfm_grph_csc_adjustment adjust;
+ struct out_csc_color_matrix tbl_entry;
+@@ -2469,9 +2460,6 @@ static void dce110_program_front_end_for_pipe(
+ DC_LOGGER_INIT();
+ memset(&tbl_entry, 0, sizeof(tbl_entry));
+
+- if (dc->current_state)
+- old_pipe = &dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx];
+-
+ memset(&adjust, 0, sizeof(adjust));
+ adjust.gamut_adjust_type = GRAPHICS_GAMUT_ADJUST_TYPE_BYPASS;
+
+--
+2.17.1
+