summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2015-04-13 17:32:18 +0900
committerAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2015-04-28 21:48:01 +0300
commit42a88fc486d736f46db0a47b30811ba75bf9f0b9 (patch)
treeac763809d3c52b87daa1a67cd7dd896bf8acce6d
parent7b543fcc95e5572511e76fbca654197005cee841 (diff)
modetest: destroy the cursor bo
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>
-rw-r--r--tests/modetest/modetest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 07ffd44e..7f0c1cc1 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -111,6 +111,7 @@ struct device {
unsigned int fb_id;
struct bo *bo;
+ struct bo *cursor_bo;
} mode;
};
@@ -1174,6 +1175,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],
@@ -1193,6 +1196,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)