aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Jakobi2015-06-12 13:15:11 -0500
committerEmil Velikov2015-06-29 13:19:23 -0500
commit28d896c763e0cc2ab8f9679ee75b756bdd587da7 (patch)
tree4b6ef952b0594dff46d07584281a0e45d231ccea /tests/exynos/exynos_fimg2d_test.c
parent3aeea6198d3c62bab2ce98450f47ff91e402784b (diff)
downloadexternal-libgbm-28d896c763e0cc2ab8f9679ee75b756bdd587da7.tar.gz
external-libgbm-28d896c763e0cc2ab8f9679ee75b756bdd587da7.tar.xz
external-libgbm-28d896c763e0cc2ab8f9679ee75b756bdd587da7.zip
tests/exynos: remove struct fimg2d_test_case
It doesn't make sense to keep this structure, since we can just call all tests directly. An inspection of the git history shows that no code ever used this abstraction in the past. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'tests/exynos/exynos_fimg2d_test.c')
-rw-r--r--tests/exynos/exynos_fimg2d_test.c42
1 files changed, 5 insertions, 37 deletions
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index 080d1786..de6a2b78 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -37,30 +37,6 @@
37 37
38static unsigned int screen_width, screen_height; 38static unsigned int screen_width, screen_height;
39 39
40/*
41 * A structure to test fimg2d hw.
42 *
43 * @solid_fill: fill given color data to source buffer.
44 * @copy: copy source to destination buffer.
45 * @copy_with_scale: copy source to destination buffer scaling up or
46 * down properly.
47 * @blend: blend source to destination buffer.
48 */
49struct fimg2d_test_case {
50 int (*solid_fill)(struct exynos_device *dev, struct exynos_bo *dst);
51 int (*copy)(struct exynos_device *dev, struct exynos_bo *src,
52 struct exynos_bo *dst, enum e_g2d_buf_type);
53 int (*copy_with_scale)(struct exynos_device *dev,
54 struct exynos_bo *src, struct exynos_bo *dst,
55 enum e_g2d_buf_type);
56 int (*blend)(struct exynos_device *dev,
57 struct exynos_bo *src, struct exynos_bo *dst,
58 enum e_g2d_buf_type);
59 int (*checkerboard)(struct exynos_device *dev,
60 struct exynos_bo *src, struct exynos_bo *dst,
61 enum e_g2d_buf_type);
62};
63
64struct connector { 40struct connector {
65 uint32_t id; 41 uint32_t id;
66 char mode_str[64]; 42 char mode_str[64];
@@ -630,14 +606,6 @@ fail:
630 return ret; 606 return ret;
631} 607}
632 608
633static struct fimg2d_test_case test_case = {
634 .solid_fill = &g2d_solid_fill_test,
635 .copy = &g2d_copy_test,
636 .copy_with_scale = &g2d_copy_with_scale_test,
637 .blend = &g2d_blend_test,
638 .checkerboard = &g2d_checkerboard_test,
639};
640
641static void usage(char *name) 609static void usage(char *name)
642{ 610{
643 fprintf(stderr, "usage: %s [-s]\n", name); 611 fprintf(stderr, "usage: %s [-s]\n", name);
@@ -747,7 +715,7 @@ int main(int argc, char **argv)
747 if (ret < 0) 715 if (ret < 0)
748 goto err_rm_fb; 716 goto err_rm_fb;
749 717
750 ret = test_case.solid_fill(dev, bo); 718 ret = g2d_solid_fill_test(dev, bo);
751 if (ret < 0) { 719 if (ret < 0) {
752 fprintf(stderr, "failed to solid fill operation.\n"); 720 fprintf(stderr, "failed to solid fill operation.\n");
753 goto err_rm_fb; 721 goto err_rm_fb;
@@ -761,7 +729,7 @@ int main(int argc, char **argv)
761 goto err_rm_fb; 729 goto err_rm_fb;
762 } 730 }
763 731
764 ret = test_case.copy(dev, src, bo, G2D_IMGBUF_GEM); 732 ret = g2d_copy_test(dev, src, bo, G2D_IMGBUF_GEM);
765 if (ret < 0) { 733 if (ret < 0) {
766 fprintf(stderr, "failed to test copy operation.\n"); 734 fprintf(stderr, "failed to test copy operation.\n");
767 goto err_free_src; 735 goto err_free_src;
@@ -769,7 +737,7 @@ int main(int argc, char **argv)
769 737
770 wait_for_user_input(0); 738 wait_for_user_input(0);
771 739
772 ret = test_case.copy_with_scale(dev, src, bo, G2D_IMGBUF_GEM); 740 ret = g2d_copy_with_scale_test(dev, src, bo, G2D_IMGBUF_GEM);
773 if (ret < 0) { 741 if (ret < 0) {
774 fprintf(stderr, "failed to test copy and scale operation.\n"); 742 fprintf(stderr, "failed to test copy and scale operation.\n");
775 goto err_free_src; 743 goto err_free_src;
@@ -777,7 +745,7 @@ int main(int argc, char **argv)
777 745
778 wait_for_user_input(0); 746 wait_for_user_input(0);
779 747
780 ret = test_case.checkerboard(dev, src, bo, G2D_IMGBUF_GEM); 748 ret = g2d_checkerboard_test(dev, src, bo, G2D_IMGBUF_GEM);
781 if (ret < 0) { 749 if (ret < 0) {
782 fprintf(stderr, "failed to issue checkerboard test.\n"); 750 fprintf(stderr, "failed to issue checkerboard test.\n");
783 goto err_free_src; 751 goto err_free_src;
@@ -794,7 +762,7 @@ int main(int argc, char **argv)
794 * Disable the test for now, until the kernel code has been sanitized. 762 * Disable the test for now, until the kernel code has been sanitized.
795 */ 763 */
796#if 0 764#if 0
797 ret = test_case.blend(dev, src, bo, G2D_IMGBUF_USERPTR); 765 ret = g2d_blend_test(dev, src, bo, G2D_IMGBUF_USERPTR);
798 if (ret < 0) 766 if (ret < 0)
799 fprintf(stderr, "failed to test blend operation.\n"); 767 fprintf(stderr, "failed to test blend operation.\n");
800 768