drv: Add new bo_release driver callback.

The current bo_destroy callback only gets called if the bo has the
last references to the GEM BOs, and otherwise plain free gets
called.

However, this is an issue if bo->priv contains something per bo that
needs to be cleaned up. To solve this we introduce a new callback
to clean up things per bo instance.

BUG=b:185869479
TEST=none for this patch. See follow-on patch making use of this.

Change-Id: I9d48b3b5a70264adbc4de55a5c7b18e1a2209553
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3270683
Tested-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Bas Nieuwenhuizen <basni@chromium.org>
(cherry picked from commit 631d9e4d653567eba0dfc846ec849be5e490f574)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3308940
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
Reviewed-by: Bas Nieuwenhuizen <basni@chromium.org>
Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org>
2 files changed