drm/amd/display: Make sure line size is not zero in DCN2 line buffer size calculations
authorNikola Cornij <nikola.cornij@amd.com>
Mon, 15 Apr 2019 18:32:28 +0000 (14:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 22 Jun 2019 14:34:11 +0000 (09:34 -0500)
commitb01473e919fa4dd32df696ebfc899c8ba6e817a8
tree69ce44458e401dcfb24a9ecfc4df457c4809da0a
parent7fad39ca4a1cd721864a3b7da19b2489e73dbf42
drm/amd/display: Make sure line size is not zero in DCN2 line buffer size calculations

[why]
'Divide by zero' error happens when line size happens to be zero.

[how]
The code that makes sure line size minimum value can be 1 was already
present in DCN1 part of the driver, this is mearly a port to DCN2.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c