]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/amd/display: check cursor FB is linear
authorSimon Ser <contact@emersion.fr>
Thu, 3 Dec 2020 20:19:41 +0000 (20:19 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Dec 2020 04:02:16 +0000 (23:02 -0500)
commite72868c4eacf435d9c6cdf47359a058c38223e46
tree586ad7e0f6de02e0c1e171a88be245b962e8afe5
parentb0455fda6dd4e8d31f4ffa198a7ae77b831ac8e7
drm/amd/display: check cursor FB is linear

Previously we accepted non-linear buffers for the cursor plane. This
results in bad output, DC validation failures and oops.

Make sure the FB uses a linear layout in the atomic check function.

The GFX8- check is inspired from ac_surface_set_bo_metadata in Mesa.
The GFX9+ check comes from convert_tiling_flags_to_modifier.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/drm/amd/-/issues/1390
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c