Commit bc373a89 authored by Roman Li's avatar Roman Li Committed by Alex Deucher

drm/amd/display: Fix null-derefs on non-dcn builds

Fixing regression introduced by
'Use real BE and FE index to program regs.'
Signed-off-by: default avatarRoman Li <Roman.Li@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f8e413bf
...@@ -1407,6 +1407,7 @@ static int acquire_first_free_pipe( ...@@ -1407,6 +1407,7 @@ static int acquire_first_free_pipe(
pipe_ctx->plane_res.xfm = pool->transforms[i]; pipe_ctx->plane_res.xfm = pool->transforms[i];
pipe_ctx->plane_res.dpp = pool->dpps[i]; pipe_ctx->plane_res.dpp = pool->dpps[i];
pipe_ctx->stream_res.opp = pool->opps[i]; pipe_ctx->stream_res.opp = pool->opps[i];
if (pool->dpps[i])
pipe_ctx->plane_res.mpcc_inst = pool->dpps[i]->inst; pipe_ctx->plane_res.mpcc_inst = pool->dpps[i]->inst;
pipe_ctx->pipe_idx = i; pipe_ctx->pipe_idx = i;
......
...@@ -2819,7 +2819,8 @@ static void dce110_apply_ctx_for_surface( ...@@ -2819,7 +2819,8 @@ static void dce110_apply_ctx_for_surface(
static void dce110_power_down_fe(struct dc *dc, struct pipe_ctx *pipe_ctx) static void dce110_power_down_fe(struct dc *dc, struct pipe_ctx *pipe_ctx)
{ {
int fe_idx = pipe_ctx->plane_res.mi->inst; int fe_idx = pipe_ctx->plane_res.mi ?
pipe_ctx->plane_res.mi->inst : pipe_ctx->pipe_idx;
/* Do not power down fe when stream is active on dce*/ /* Do not power down fe when stream is active on dce*/
if (dc->current_state->res_ctx.pipe_ctx[fe_idx].stream) if (dc->current_state->res_ctx.pipe_ctx[fe_idx].stream)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment