]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amd/display: clean-up dead code in dml2_mall_phantom
authorBrahmajit Das <listout@listout.xyz>
Thu, 21 Aug 2025 12:01:33 +0000 (17:31 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Aug 2025 17:57:48 +0000 (13:57 -0400)
pipe_idx in funtion dml2_svp_validate_static_schedulabilit, although set
is never actually used. While building with GCC 16 this gives a warning:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_mall_phantom.c: In function ‘set_phantom_stream_timing’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_mall_phantom.c:657:25: warning: variable ‘pipe_idx’ set but not used [-Wunused-but-set-variable=]
  657 |         unsigned int i, pipe_idx;
      |                         ^~~~~~~~

Signed-off-by: Brahmajit Das <listout@listout.xyz>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c

index a56e75cdf712378054d653b759c815f7d6cf7b6f..c59f825cfae96558a22ba1409b825fe2bf52095e 100644 (file)
@@ -654,14 +654,14 @@ static void set_phantom_stream_timing(struct dml2_context *ctx, struct dc_state
                                     unsigned int svp_height,
                                     unsigned int svp_vstartup)
 {
-       unsigned int i, pipe_idx;
+       unsigned int i;
        double line_time, fp_and_sync_width_time;
        struct pipe_ctx *pipe;
        uint32_t phantom_vactive, phantom_bp, pstate_width_fw_delay_lines;
        static const double cvt_rb_vblank_max = ((double) 460 / (1000 * 1000));
 
        // Find DML pipe index (pipe_idx) using dc_pipe_idx
-       for (i = 0, pipe_idx = 0; i < ctx->config.dcn_pipe_count; i++) {
+       for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
                pipe = &state->res_ctx.pipe_ctx[i];
 
                if (!pipe->stream)
@@ -669,8 +669,6 @@ static void set_phantom_stream_timing(struct dml2_context *ctx, struct dc_state
 
                if (i == dc_pipe_idx)
                        break;
-
-               pipe_idx++;
        }
 
        // Calculate lines required for pstate allow width and FW processing delays