mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 21:38:04 +02:00
backend-drm: Clear out the the fb handles
This is purely cosmetic but we do this in other parts as well, when releasing the GEM handles. Use the macro for no of planes as well when going over them. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
3d5772fb06
commit
94dd926b99
1 changed files with 3 additions and 2 deletions
|
|
@ -384,9 +384,10 @@ drm_fb_destroy_dmabuf(struct drm_fb *fb)
|
|||
* If we imported the dmabuf into a scanout device, we are responsible
|
||||
* for closing the GEM handle.
|
||||
*/
|
||||
for (i = 0; i < 4; i++)
|
||||
if (fb->scanout_device && fb->handles[i] != 0)
|
||||
for (i = 0; i < MAX_DMABUF_PLANES; i++) {
|
||||
if (fb->scanout_device && fb->handles[i] != 0) {
|
||||
gem_handle_put(fb->scanout_device, fb->handles[i]);
|
||||
fb->handles[i] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue