aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display
diff options
context:
space:
mode:
authorTony Cheng <tony.cheng@amd.com>2017-02-28 22:52:29 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 17:17:56 -0400
commit773d1bcae744379a03f525bfc9249d8abf0550a8 (patch)
treec3778b17030dd169bab1697009e05b02005b4b1f /drivers/gpu/drm/amd/display
parentd98e5cc2ddacb34e9cdf1c06dce2758198af0120 (diff)
drm/amd/display: remove independent lock as we have no use case today
Signed-off-by: Tony Cheng <tony.cheng@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c8
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c19
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h1
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h8
4 files changed, 5 insertions, 31 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 8f871924beb9..c34232c8c322 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1178,7 +1178,6 @@ void dc_update_surfaces_for_stream(struct dc *dc,
1178 1178
1179 enum surface_update_type update_type; 1179 enum surface_update_type update_type;
1180 const struct dc_stream_status *stream_status; 1180 const struct dc_stream_status *stream_status;
1181 unsigned int lock_mask = 0;
1182 1181
1183 stream_status = dc_stream_get_status(dc_stream); 1182 stream_status = dc_stream_get_status(dc_stream);
1184 ASSERT(stream_status); 1183 ASSERT(stream_status);
@@ -1332,15 +1331,9 @@ void dc_update_surfaces_for_stream(struct dc *dc,
1332 } 1331 }
1333 1332
1334 if (!pipe_ctx->tg->funcs->is_blanked(pipe_ctx->tg)) { 1333 if (!pipe_ctx->tg->funcs->is_blanked(pipe_ctx->tg)) {
1335 lock_mask = PIPE_LOCK_CONTROL_GRAPHICS |
1336 PIPE_LOCK_CONTROL_SCL |
1337 PIPE_LOCK_CONTROL_BLENDER |
1338 PIPE_LOCK_CONTROL_MODE;
1339
1340 core_dc->hwss.pipe_control_lock( 1334 core_dc->hwss.pipe_control_lock(
1341 core_dc, 1335 core_dc,
1342 pipe_ctx, 1336 pipe_ctx,
1343 lock_mask,
1344 true); 1337 true);
1345 } 1338 }
1346 1339
@@ -1382,7 +1375,6 @@ void dc_update_surfaces_for_stream(struct dc *dc,
1382 core_dc->hwss.pipe_control_lock( 1375 core_dc->hwss.pipe_control_lock(
1383 core_dc, 1376 core_dc,
1384 pipe_ctx, 1377 pipe_ctx,
1385 lock_mask,
1386 false); 1378 false);
1387 } 1379 }
1388 break; 1380 break;
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c b/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c
index 89a8274e12ea..17cdd70a2c27 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c
@@ -46,7 +46,6 @@ void dce_enable_fe_clock(struct dce_hwseq *hws,
46 46
47void dce_pipe_control_lock(struct core_dc *dc, 47void dce_pipe_control_lock(struct core_dc *dc,
48 struct pipe_ctx *pipe, 48 struct pipe_ctx *pipe,
49 enum pipe_lock_control control_mask,
50 bool lock) 49 bool lock)
51{ 50{
52 uint32_t lock_val = lock ? 1 : 0; 51 uint32_t lock_val = lock ? 1 : 0;
@@ -59,18 +58,10 @@ void dce_pipe_control_lock(struct core_dc *dc,
59 BLND_BLND_V_UPDATE_LOCK, &blnd, 58 BLND_BLND_V_UPDATE_LOCK, &blnd,
60 BLND_V_UPDATE_LOCK_MODE, &update_lock_mode); 59 BLND_V_UPDATE_LOCK_MODE, &update_lock_mode);
61 60
62 if (control_mask & PIPE_LOCK_CONTROL_GRAPHICS) 61 dcp_grph = lock_val;
63 dcp_grph = lock_val; 62 scl = lock_val;
64 63 blnd = lock_val;
65 if (control_mask & PIPE_LOCK_CONTROL_SCL) 64 update_lock_mode = lock_val;
66 scl = lock_val;
67
68 if (control_mask & PIPE_LOCK_CONTROL_BLENDER)
69 blnd = lock_val;
70
71 if (control_mask & PIPE_LOCK_CONTROL_MODE)
72 update_lock_mode = lock_val;
73
74 65
75 REG_SET_2(BLND_V_UPDATE_LOCK[pipe->pipe_idx], val, 66 REG_SET_2(BLND_V_UPDATE_LOCK[pipe->pipe_idx], val,
76 BLND_DCP_GRPH_V_UPDATE_LOCK, dcp_grph, 67 BLND_DCP_GRPH_V_UPDATE_LOCK, dcp_grph,
@@ -82,7 +73,7 @@ void dce_pipe_control_lock(struct core_dc *dc,
82 BLND_V_UPDATE_LOCK_MODE, update_lock_mode); 73 BLND_V_UPDATE_LOCK_MODE, update_lock_mode);
83 74
84 if (hws->wa.blnd_crtc_trigger) { 75 if (hws->wa.blnd_crtc_trigger) {
85 if (!lock && (control_mask & PIPE_LOCK_CONTROL_BLENDER)) { 76 if (!lock) {
86 uint32_t value = REG_READ(CRTC_H_BLANK_START_END[pipe->pipe_idx]); 77 uint32_t value = REG_READ(CRTC_H_BLANK_START_END[pipe->pipe_idx]);
87 REG_WRITE(CRTC_H_BLANK_START_END[pipe->pipe_idx], value); 78 REG_WRITE(CRTC_H_BLANK_START_END[pipe->pipe_idx], value);
88 } 79 }
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h b/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h
index 9ef618443255..70e0652be071 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h
@@ -224,7 +224,6 @@ void dce_enable_fe_clock(struct dce_hwseq *hwss,
224 224
225void dce_pipe_control_lock(struct core_dc *dc, 225void dce_pipe_control_lock(struct core_dc *dc,
226 struct pipe_ctx *pipe, 226 struct pipe_ctx *pipe,
227 enum pipe_lock_control control_mask,
228 bool lock); 227 bool lock);
229 228
230void dce_set_blender_mode(struct dce_hwseq *hws, 229void dce_set_blender_mode(struct dce_hwseq *hws,
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h
index 612910e720af..98a04cd46178 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h
@@ -34,13 +34,6 @@ enum pipe_gating_control {
34 PIPE_GATING_CONTROL_INIT 34 PIPE_GATING_CONTROL_INIT
35}; 35};
36 36
37enum pipe_lock_control {
38 PIPE_LOCK_CONTROL_GRAPHICS = 1 << 0,
39 PIPE_LOCK_CONTROL_BLENDER = 1 << 1,
40 PIPE_LOCK_CONTROL_SCL = 1 << 2,
41 PIPE_LOCK_CONTROL_MODE = 1 << 3,
42};
43
44struct dce_hwseq_wa { 37struct dce_hwseq_wa {
45 bool blnd_crtc_trigger; 38 bool blnd_crtc_trigger;
46}; 39};
@@ -128,7 +121,6 @@ struct hw_sequencer_funcs {
128 void (*pipe_control_lock)( 121 void (*pipe_control_lock)(
129 struct core_dc *dc, 122 struct core_dc *dc,
130 struct pipe_ctx *pipe, 123 struct pipe_ctx *pipe,
131 enum pipe_lock_control control_mask,
132 bool lock); 124 bool lock);
133 125
134 void (*set_displaymarks)( 126 void (*set_displaymarks)(