mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
renderer/native: Reset all fields of MetaDumbBuffer
release_dumb_fb () checks 'map' to see if anything needs freeing. Other places are checking fb_id instead. The checks maybe redundant, but let's reset all fields here while at it, so that all the checks work as expected. https://gitlab.gnome.org/GNOME/mutter/merge_requests/810
This commit is contained in:
parent
40408150f0
commit
fe76e6a228
@ -2679,7 +2679,6 @@ release_dumb_fb (MetaDumbBuffer *dumb_fb,
|
||||
close (dumb_fb->dmabuf_fd);
|
||||
|
||||
munmap (dumb_fb->map, dumb_fb->map_size);
|
||||
dumb_fb->map = NULL;
|
||||
|
||||
kms_fd = meta_gpu_kms_get_fd (gpu_kms);
|
||||
|
||||
@ -2689,6 +2688,10 @@ release_dumb_fb (MetaDumbBuffer *dumb_fb,
|
||||
.handle = dumb_fb->handle
|
||||
};
|
||||
drmIoctl (kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_arg);
|
||||
|
||||
*dumb_fb = (MetaDumbBuffer) {
|
||||
.dmabuf_fd = -1,
|
||||
};
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user