Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: add null check for invalid opps

[Why]
In cases where number of pipes available is less
than num_opp, there will opp instances that are
null

[How]
Add null check to skip over these opp instances

Fixes: 40de8403b998 ("drm/amd/display: Update OPP counter from new interface")
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Roman Li <roman.li@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Samson Tam and committed by
Alex Deucher
8d0f4cd2 f583db81

+2 -1
+2 -1
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 3575 3575 mpcc_inst = hubp->inst; 3576 3576 // MPCC inst is equal to pipe index in practice 3577 3577 for (opp_inst = 0; opp_inst < opp_count; opp_inst++) { 3578 - if (dc->res_pool->opps[opp_inst]->mpcc_disconnect_pending[mpcc_inst]) { 3578 + if ((dc->res_pool->opps[opp_inst] != NULL) && 3579 + (dc->res_pool->opps[opp_inst]->mpcc_disconnect_pending[mpcc_inst])) { 3579 3580 dc->res_pool->mpc->funcs->wait_for_idle(dc->res_pool->mpc, mpcc_inst); 3580 3581 dc->res_pool->opps[opp_inst]->mpcc_disconnect_pending[mpcc_inst] = false; 3581 3582 break;