aboutsummaryrefslogtreecommitdiffstats
path: root/exynos
diff options
context:
space:
mode:
authorTobias Jakobi2015-06-12 13:15:06 -0500
committerEmil Velikov2015-06-29 13:19:23 -0500
commit7da8f07274cfe57cfd157e184f1f0b4c15405b9e (patch)
treed10c45cd1479471cac123b9874787181943a995f /exynos
parent47a2de27a0f087908e3063fdd6dfdececd2db75b (diff)
downloadexternal-libdrm-7da8f07274cfe57cfd157e184f1f0b4c15405b9e.tar.gz
external-libdrm-7da8f07274cfe57cfd157e184f1f0b4c15405b9e.tar.xz
external-libdrm-7da8f07274cfe57cfd157e184f1f0b4c15405b9e.zip
exynos: fimg2d: fix return codes
Even if flushing the command buffer doesn't succeed, the G2D calls would still return zero. Fix this by just passing the flush return code. In fact error handling currently ignores the fact that g2d_add_cmd() can fail. This is going to be handled in a later patch. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'exynos')
-rw-r--r--exynos/exynos_fimg2d.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 86ae8989..5ea42e69 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -330,9 +330,7 @@ g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
330 bitblt.data.fast_solid_color_fill_en = 1; 330 bitblt.data.fast_solid_color_fill_en = 1;
331 g2d_add_cmd(ctx, BITBLT_COMMAND_REG, bitblt.val); 331 g2d_add_cmd(ctx, BITBLT_COMMAND_REG, bitblt.val);
332 332
333 g2d_flush(ctx); 333 return g2d_flush(ctx);
334
335 return 0;
336} 334}
337 335
338/** 336/**
@@ -415,9 +413,7 @@ g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
415 rop4.data.unmasked_rop3 = G2D_ROP3_SRC; 413 rop4.data.unmasked_rop3 = G2D_ROP3_SRC;
416 g2d_add_cmd(ctx, ROP4_REG, rop4.val); 414 g2d_add_cmd(ctx, ROP4_REG, rop4.val);
417 415
418 g2d_flush(ctx); 416 return g2d_flush(ctx);
419
420 return 0;
421} 417}
422 418
423/** 419/**
@@ -527,9 +523,7 @@ g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
527 pt.data.y = dst_y + dst_h; 523 pt.data.y = dst_y + dst_h;
528 g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val); 524 g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val);
529 525
530 g2d_flush(ctx); 526 return g2d_flush(ctx);
531
532 return 0;
533} 527}
534 528
535/** 529/**
@@ -636,9 +630,7 @@ g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
636 pt.data.y = dst_y + h; 630 pt.data.y = dst_y + h;
637 g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val); 631 g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val);
638 632
639 g2d_flush(ctx); 633 return g2d_flush(ctx);
640
641 return 0;
642} 634}
643 635
644/** 636/**
@@ -766,7 +758,5 @@ g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
766 pt.data.y = dst_y + dst_h; 758 pt.data.y = dst_y + dst_h;
767 g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val); 759 g2d_add_cmd(ctx, DST_RIGHT_BOTTOM_REG, pt.val);
768 760
769 g2d_flush(ctx); 761 return g2d_flush(ctx);
770
771 return 0;
772} 762}