mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/amd/display: Fix crash in hwss_set_output_transfer_func()
The pipe_ctx->plane_res.hubp pointer is NULL on all DCE
hardware, which causes a kernel NULL pointer dereference
on all Vega and older GPUs.
Let's add a simple NULL check.
Fixes: 6bfca93847 ("drm/amd/display: Refactor DPP_SET_OUTPUT_TRANSFER_FUNC to drop pipe_ctx")
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: Tomasz Siemek <tomasz.siemek@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9d07a6ea18
commit
6411a35690
|
|
@ -2312,7 +2312,8 @@ void hwss_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx)
|
|||
.xfm = pipe_ctx->plane_res.xfm,
|
||||
.dpp = pipe_ctx->plane_res.dpp,
|
||||
.mpc = dc->res_pool->mpc,
|
||||
.mpcc_id = pipe_ctx->plane_res.hubp->inst,
|
||||
.mpcc_id = pipe_ctx->plane_res.hubp ?
|
||||
pipe_ctx->plane_res.hubp->inst : 0,
|
||||
.is_top_pipe = resource_is_pipe_type(pipe_ctx, OPP_HEAD),
|
||||
.stream = pipe_ctx->stream,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user