drm/amd/display: Fix conversions between bytes and KB
authorTaimur Hassan <syed.hassan@amd.com>
Fri, 10 Nov 2023 15:15:28 +0000 (10:15 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 21:49:01 +0000 (16:49 -0500)
commit22136ff27c4e01fae81f6588033363a46c72ed8c
tree36a1f971f4da89a636c4461d8451c90939201697
parentfbd2076c31e3281dea7b475d80211b7a6f1500da
drm/amd/display: Fix conversions between bytes and KB

[Why]
There are a number of instances where we convert HostVMMinPageSize or
GPUVMMinPageSize from bytes to KB by dividing (rather than multiplying) and
vice versa.
Additionally, in some cases, a parameter is passed through DML in KB but
later checked as if it were in bytes.

Cc: stable@vger.kernel.org
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Taimur Hassan <syed.hassan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c