From: Emil Velikov <emil.l.velikov@gmail.com>
To: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
linux-samsung-soc@vger.kernel.org
Cc: emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org,
m.szyprowski@samsung.com
Subject: Re: [PATCH 1/5] tests/exynos: add fimg2d performance analysis
Date: Sun, 22 Mar 2015 15:36:55 +0000 [thread overview]
Message-ID: <550EE197.1090008@gmail.com> (raw)
In-Reply-To: <1426890348-12807-2-git-send-email-tjakobi@math.uni-bielefeld.de>
On 20/03/15 22:25, Tobias Jakobi wrote:
> Currently only fast solid color clear performance is measured.
> A large buffer is allocated and solid color clear operations
> are executed on it with randomly chosen properties (position
> and size of the region, clear color). Execution time is
> measured and output together with the amount of pixels
> processed.
>
> The 'simple' variant only executes one G2D command buffer at
> a time, while the 'multi' variant executes multiple ones. This
> can be used to measure setup/exec overhead.
>
> The test also serves a stability check. If clocks/voltages are
> too high or low respectively, the test quickly reveals this.
>
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Hi Tobias,
As most of this series is quite Exynos specific I will cover the misc
bits, and leave the core part to someone familiar with the hardware.
> ---
> tests/exynos/Makefile.am | 8 +-
> tests/exynos/exynos_fimg2d_perf.c | 245 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 252 insertions(+), 1 deletion(-)
> create mode 100644 tests/exynos/exynos_fimg2d_perf.c
>
> diff --git a/tests/exynos/Makefile.am b/tests/exynos/Makefile.am
> index b21d016..243f957 100644
> --- a/tests/exynos/Makefile.am
> +++ b/tests/exynos/Makefile.am
> @@ -5,9 +5,11 @@ AM_CFLAGS = \
> -I $(top_srcdir)/exynos \
> -I $(top_srcdir)
>
> +bin_PROGRAMS = exynos_fimg2d_perf
> +
Might I suggest that we treat this (and your follow up utility) as a
test ? I.e. use
if HAVE_INSTALL_TESTS
bin_PROGRAMS = \
exynos_fimg2d_perf
else
noinst_PROGRAMS = \
exynos_fimg2d_perf
endif
and amend the block below appropriately ?
> if HAVE_LIBKMS
> if HAVE_INSTALL_TESTS
> -bin_PROGRAMS = \
> +bin_PROGRAMS += \
> exynos_fimg2d_test
> else
> noinst_PROGRAMS = \
> @@ -15,6 +17,10 @@ noinst_PROGRAMS = \
> endif
> endif
>
> +exynos_fimg2d_perf_LDADD = \
> + $(top_builddir)/libdrm.la \
> + $(top_builddir)/exynos/libdrm_exynos.la
> +
> exynos_fimg2d_test_LDADD = \
> $(top_builddir)/libdrm.la \
> $(top_builddir)/libkms/libkms.la \
> diff --git a/tests/exynos/exynos_fimg2d_perf.c b/tests/exynos/exynos_fimg2d_perf.c
> new file mode 100644
> index 0000000..f45cacc
> --- /dev/null
> +++ b/tests/exynos/exynos_fimg2d_perf.c
> @@ -0,0 +1,245 @@
Can you add a licence to this file. Would be nice if it's covered by
X/MIT so that *BSD folk and others can use your tool.
> +#include <stdlib.h>
> +#include <stdio.h>
> +#include <time.h>
> +
> +#include <xf86drm.h>
> +
> +#include "exynos_drm.h"
> +#include "exynos_drmif.h"
> +#include "exynos_fimg2d.h"
> +
> +/* Enable to format the output so that it can be fed into Mathematica. */
> +#define OUTPUT_MATHEMATICA 0
> +
> +static int fimg2d_perf_simple(struct exynos_bo *bo, struct g2d_context *ctx,
> + unsigned buf_width, unsigned buf_height, unsigned iterations)
> +{
> + struct timespec tspec = { 0 };
> + struct g2d_image img = { 0 };
> +
> + unsigned long long g2d_time;
> + unsigned i;
> + int ret = 0;
> +
> + img.width = buf_width;
> + img.height = buf_height;
> + img.stride = buf_width * 4;
> + img.color_mode = G2D_COLOR_FMT_ARGB8888 | G2D_ORDER_AXRGB;
> + img.buf_type = G2D_IMGBUF_GEM;
> + img.bo[0] = bo->handle;
> +
> + srand(time(NULL));
> +
> + printf("starting simple G2D performance test\n");
> + printf("buffer width = %u, buffer height = %u, iterations = %u\n",
> + buf_width, buf_height, iterations);
> +
> +#if (OUTPUT_MATHEMATICA == 1)
> + putchar('{');
> +#endif
> +
I'm suspecting that having this as a runtime option will be better.
Something like ./exynos_fimg2d_perf --output mathematica ?
As a general note I would recommend keeping statements on separate lines
(none of if (foo) far()) as it makes debugging easier.
Although all of the above are my take on things, so checks with the
Exynos crew if they feel otherwise :-)
Cheers,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-03-22 15:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 22:25 drm/exynos: add async G2D execution to libdrm Tobias Jakobi
2015-03-20 22:25 ` [PATCH 1/5] tests/exynos: add fimg2d performance analysis Tobias Jakobi
2015-03-22 15:36 ` Emil Velikov [this message]
2015-03-22 16:35 ` Tobias Jakobi
2015-03-25 18:27 ` Tobias Jakobi
2015-03-26 15:16 ` Emil Velikov
2015-03-20 22:25 ` [PATCH 2/5] exynos: add EXYNOS_G2D_EVENT to drmHandleEvent Tobias Jakobi
2015-03-22 15:41 ` Emil Velikov
2015-03-22 16:29 ` Tobias Jakobi
2015-03-23 11:03 ` Emil Velikov
2015-03-30 0:02 ` Rob Clark
2015-03-30 11:37 ` Tobias Jakobi
2015-03-30 13:04 ` Tobias Jakobi
2015-04-21 18:14 ` Emil Velikov
2015-04-23 12:04 ` Tobias Jakobi
2015-03-20 22:25 ` [PATCH 3/5] exynos/fimg2d: add g2d_config_event Tobias Jakobi
2015-03-21 14:03 ` drm/exynos: add async G2D execution to libdrm Tobias Jakobi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=550EE197.1090008@gmail.com \
--to=emil.l.velikov@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=tjakobi@math.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.