summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClay King <clayking@amd.com>2026-02-20 19:25:47 +0300
committerAlex Deucher <alexander.deucher@amd.com>2026-03-03 00:39:07 +0300
commitb91cfeb6f2ddf720a06506a1d1e5d9e76d3bd129 (patch)
treebedc1769cbd5d017b4e26fa18f4ec51fd0a05ee8
parentaef8c3253e9d2f476765b76c3d0c6031b2a5b042 (diff)
downloadlinux-b91cfeb6f2ddf720a06506a1d1e5d9e76d3bd129.tar.xz
drm/amd/display: Silence unused variable warning
[WHY & HOW] Remove unused dpp_pipe_count variable. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Signed-off-by: Clay King <clayking@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
index 4cfe64aa8492..74812a7d5e28 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
@@ -909,10 +909,10 @@ static unsigned int get_source_mpc_factor(const struct dml2_context *ctx,
const struct dc_plane_state *plane)
{
struct pipe_ctx *dpp_pipes[MAX_PIPES] = {0};
- int dpp_pipe_count = ctx->config.callbacks.get_dpp_pipes_for_plane(plane,
- &state->res_ctx, dpp_pipes);
- ASSERT(dpp_pipe_count > 0);
+ if (ctx->config.callbacks.get_dpp_pipes_for_plane(plane, &state->res_ctx, dpp_pipes) <= 0)
+ ASSERT(false);
+
return ctx->config.callbacks.get_mpc_slice_count(dpp_pipes[0]);
}