diff options
author | Simon Ser <contact@emersion.fr> | 2021-09-27 15:08:44 +0000 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-09-28 14:40:19 -0400 |
commit | 98122e63a7ecc08c4172a17d97a06ef5536eb268 (patch) | |
tree | 87141f070648ed2b1b7dd258c8f389582e24b2a9 /drivers/spi/spi-altera-dfl.c | |
parent | d942856865c733ff60450de9691af796ad71d7bc (diff) |
drm/amdgpu: check tiling flags when creating FB on GFX8-
On GFX9+, format modifiers are always enabled and ensure the
frame-buffers can be scanned out at ADDFB2 time.
On GFX8-, format modifiers are not supported and no other check
is performed. This means ADDFB2 IOCTLs will succeed even if the
tiling isn't supported for scan-out, and will result in garbage
displayed on screen [1].
Fix this by adding a check for tiling flags for GFX8 and older.
The check is taken from radeonsi in Mesa (see how is_displayable
is populated in gfx6_compute_surface).
Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel)
[1]: https://github.com/swaywm/wlroots/issues/3185
Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/spi/spi-altera-dfl.c')
0 files changed, 0 insertions, 0 deletions