drm/amd/display: Add NULL check
[Why] Virtualization enters blue screen of death (BSoD) due to NULL res_pool object when accessing DSC encoder capability. [How] Add NULL check to avoid blue screen of death. Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Alan Liu <HaoPing.Liu@amd.com> Signed-off-by: Chris Park <Chris.Park@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9c1e260e97
commit
84ce38c7bf
1 changed files with 3 additions and 0 deletions
|
|
@ -2335,6 +2335,9 @@ void dc_resource_state_construct(
|
|||
|
||||
bool dc_resource_is_dsc_encoding_supported(const struct dc *dc)
|
||||
{
|
||||
if (dc->res_pool == NULL)
|
||||
return false;
|
||||
|
||||
return dc->res_pool->res_cap->num_dsc > 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue