From patchwork Fri Jun 12 18:15:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Jakobi X-Patchwork-Id: 6600161 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1029C0020 for ; Fri, 12 Jun 2015 18:16:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BAE7820684 for ; Fri, 12 Jun 2015 18:16:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 421F12066D for ; Fri, 12 Jun 2015 18:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755299AbbFLSQg (ORCPT ); Fri, 12 Jun 2015 14:16:36 -0400 Received: from smtp.math.uni-bielefeld.de ([129.70.45.10]:50902 "EHLO smtp.math.uni-bielefeld.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247AbbFLSQg (ORCPT ); Fri, 12 Jun 2015 14:16:36 -0400 Received: from chidori.entropy (unknown [5.147.63.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by smtp.math.uni-bielefeld.de (Postfix) with ESMTPSA id 5E8AA60309; Fri, 12 Jun 2015 20:16:34 +0200 (CEST) From: Tobias Jakobi To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, emil.l.velikov@gmail.com, jy0922.shim@samsung.com, gustavo.padovan@collabora.co.uk, inki.dae@samsung.com, Tobias Jakobi Subject: [PATCH v2 6/9] tests/exynos: remove struct fimg2d_test_case Date: Fri, 12 Jun 2015 20:15:11 +0200 Message-Id: <1434132914-3150-7-git-send-email-tjakobi@math.uni-bielefeld.de> X-Mailer: git-send-email 2.0.5 In-Reply-To: <1434132914-3150-1-git-send-email-tjakobi@math.uni-bielefeld.de> References: <1434132914-3150-1-git-send-email-tjakobi@math.uni-bielefeld.de> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- tests/exynos/exynos_fimg2d_test.c | 42 +++++---------------------------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c index 080d178..de6a2b7 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -37,30 +37,6 @@ static unsigned int screen_width, screen_height; -/* - * A structure to test fimg2d hw. - * - * @solid_fill: fill given color data to source buffer. - * @copy: copy source to destination buffer. - * @copy_with_scale: copy source to destination buffer scaling up or - * down properly. - * @blend: blend source to destination buffer. - */ -struct fimg2d_test_case { - int (*solid_fill)(struct exynos_device *dev, struct exynos_bo *dst); - int (*copy)(struct exynos_device *dev, struct exynos_bo *src, - struct exynos_bo *dst, enum e_g2d_buf_type); - int (*copy_with_scale)(struct exynos_device *dev, - struct exynos_bo *src, struct exynos_bo *dst, - enum e_g2d_buf_type); - int (*blend)(struct exynos_device *dev, - struct exynos_bo *src, struct exynos_bo *dst, - enum e_g2d_buf_type); - int (*checkerboard)(struct exynos_device *dev, - struct exynos_bo *src, struct exynos_bo *dst, - enum e_g2d_buf_type); -}; - struct connector { uint32_t id; char mode_str[64]; @@ -630,14 +606,6 @@ fail: return ret; } -static struct fimg2d_test_case test_case = { - .solid_fill = &g2d_solid_fill_test, - .copy = &g2d_copy_test, - .copy_with_scale = &g2d_copy_with_scale_test, - .blend = &g2d_blend_test, - .checkerboard = &g2d_checkerboard_test, -}; - static void usage(char *name) { fprintf(stderr, "usage: %s [-s]\n", name); @@ -747,7 +715,7 @@ int main(int argc, char **argv) if (ret < 0) goto err_rm_fb; - ret = test_case.solid_fill(dev, bo); + ret = g2d_solid_fill_test(dev, bo); if (ret < 0) { fprintf(stderr, "failed to solid fill operation.\n"); goto err_rm_fb; @@ -761,7 +729,7 @@ int main(int argc, char **argv) goto err_rm_fb; } - ret = test_case.copy(dev, src, bo, G2D_IMGBUF_GEM); + ret = g2d_copy_test(dev, src, bo, G2D_IMGBUF_GEM); if (ret < 0) { fprintf(stderr, "failed to test copy operation.\n"); goto err_free_src; @@ -769,7 +737,7 @@ int main(int argc, char **argv) wait_for_user_input(0); - ret = test_case.copy_with_scale(dev, src, bo, G2D_IMGBUF_GEM); + ret = g2d_copy_with_scale_test(dev, src, bo, G2D_IMGBUF_GEM); if (ret < 0) { fprintf(stderr, "failed to test copy and scale operation.\n"); goto err_free_src; @@ -777,7 +745,7 @@ int main(int argc, char **argv) wait_for_user_input(0); - ret = test_case.checkerboard(dev, src, bo, G2D_IMGBUF_GEM); + ret = g2d_checkerboard_test(dev, src, bo, G2D_IMGBUF_GEM); if (ret < 0) { fprintf(stderr, "failed to issue checkerboard test.\n"); goto err_free_src; @@ -794,7 +762,7 @@ int main(int argc, char **argv) * Disable the test for now, until the kernel code has been sanitized. */ #if 0 - ret = test_case.blend(dev, src, bo, G2D_IMGBUF_USERPTR); + ret = g2d_blend_test(dev, src, bo, G2D_IMGBUF_USERPTR); if (ret < 0) fprintf(stderr, "failed to test blend operation.\n");