exynos: Introduce exynos_handle_event()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/9 exynos: Introduce exynos_handle_event()
From: Tobias Jakobi <[email protected]>
Used to handle kernel events specific to the Exynos platform. Currently only G2D events are handled.
---
Changes for
v2: Adapt to container approach.
v3: Add exynos_handle_event() to Exynos symbol test.
v4: exynos_handle_event() became not to use drmHandleEvent() for Exynos-dependent callback
exynos/exynos-symbol-check | 1 + exynos/exynos_drm.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++ exynos/exynos_drm.h | 12 ++++++++ exynos/exynos_drmif.h | 26 ++++++++++++++++ 4 files changed, 115 insertions(+)
exynos/exynos-symbol-check +1 -0
@@ -22,6 +22,7 @@ exynos_device_destroy exynos_prime_fd_to_handle exynos_prime_handle_to_fd exynos_vidi_connection +exynos_handle_event g2d_blend g2d_copy g2d_copy_with_scale
exynos/exynos_drm.c +76 -0
91 lines not on this page · raw message
exynos/exynos_drm.h +12 -0
@@ -157,4 +157,16 @@ struct drm_exynos_g2d_exec {#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \ DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec) +/* EXYNOS specific events */ +#define DRM_EXYNOS_G2D_EVENT 0x80000000 + +struct drm_exynos_g2d_event { +struct drm_event base; +__u64 user_data; +__u32 tv_sec; +__u32 tv_usec; +__u32 cmdlist_no; +__u32 reserved; +}; +#endif
exynos/exynos_drmif.h +26 -0
@@ -54,6 +54,25 @@ struct exynos_bo {uint32_t name; }; +#define EXYNOS_EVENT_CONTEXT_VERSION 1 + +/* +* Exynos Event Context structure. +* +* @base: base context (for core events). +* @version: version info similar to the one in 'drmEventContext'. +* @g2d_event_handler: handler for G2D events. +*/ +struct exynos_event_context { +drmEventContext base; + +int version; + +void (*g2d_event_handler)(int fd,unsigned int cmdlist_no, +unsigned int tv_sec,unsigned int tv_usec, +void *user_data); +}; +/* * device related functions: */
@@ -83,4 +102,11 @@ int exynos_prime_fd_to_handle(struct exynos_device *dev, int fd,int exynos_vidi_connection (struct exynos_device *dev,uint32_t connect,uint32_t ext,void *edid); +/* +* event handling related functions: +*/ +int exynos_handle_event (struct exynos_device *dev, +struct exynos_event_context *ctx); + +#endif /* EXYNOS_DRMIF_H_ */
--
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 2/9 tests/exynos: add fimg2d performance analysis
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
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.
---
Changes for
v2: Add GPLv2 header, argument handling and documentation.
Tool is only installed when requested.
v3: Free images array in fimg2d_perf_multi() as pointed out
by Hyungwon Hwang.
v4: Include header for error numbers (fixes build).
v5: Add binary to .gitignore.
.gitignore | 1 + tests/exynos/Makefile.am | 19 ++- tests/exynos/exynos_fimg2d_perf.c | 327 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 345 insertions(+), 2 deletions(-) create mode 100644 tests/exynos/exynos_fimg2d_perf.c
.gitignore +1 -0
@@ -94,5 +94,6 @@ tests/proptest/proptest tests/kmstest/kmstest tests/vbltest/vbltest tests/radeon/radeon_ttm +tests/exynos/exynos_fimg2d_perf tests/exynos/exynos_fimg2d_test man/*.3
tests/exynos/Makefile.am +17 -2
@@ -5,16 +5,31 @@ AM_CFLAGS = \ -I $(top_srcdir)/exynos \ -I $(top_srcdir) +bin_PROGRAMS = +noinst_PROGRAMS = + if HAVE_LIBKMS if HAVE_INSTALL_TESTS -bin_PROGRAMS = \ +bin_PROGRAMS += \ exynos_fimg2d_test else -noinst_PROGRAMS = \ +noinst_PROGRAMS += \ exynos_fimg2d_test endif endif +if HAVE_INSTALL_TESTS +bin_PROGRAMS += \ + exynos_fimg2d_perf +else +noinst_PROGRAMS += \ + exynos_fimg2d_perf +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 \
tests/exynos/exynos_fimg2d_perf.c new file +327 -0
327 lines not on this page · raw message
--
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 3/9 exynos/fimg2d: add g2d_config_event
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
This enables us to pass command buffers to the kernel which trigger an event on the DRM fd upon completion. The final goal is to enable asynchronous operation of the G2D engine, similar to async page flips.
Passing the event userdata pointer through the G2D context was chosen to not change the current API (e.g. by adding a userdata argument to each public functions).
---
Changes for
v2: Add g2d_config_event() to Exynos symbol test.
exynos/exynos-symbol-check | 1 + exynos/exynos_fimg2d.c | 28 ++++++++++++++++++++++++++-- exynos/exynos_fimg2d.h | 1 + 3 files changed, 28 insertions(+), 2 deletions(-)
exynos/exynos-symbol-check +1 -0
@@ -27,6 +27,7 @@ g2d_blend g2d_copy g2d_copy_with_scale g2d_exec +g2d_config_event g2d_fini g2d_init g2d_scale_and_blend
exynos/exynos_fimg2d.c +26 -2
@@ -57,6 +57,7 @@ struct g2d_context {unsigned int cmd_nr;unsigned int cmd_buf_nr;unsigned int cmdlist_nr; +void *event_userdata; };enum g2d_base_addr_reg {
@@ -280,8 +281,15 @@ static int g2d_flush(struct g2d_context *ctx) cmdlist.cmd_buf = (uint64_t )(uintptr_t )&ctx->cmd_buf[0 ]; cmdlist.cmd_nr = ctx->cmd_nr; cmdlist.cmd_buf_nr = ctx->cmd_buf_nr; - cmdlist.event_type =G2D_EVENT_NOT ; - cmdlist.user_data =0 ; + +if (ctx->event_userdata) { + cmdlist.event_type =G2D_EVENT_NONSTOP ; + cmdlist.user_data = (uint64_t )(uintptr_t )(ctx->event_userdata); + ctx->event_userdata =NULL ; + }else { + cmdlist.event_type =G2D_EVENT_NOT ; + cmdlist.user_data =0 ; + } ctx->cmd_nr =0 ; ctx->cmd_buf_nr =0 ;
@@ -336,6 +344,22 @@ void g2d_fini(struct g2d_context *ctx) }/** +* g2d_config_event - setup userdata configuration for a g2d event. +* The next invocation of a g2d call (e.g. g2d_solid_fill) is +* then going to flag the command buffer as 'nonstop'. +* Completion of the command buffer execution can then be +* determined by using drmHandleEvent on the DRM fd. +* The userdata is 'consumed' in the process. +* +* @ctx: a pointer to g2d_context structure. +* @userdata: a pointer to the user data +*/ +void g2d_config_event (struct g2d_context *ctx,void *userdata) +{ + ctx->event_userdata = userdata; +} + +/** * g2d_exec - start the dma to process all commands summited by g2d_flush(). * * @ctx: a pointer to g2d_context structure.
exynos/exynos_fimg2d.h +1 -0
@@ -290,6 +290,7 @@ struct g2d_context;struct g2d_context *g2d_init (int fd);void g2d_fini (struct g2d_context *ctx); +void g2d_config_event (struct g2d_context *ctx,void *userdata);int g2d_exec (struct g2d_context *ctx); int g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img, unsigned int x, unsigned int y, unsigned int w,
--
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 4/9 tests/exynos: add fimg2d event test
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
This tests async processing of G2D jobs. A separate thread is spawned to monitor the DRM fd for events and check whether a G2D job was completed.
---
Changes for
v2: Add GPLv2 header, argument handling and documentation.
Test is only installed when requested.
v3: Allocate G2D jobs with calloc which fixes 'busy' being
potentially uninitialized. Also enable timeout for poll() in the monitor thread. This fixes pthread_join() not working because of poll() not returning.
v4: Use explicit/fixed values for the DRM event context versions.
v5: Add binary to .gitignore.
v6: Use g2d_exec() instead of g2d_exec2() until g2d_exec2() being merged
.gitignore | 1 + tests/exynos/Makefile.am | 11 +- tests/exynos/exynos_fimg2d_event.c | 326 +++++++++++++++++++++++++++++++++++++ 3 files changed, 336 insertions(+), 2 deletions(-) create mode 100644 tests/exynos/exynos_fimg2d_event.c
.gitignore +1 -0
@@ -94,6 +94,7 @@ tests/proptest/proptest tests/kmstest/kmstest tests/vbltest/vbltest tests/radeon/radeon_ttm +tests/exynos/exynos_fimg2d_event tests/exynos/exynos_fimg2d_perf tests/exynos/exynos_fimg2d_test man/*.3
tests/exynos/Makefile.am +9 -2
@@ -20,16 +20,23 @@ endif if HAVE_INSTALL_TESTS bin_PROGRAMS += \ - exynos_fimg2d_perf + exynos_fimg2d_perf \ + exynos_fimg2d_event else noinst_PROGRAMS += \ - exynos_fimg2d_perf + exynos_fimg2d_perf \ + exynos_fimg2d_event endif exynos_fimg2d_perf_LDADD = \ $(top_builddir)/libdrm.la \ $(top_builddir)/exynos/libdrm_exynos.la +exynos_fimg2d_event_LDADD = \ + $(top_builddir)/libdrm.la \ + $(top_builddir)/exynos/libdrm_exynos.la \ + -lpthread + exynos_fimg2d_test_LDADD = \ $(top_builddir)/libdrm.la \ $(top_builddir)/libkms/libkms.la \
tests/exynos/exynos_fimg2d_event.c new file +326 -0
326 lines not on this page · raw message
--
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 5/9 tests/exynos: use XRGB8888 for framebuffer
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
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.
--- tests/exynos/exynos_fimg2d_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/exynos/exynos_fimg2d_test.c +1 -1
@@ -675,7 +675,7 @@ int main(int argc, char **argv) offsets[0 ] =0 ; ret =drmModeAddFB2 (dev->fd, screen_width, screen_height, -DRM_FORMAT_RGBA8888 , handles, +DRM_FORMAT_XRGB8888 , handles, pitches, offsets, &fb_id,0 );if (ret <0 ) goto err_destroy_buffer;
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 6/9 exynos: fimg2d: add g2d_set_direction
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
This allows setting the two direction registers, which specify how the engine blits pixels. This can be used for overlapping blits, which happen e.g. when 'moving' a rectangular region inside a fixed buffer.
---
Changes for v3:
- Definitions of e_g2d_dir_mode, g2d_direction_val are moved to source file from header file
exynos/exynos_fimg2d.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
exynos/exynos_fimg2d.c +51 -0
@@ -65,6 +65,44 @@ enum g2d_base_addr_reg { g2d_src }; +enum e_g2d_dir_mode { +G2D_DIR_MODE_POSITIVE =0 , +G2D_DIR_MODE_NEGATIVE =1 +}; + +union g2d_direction_val { +unsigned int val[2 ]; +struct { +/* SRC_MSK_DIRECT_REG [0:1] (source) */ +enum e_g2d_dir_mode src_x_direction:1 ; +enum e_g2d_dir_mode src_y_direction:1 ; + +/* SRC_MSK_DIRECT_REG [2:3] */ +unsigned int reversed1:2 ; + +/* SRC_MSK_DIRECT_REG [4:5] (mask) */ +enum e_g2d_dir_mode mask_x_direction:1 ; +enum e_g2d_dir_mode mask_y_direction:1 ; + +/* SRC_MSK_DIRECT_REG [6:31] */ +unsigned int padding1:26 ; + +/* DST_PAT_DIRECT_REG [0:1] (destination) */ +enum e_g2d_dir_mode dst_x_direction:1 ; +enum e_g2d_dir_mode dst_y_direction:1 ; + +/* DST_PAT_DIRECT_REG [2:3] */ +unsigned int reversed2:2 ; + +/* DST_PAT_DIRECT_REG [4:5] (pattern) */ +enum e_g2d_dir_mode pat_x_direction:1 ; +enum e_g2d_dir_mode pat_y_direction:1 ; + +/* DST_PAT_DIRECT_REG [6:31] */ +unsigned int padding2:26 ; + } data; +}; +static unsigned int g2d_get_scaling (unsigned int src,unsigned int dst) {/*
@@ -242,6 +280,19 @@ static void g2d_add_base_addr(struct g2d_context *ctx, struct g2d_image *img, }/* +* g2d_set_direction - setup direction register (useful for overlapping blits). +* +* @ctx: a pointer to g2d_context structure. +* @dir: a pointer to the g2d_direction_val structure. +*/ +static void g2d_set_direction (struct g2d_context *ctx, +const union g2d_direction_val *dir) +{ +g2d_add_cmd (ctx,SRC_MASK_DIRECT_REG , dir->val[0 ]); +g2d_add_cmd (ctx,DST_PAT_DIRECT_REG , dir->val[1 ]); +} + +/* * g2d_reset - reset fimg2d hardware. * * @ctx: a pointer to g2d_context structure.
--
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 7/9 exynos/fimg2d: add g2d_move
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
We already have g2d_copy() which implements G2D copy operations from one buffer to another. However we can't do a overlapping copy operation in one buffer.
Add g2d_move() which acts like the standard memmove() and properly handles overlapping copies.
---
Changes for
v2: Change wording in the description of g2d_move()
as suggested by Hyungwon Hwang.
exynos/exynos_fimg2d.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++ exynos/exynos_fimg2d.h | 3 ++ 2 files changed, 98 insertions(+)
exynos/exynos_fimg2d.c +95 -0
@@ -567,6 +567,101 @@ g2d_copy(struct g2d_context *ctx, struct g2d_image *src, }/** +* g2d_move - copy content inside single buffer. +* Similar to libc's memmove() this copies a rectangular +* region of the provided buffer to another location, while +* properly handling the situation where source and +* destination rectangle overlap. +* +* @ctx: a pointer to g2d_context structure. +* @img: a pointer to g2d_image structure providing +* buffer information. +* @src_x: x position of source rectangle. +* @src_y: y position of source rectangle. +* @dst_x: x position of destination rectangle. +* @dst_y: y position of destination rectangle. +* @w: width of rectangle to move. +* @h: height of rectangle to move. +*/ +int +g2d_move (struct g2d_context *ctx,struct g2d_image *img, +unsigned int src_x,unsigned int src_y, +unsigned int dst_x,unsigned dst_y,unsigned int w, +unsigned int h) +{ +union g2d_rop4_val rop4; +union g2d_point_val pt; +union g2d_direction_val dir; +unsigned int src_w, src_h, dst_w, dst_h; + + src_w = w; + src_h = h; +if (src_x + img->width > w) + src_w = img->width - src_x; +if (src_y + img->height > h) + src_h = img->height - src_y; + + dst_w = w; + dst_h = w; +if (dst_x + img->width > w) + dst_w = img->width - dst_x; +if (dst_y + img->height > h) + dst_h = img->height - dst_y; + + w =MIN (src_w, dst_w); + h =MIN (src_h, dst_h); + +if (w ==0 || h ==0 ) { +fprintf (stderr,MSG_PREFIX "invalid width or height.\n" ); +return -EINVAL ; + } + +if (g2d_check_space (ctx,13 ,2 )) +return -ENOSPC ; + +g2d_add_cmd (ctx,DST_SELECT_REG ,G2D_SELECT_MODE_BGCOLOR ); +g2d_add_cmd (ctx,SRC_SELECT_REG ,G2D_SELECT_MODE_NORMAL ); + +g2d_add_cmd (ctx,DST_COLOR_MODE_REG , img->color_mode); +g2d_add_cmd (ctx,SRC_COLOR_MODE_REG , img->color_mode); + +g2d_add_base_addr (ctx, img, g2d_dst); +g2d_add_base_addr (ctx, img, g2d_src); + +g2d_add_cmd (ctx,DST_STRIDE_REG , img->stride); +g2d_add_cmd (ctx,SRC_STRIDE_REG , img->stride); + + dir.val[0 ] = dir.val[1 ] =0 ; + +if (dst_x >= src_x) + dir.data.src_x_direction = dir.data.dst_x_direction =1 ; +if (dst_y >= src_y) + dir.data.src_y_direction = dir.data.dst_y_direction =1 ; + +g2d_set_direction (ctx, &dir); + + pt.data.x = src_x; + pt.data.y = src_y; +g2d_add_cmd (ctx,SRC_LEFT_TOP_REG , pt.val); + pt.data.x = src_x + w; + pt.data.y = src_y + h; +g2d_add_cmd (ctx,SRC_RIGHT_BOTTOM_REG , pt.val); + + pt.data.x = dst_x; + pt.data.y = dst_y; +g2d_add_cmd (ctx,DST_LEFT_TOP_REG , pt.val); + pt.data.x = dst_x + w; + pt.data.y = dst_y + h; +g2d_add_cmd (ctx,DST_RIGHT_BOTTOM_REG , pt.val); + + rop4.val =0 ; + rop4.data.unmasked_rop3 =G2D_ROP3_SRC ; +g2d_add_cmd (ctx,ROP4_REG , rop4.val); + +return g2d_flush (ctx); +} + +/** * g2d_copy_with_scale - copy contents in source buffer to destination buffer * scaling up or down properly. *
exynos/exynos_fimg2d.h +3 -0
@@ -299,6 +299,9 @@ int g2d_copy(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned int dst_y, unsigned int w, unsigned int h); +int g2d_move (struct g2d_context *ctx,struct g2d_image *img, +unsigned int src_x,unsigned int src_y,unsigned int dst_x, +unsigned dst_y,unsigned int w,unsigned int h); int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int src_w,
--
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 8/9 tests/exynos: add test for g2d_move
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
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).
--- tests/exynos/exynos_fimg2d_test.c | 132 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+)
tests/exynos/exynos_fimg2d_test.c +132 -0
@@ -313,6 +313,130 @@ fail:return ret; } +static int g2d_move_test (struct exynos_device *dev, +struct exynos_bo *tmp, +struct exynos_bo *buf, +enum e_g2d_buf_type type) +{ +struct g2d_context *ctx; +struct g2d_image img = {0 }, tmp_img = {0 }; +unsigned int img_w, img_h, count; +int cur_x, cur_y; +void *checkerboard; +int ret; + +static const struct g2d_step { +int x, y; + } steps[] = { + {1 ,0 }, {0 ,1 }, + {-1 ,0 }, {0 ,-1 }, + {1 ,1 }, {-1 ,-1 }, + {1 ,-1 }, {-1 ,1 }, + {2 ,1 }, {1 ,2 }, + {-2 ,-1 }, {-1 ,-2 }, + {2 ,-1 }, {1 ,-2 }, + {-2 ,1 }, {-1 ,2 } + }; +static const unsigned int num_steps = +sizeof (steps) /sizeof (struct g2d_step ); + + ctx =g2d_init (dev->fd); +if (!ctx) +return -EFAULT ; + + img.bo[0 ] = buf->handle; + +/* create pattern of half the screen size */ + checkerboard =create_checkerboard_pattern (screen_width /64 , screen_height /64 ,32 ); +if (!checkerboard) { + ret = -EFAULT ; + goto fail; + } + + img_w = (screen_width /64 ) *32 ; + img_h = (screen_height /64 ) *32 ; + +switch (type) { +case G2D_IMGBUF_GEM : +memcpy (tmp->vaddr, checkerboard, img_w * img_h *4 ); + tmp_img.bo[0 ] = tmp->handle; +break ; +case G2D_IMGBUF_USERPTR : + tmp_img.user_ptr[0 ].userptr = (unsigned long )checkerboard; + tmp_img.user_ptr[0 ].size = img_w * img_h *4 ; +break ; +case G2D_IMGBUF_COLOR : +default : + ret = -EFAULT ; + goto fail; + } + +/* solid fill framebuffer with white color */ + img.width = screen_width; + img.height = screen_height; + img.stride = screen_width *4 ; + img.buf_type =G2D_IMGBUF_GEM ; + img.color_mode =G2D_COLOR_FMT_ARGB8888 |G2D_ORDER_AXRGB ; + img.color =0xffffffff ; + +/* put checkerboard pattern in the center of the framebuffer */ + cur_x = (screen_width - img_w) /2 ; + cur_y = (screen_height - img_h) /2 ; + tmp_img.width = img_w; + tmp_img.height = img_h; + tmp_img.stride = img_w *4 ; + tmp_img.buf_type = type; + tmp_img.color_mode =G2D_COLOR_FMT_ARGB8888 |G2D_ORDER_AXRGB ; + + ret =g2d_solid_fill (ctx, &img,0 ,0 , screen_width, screen_height) || +g2d_copy (ctx, &tmp_img, &img,0 ,0 , cur_x, cur_y, img_w, img_h); + +if (!ret) + ret =g2d_exec (ctx); +if (ret <0 ) + goto fail; + +printf ("move test with %s.\n" , + type ==G2D_IMGBUF_GEM ?"gem" :"userptr" ); + +srand (time (NULL )); +for (count =0 ; count <256 ; ++count) { +const struct g2d_step *s; + +/* select step and validate it */ +while (1 ) { + s = &steps[random () % num_steps]; + +if (cur_x + s->x <0 || cur_y + s->y <0 || + cur_x + img_w + s->x >= screen_width || + cur_y + img_h + s->y >= screen_height) +continue ; +else +break ; + } + + ret =g2d_move (ctx, &img, cur_x, cur_y, cur_x + s->x, cur_y + s->y, + img_w, img_h); +if (!ret) + ret =g2d_exec (ctx); + +if (ret <0 ) + goto fail; + + cur_x += s->x; + cur_y += s->y; + +usleep (100000 ); + } + +fail: +g2d_fini (ctx); + +free (checkerboard); + +return ret; +} + static int g2d_copy_with_scale_test(struct exynos_device *dev, struct exynos_bo *src, struct exynos_bo *dst,
@@ -708,6 +832,14 @@ int main(int argc, char **argv)wait_for_user_input (0 ); + ret =g2d_move_test (dev, src, bo,G2D_IMGBUF_GEM ); +if (ret <0 ) { +fprintf (stderr,"failed to test move operation.\n" ); + goto err_free_src; + } + +wait_for_user_input (0 ); + 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" );
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v3 9/9 exynos: bump version number
In reply to a message not in the archiveFrom: Tobias Jakobi <[email protected]>
The Exynos API was extended quite a bit, so reflect this in the version number.
--- exynos/libdrm_exynos.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
exynos/libdrm_exynos.pc.in +1 -1
@@ -5,7 +5,7 @@ includedir=@includedir@ Name: libdrm_exynos Description: Userspace interface to exynos kernel DRM services -Version: 0.6 +Version: 0.7 Libs: -L${libdir} -ldrm_exynos Cflags: -I${includedir} -I${includedir}/libdrm -I${includedir}/exynos Requires.private: libdrm
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel