Commit Graph

22 Commits (f684bb109fcdb85faa1b212bb6efcc352d8cbcdc)

Author SHA1 Message Date
Tobias Jakobi 6689e4ee14 tests/exynos: add test for g2d_move
To check if g2d_move() works properly we create a small checkerboard
pattern in the center of the screen and then shift this pattern
around with g2d_move(). The pattern should be properly preserved
by the operation (but not the surrounding area).

Tested-by: Hyungwon Hwang <human.hwang@samsung.com>
Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
[Emil Velikov: add g2d_move to the symbol check]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18 17:42:54 +00:00
Tobias Jakobi 1b32e5da44 tests/exynos: use XRGB8888 for framebuffer
This matches the G2D color mode that is used in the entire code.
The previous (incorrect) RGBA8888 would only work since the
Exynos mixer did its configuration based on the bpp, and not
based on the actual pixelformat.

Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18 17:42:54 +00:00
Tobias Jakobi 2bf0d5bf63 tests/exynos: handle G2D_IMGBUF_COLOR in switch statements
This fixes a compiler warning about missing handling of enum
values in the switch statements.

Also remove the silent mapping to G2D_IMGBUF_GEM when an
unknown buffer type is encountered. We have full control
about the type here, and if it's unknown then we obviously
have a bug in the code.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:19:23 +01:00
Tobias Jakobi b26c8efb65 tests/exynos: remove connector_find_plane
No test uses DRM planes at the moment so this function
is never called. Inspection of the git history shows
that DRM planes were also never used in these tests
in the past.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:19:23 +01:00
Tobias Jakobi 13ad10afc3 tests/exynos: simplify drm_set_crtc
We can just return 'ret' here, the goto serves no purpose.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:19:23 +01:00
Tobias Jakobi 28d896c763 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>
2015-06-29 19:19:23 +01:00
Tobias Jakobi 3aeea6198d tests/exynos: remove unused define
It doesn't make sense to limit the number of
test cases anyway.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:19:23 +01:00
Tobias Jakobi 0536d33f07 tests/exynos: clean struct connector
Remove all unused struct members. An inspection of the
git history shows that these members were also never
used in the past.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:19:23 +01:00
Tobias Jakobi 8d8bbbb972 tests/exynos: replace return by break
The 'usage' function already does exit(0), so that this
'return -EINVAL' is never called. Just put a break there
to avoid confusion.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:19:23 +01:00
Jan Vesely 8dff7a0478 tests/exynos: Fix missing static keyword
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-03-20 18:17:34 -04:00
Tobias Jakobi 9a0949a8f4 exynos: add exynos prefix to fimg2d header
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-16 22:21:40 +00:00
Tobias Jakobi 736d6a1f0f exynos: use structure initialization instead of memset
Keeps the code cleaner, since the structs have to be initialized
once anyway.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
[evelikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

Conflicts:
	tests/exynos/exynos_fimg2d_test.c
2015-03-16 22:21:03 +00:00
Tobias Jakobi 6f950de953 tests/exynos: fimg2d: add a checkerboard test
This makes it easier to spot memory corruptions which don't become
visible when using a plain buffer filled with a solid color (so
corruptions that are just a permutation of the bytes in the buffer).

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-16 22:18:05 +00:00
Jan Vesely 0706c14e7c Fix unused, and unused-but-set variables warnings
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <eil.l.velikov@gmail.com>
2015-03-14 17:02:06 -04:00
Tobias Jakobi 734d13b13b tests/exynos: improve error handling
Check for a useable connector and also if the resolution is sane
(width and height are both non-zero).

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:52 +00:00
Tobias Jakobi 6e2a9f936e tests/exynos: introduce wait_for_user_input
Currently getchar() is used to pause execution after each test.
The user isn't informed if one is supposed to do anything for
the tests to continue, so print a simple message to make this
more clear.

v3: Compactify printf calls as pointed out by
    Emil Velikov <emil.l.velikov@gmail.com>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:33 +00:00
Tobias Jakobi a7c865dc0a tests/exynos: disable the G2D userptr/blend test
v2: Move the commit description into the patch itself.
v3: Use common commenting style as pointed out by
    Emil Velikov <emil.l.velikov@gmail.com>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:21 +00:00
Tobias Jakobi c8168fe5b8 tests/exynos: fix typos and change wording
No functional changes.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
2015-03-10 19:21:18 +00:00
Emil Velikov 0b3e540aa4 exynos_fimg2d_test: remove unused variables
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:32 +00:00
Emil Velikov 2b209fc409 exynos_fimg2d_test: fix implicit funciton declaration errors
As one adds WARN_CFLAGS to the build the compiler throws a couple of
lovely error messages. Add the relevant includes to fix them.

  error: implicit declaration of function ‘time’
  error: implicit declaration of function ‘getopt’

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27 15:51:08 +00:00
Daniel Kurtz d1000c432c exynos_fimg2d_test: fix drmModeRmFB
The first parameter should be the drm fd, second param is the fb id.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
2014-05-12 23:09:20 -04:00
Inki Dae bbf6e3dea3 libdrm/exynos: add test application for 2d gpu.
This patch adds library and test application for g2d gpu(fimg2d).

The fimg2d hardware is a 2D graphics accelerator(G2D) that
supports Bit Block Transfer(BitBLT).

The library includes the following primitive drawing operations:
.solid fill - This operation fills the given buffer with
	the given color data.
.copy - This operation copies contents in source buffer to
	destination buffer.
.copy_with_scale - This operation copies contents in source buffer
	to destination buffer scaling up or down properly.
.blend - This operation blends contents in source buffer with
	the ones in destination buffer.

And the above operations uses gem handle or user space address
allocated by malloc() as source or destination buffer.

And the test application includes just simple primitive drawing
tests with the above library.
And the guide to test is as the following,
	"#exynos_fimg2d_test -s connector_id@crtc_id:mode"

With this above simple command, four primitive drawing operations
would be called step by step and also rendered on the output device
to the given connector and crtc id.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
2013-03-08 11:49:42 -05:00