Skip to content

amdgpu: increase cpu_map_count storage size

Pierre-Eric Pelloux-Prayer requested to merge pepp/drm:fix_mesa_1423 into master

Mesa expects to be able to map the same buffer, without unmapping it. This leads to problem on long-running program.

On the other hand, libdrm uses cpu_map_count as a refcount and expects its value to decrease so it can unmap buffers.

The previoulsy proprosed fix (https://patchwork.freedesktop.org/patch/258005/) stopped increased the counter when it went past INT_MAX.

This commit instead proposes to use a larger type to store cpu_map_count. The outcome is the same: long running apps will not crash, only the implementation differs.

Closes: mesa#1423 (closed)

Merge request reports

Loading