panfrost: Copy resources when necessary
If the map doesn't set MAP_DISCARD_RANGE, we do have to copy the existing contents over. MAP_WRITE on its only gives permission to replace the contents, unfortunately it does not require that the application actually do so. Closes: #7640 Fixes: 0b26a9f7 ("panfrost: Don't copy resources if replaced") Signed-off-by:Alyssa Rosenzweig <alyssa@collabora.com> Reported-by: Roman Elshin Part-of: <mesa/mesa!19576>