Mesa 20 Will Have SDMA Disabled On AMD RX-Series GPUs

From LinuxReviews
Jump to navigationJump to search
Amdlogo.png

A few bug reports describing corruption on a few OpenGL games on RX 580 GPUs has prompted AMD developers to disable SDMA in the RadeonSI Mesa OpenGL driver on GFX8-series graphics cards. The result will be a 0 to 4% reduction in OpenGL performance in the upcoming Mesa 20 release.

written by Öyvind Sæther. published 2020-01-08last edited 2020-02-13

AMD HD7850 GPU.20200108.jpg
Older GFX8 series AMD graphics cards (not this GFX6 series HD7850) may have reduced performance in the next Mesa release.

The GFX8 family graphics cards, also known as "Volcanic Islands", includes AMD graphics cards spanning from older Radeon 200 series cards (R9 285 onwards) up to and including the RX 580.

The patch by AMD developer Marek Olšák titled "radeonsi: disable SDMA on gfx8 to fix corruption on RX 580" disables SDMA in the RadeonSI OpenGL driver on all the GFX8 series cards, not just the RX580. si_pipe.c master currently has this code disabling SDMA on GFX8 and GFX10 series GPUs:

if (sscreen->info.num_rings[RING_DMA] &&
    !(sscreen->debug_flags & DBG(NO_SDMA)) &&
    /* SDMA causes corruption on RX 580:
     *    https://gitlab.freedesktop.org/mesa/mesa/issues/1399
     *    https://gitlab.freedesktop.org/mesa/mesa/issues/1889
     */
    (sctx->chip_class != GFX8 || sscreen->debug_flags & DBG(FORCE_SDMA)) &&
    /* SDMA timeouts sometimes on gfx10 so disable it for now. See:
     *    https://bugs.freedesktop.org/show_bug.cgi?id=111481
     *    https://gitlab.freedesktop.org/mesa/mesa/issues/1907
     */
    (sctx->chip_class != GFX10 || sscreen->debug_flags & DBG(FORCE_SDMA))) {
    sctx->sdma_cs = sctx->ws->cs_create(sctx->ctx, RING_DMA,
			   (void*)si_flush_dma_cs,
			   sctx, stop_exec_on_failure);
}

SDMA was already disabled on GFX10/"Navi" graphics cards in order to avoid total system freezes when playing certain games.

The patch does not affect Vulkan performance at all. AMD graphics cards use a Mesa backend called RadeonSI for OpenGL and a completely different backend called RADV for Vulkan.

Disabling SDMA to avoid artifacts and corruption at the price of 0-4% performance on an entire generation graphics cards seems like a drastic measure. How close to 0 or 4% that reduction is will depend on the graphics card and the game/application. It is understandable that they go this route until/unless they can solve the actual underlying problem(s) which cause the corruption, just like it is understandable that they disabled it on Navi cards after numerous users reported complete system freezes.

Disabling SDMA on GFX8 graphics cards may not cause any performance reduction in some games. Some games perform better when SDMA is turned off.

SDMA is designed for paging memory and other tasks related to GPU memory management. SDMA can be used for asynchronous memory transfers between system memory and GPU memory. Those could be faster but regular memory transfers but there is a slight problem with SDMA: It is not cache coherent which means that it has its own synchronization overhead. This is why some workloads run faster when SDMA is disabled.

It is already possible to disable SDMA on AMD graphics cards by setting the environment variable AMD_DEBUG=nodma prior to launching OpenGL games and applications. Those who experience corruption when playing OpenGL games on older AMD GPUs can use that as a work-around until Mesa 20 is released late this month (or early next month).

Kemonomimi rabbit.svg
Update: mesa 19.3.2, released January 9th, 2019, includes the "disable SDMA on gfx8 to fix corruption on RX 580" patch.



Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.