diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-04-13 17:32:18 +0900 |
---|---|---|
committer | Joonyoung Shim <jy0922.shim@samsung.com> | 2016-12-13 17:20:14 +0900 |
commit | 1f784f60b253bd9e73b04409c0c3009661ebdf15 (patch) | |
tree | a41169b5f4208ac3419a218c0b8d163345297c76 | |
parent | dbd0cec9ea6f9a55960d1e6b6bb3bf93cea95dcb (diff) | |
download | libdrm-accepted/tizen/mobile/20161226.131737.tar.gz libdrm-accepted/tizen/mobile/20161226.131737.tar.bz2 libdrm-accepted/tizen/mobile/20161226.131737.zip |
modetest: destroy the cursor bosubmit/tizen_unified/20170308.100414submit/tizen/20161226.062119accepted/tizen/wearable/20161226.131814accepted/tizen/tv/20161226.131752accepted/tizen/mobile/20161226.131737accepted/tizen/ivi/20161226.131833accepted/tizen/common/20161227.192228
Currently we are missing the bo_destroy() when modetest terminates.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Emil Velikov: Tweak the commit message.]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Change-Id: Id47f3a0c82965dc7b56fd37b6aa140b1332b8f56
-rw-r--r-- | tests/modetest/modetest.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 09b1f934..865f5bff 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -110,6 +110,7 @@ struct device { unsigned int fb_id; struct bo *bo; + struct bo *cursor_bo; } mode; }; @@ -1149,6 +1150,8 @@ static void set_cursors(struct device *dev, struct pipe_arg *pipes, unsigned int if (bo == NULL) return; + dev->mode.cursor_bo = bo; + for (i = 0; i < count; i++) { struct pipe_arg *pipe = &pipes[i]; ret = cursor_init(dev->fd, handles[0], @@ -1168,6 +1171,9 @@ static void set_cursors(struct device *dev, struct pipe_arg *pipes, unsigned int static void clear_cursors(struct device *dev) { cursor_stop(); + + if (dev->mode.cursor_bo) + bo_destroy(dev->mode.cursor_bo); } static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned int count) |