diff options
author | Ashley Thomas <Ashley.Thomas2@amd.com> | 2020-10-13 07:33:27 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-11-02 23:30:47 +0300 |
commit | 7dd4f4df99109b280cd996602d7533cc0b2e7348 (patch) | |
tree | 1fe522fdc441e2f4e86faec6414d796b10e7c00b /drivers/gpu/drm/amd/display/dc/inc | |
parent | 81e8da715ca7d837802dee48625f380c9a1dbd11 (diff) | |
download | linux-7dd4f4df99109b280cd996602d7533cc0b2e7348.tar.xz |
drm/amd/display: fail instead of div by zero/bugcheck
[why]
If pbn_per_slot is 0, fail instead of dividing by zero and
bugchecking.
[how]
Check for zero divisor before division operation.
Signed-off-by: Ashley Thomas <Ashley.Thomas2@amd.com>
Reviewed-by: Wyatt Wood <Wyatt.Wood@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/core_status.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_status.h b/drivers/gpu/drm/amd/display/dc/inc/core_status.h index 714593a15590..d34b0b0eea65 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/core_status.h +++ b/drivers/gpu/drm/amd/display/dc/inc/core_status.h @@ -51,6 +51,7 @@ enum dc_status { DC_FAIL_CLK_BELOW_CFG_REQUIRED = 23, /*THIS IS hard_min in PPLIB*/ DC_NOT_SUPPORTED = 24, + DC_UNSUPPORTED_VALUE = 25, DC_ERROR_UNEXPECTED = -1 }; |