drm/amd/display: Check UnboundedRequestEnabled's value
BugLink: https://bugs.launchpad.net/bugs/2085849 [ Upstream commit a7b38c7852093385d0605aa3c8a2efd6edd1edfd ] CalculateSwathAndDETConfiguration_params_st's UnboundedRequestEnabled is a pointer (i.e. dml_bool_t *UnboundedRequestEnabled), and thus if (p->UnboundedRequestEnabled) checks its address, not bool value. This fixes 1 REVERSE_INULL issue reported by Coverity. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org> CVE-2024-46778 Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
6ca0ad2161
commit
21aa536357
@@ -4282,7 +4282,7 @@ static void CalculateSwathAndDETConfiguration(struct display_mode_lib_scratch_st
|
||||
}
|
||||
|
||||
*p->compbuf_reserved_space_64b = 2 * p->PixelChunkSizeInKByte * 1024 / 64;
|
||||
if (p->UnboundedRequestEnabled) {
|
||||
if (*p->UnboundedRequestEnabled) {
|
||||
*p->compbuf_reserved_space_64b = dml_max(*p->compbuf_reserved_space_64b,
|
||||
(dml_float_t)(p->ROBBufferSizeInKByte * 1024/64)
|
||||
- (dml_float_t)(RoundedUpSwathSizeBytesY[SurfaceDoingUnboundedRequest] * TTUFIFODEPTH / MAXIMUMCOMPRESSION/64));
|
||||
|
||||
Reference in New Issue
Block a user