New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 862615 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

amdgpu: Dereferencing variable previously checked for NULL

Project Member Reported by groeck@chromium.org, Jul 11

Issue description

smatch says:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2566 dcn10_apply_ctx_for_surface() error: we previously assumed 'pipe_ctx->stream_res.tg' could be null (see line 2555) 

Looking into the code:

                if (pipe_ctx->stream_res.tg &&
                    ^^^^^^^^^^^^^^^^^^^^^^^
                        pipe_ctx->stream_res.tg->inst == be_idx &&
                        !pipe_ctx->top_pipe)
                        pipe_ctx->stream_res.tg->funcs->lock(pipe_ctx->stream_res.tg);

                /*
                 * Powergate reused pipes that are not powergated
                 * fairly hacky right now, using opp_id as indicator
                 */

                if (pipe_ctx->plane_state && !old_pipe_ctx->plane_state) {
                        if (pipe_ctx->plane_res.hubp->opp_id != 0xf && pipe_ctx->stream_res.tg->inst == be_idx) {
                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

smatch has a point.

 

Sign in to add a comment