For exynos module for libdrm, there are some build warnings, so this patch series remove them.
Seung-Woo Kim (3): exynos: fix type-punned pointer build warning exynos/fimg2d: remove unused-function build warning tests/exynos: remove unused-function build warning
exynos/exynos_drm.c | 2 +- exynos/exynos_fimg2d.c | 14 -------------- tests/exynos/exynos_fimg2d_test.c | 4 +++- 3 files changed, 4 insertions(+), 16 deletions(-)
As like the commit ecc2a097294d ("xf86drm: Fix type-punned pointer build warning"), this fixes following build warning.
exynos_drm.c: In function 'exynos_handle_event': exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e = (struct drm_event *) &buffer[i]; ^
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com --- exynos/exynos_drm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c index b961e52..f6204f1 100644 --- a/exynos/exynos_drm.c +++ b/exynos/exynos_drm.c @@ -417,7 +417,7 @@ exynos_handle_event(struct exynos_device *dev, struct exynos_event_context *ctx)
i = 0; while (i < len) { - e = (struct drm_event *) &buffer[i]; + e = (struct drm_event *)(buffer + i); switch (e->type) { case DRM_EVENT_VBLANK: if (evctx->version < 1 ||
Hello Seung-Woo,
Reviewed-by: Tobias Jakobi tjakobi@math.uni-bielefeld.de
With best wishes, Tobias
Seung-Woo Kim wrote:
As like the commit ecc2a097294d ("xf86drm: Fix type-punned pointer build warning"), this fixes following build warning.
exynos_drm.c: In function 'exynos_handle_event': exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e = (struct drm_event *) &buffer[i]; ^
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com
exynos/exynos_drm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c index b961e52..f6204f1 100644 --- a/exynos/exynos_drm.c +++ b/exynos/exynos_drm.c @@ -417,7 +417,7 @@ exynos_handle_event(struct exynos_device *dev, struct exynos_event_context *ctx)
i = 0; while (i < len) {
e = (struct drm_event *) &buffer[i];
switch (e->type) { case DRM_EVENT_VBLANK: if (evctx->version < 1 ||e = (struct drm_event *)(buffer + i);
The function g2d_reset() is not anymore used after the commit e3c97d1a2473 ("exynos/fimg2d: add g2d_validate_xyz() functions"), so it should be removed.
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com --- exynos/exynos_fimg2d.c | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c index 7f1d105..61340c3 100644 --- a/exynos/exynos_fimg2d.c +++ b/exynos/exynos_fimg2d.c @@ -293,20 +293,6 @@ static void g2d_set_direction(struct g2d_context *ctx, }
/* - * g2d_reset - reset fimg2d hardware. - * - * @ctx: a pointer to g2d_context structure. - * - */ -static void g2d_reset(struct g2d_context *ctx) -{ - ctx->cmd_nr = 0; - ctx->cmd_buf_nr = 0; - - g2d_add_cmd(ctx, SOFT_RESET_REG, 0x01); -} - -/* * g2d_flush - submit all commands and values in user side command buffer * to command queue aware of fimg2d dma. *
Hello Seung-Woo,
looks good to me. Also, g2d_reset() never worked in the first place, since the kernel driver rejects writes to SOFT_RESET_REG.
Reviewed-by: Tobias Jakobi tjakobi@math.uni-bielefeld.de
With best wishes, Tobias
Seung-Woo Kim wrote:
The function g2d_reset() is not anymore used after the commit e3c97d1a2473 ("exynos/fimg2d: add g2d_validate_xyz() functions"), so it should be removed.
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com
exynos/exynos_fimg2d.c | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c index 7f1d105..61340c3 100644 --- a/exynos/exynos_fimg2d.c +++ b/exynos/exynos_fimg2d.c @@ -293,20 +293,6 @@ static void g2d_set_direction(struct g2d_context *ctx, }
/*
- g2d_reset - reset fimg2d hardware.
- @ctx: a pointer to g2d_context structure.
- */
-static void g2d_reset(struct g2d_context *ctx) -{
- ctx->cmd_nr = 0;
- ctx->cmd_buf_nr = 0;
- g2d_add_cmd(ctx, SOFT_RESET_REG, 0x01);
-}
-/*
- g2d_flush - submit all commands and values in user side command buffer
to command queue aware of fimg2d dma.
The function g2d_blend_test() is blocked to call because of feature unsafety. This patch blocks with proper feature name and also blocks the function itself to remove build warning.
Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com --- tests/exynos/exynos_fimg2d_test.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c index 797fb6e..3495c62 100644 --- a/tests/exynos/exynos_fimg2d_test.c +++ b/tests/exynos/exynos_fimg2d_test.c @@ -523,6 +523,7 @@ fail: return 0; }
+#if EXYNOS_G2D_USERPTR_TEST static int g2d_blend_test(struct exynos_device *dev, struct exynos_bo *src, struct exynos_bo *dst, @@ -621,6 +622,7 @@ fail:
return 0; } +#endif
static int g2d_checkerboard_test(struct exynos_device *dev, struct exynos_bo *src, @@ -864,7 +866,7 @@ int main(int argc, char **argv) * * Disable the test for now, until the kernel code has been sanitized. */ -#if 0 +#if EXYNOS_G2D_USERPTR_TEST ret = g2d_blend_test(dev, src, bo, G2D_IMGBUF_USERPTR); if (ret < 0) fprintf(stderr, "failed to test blend operation.\n");
On 31 March 2017 at 04:30, Seung-Woo Kim sw0312.kim@samsung.com wrote:
For exynos module for libdrm, there are some build warnings, so this patch series remove them.
R-b and pushed the series.
Thanks Emil
dri-devel@lists.freedesktop.org