[PATCH 04/14] exynos/fimg2d: check buffer space in g2d_solid_fill()
Tobias Jakobi
tjakobi at math.uni-bielefeld.de
Mon Aug 24 07:13:59 PDT 2015
The amount of commands (regular and GEM) doesn't depend
on the input here.
Signed-off-by: Tobias Jakobi <tjakobi at math.uni-bielefeld.de>
---
exynos/exynos_fimg2d.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index 1ae8adf..9b7bcce 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -319,6 +319,9 @@ g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
union g2d_bitblt_cmd_val bitblt;
union g2d_point_val pt;
+ if (g2d_check_space(ctx, 7, 1))
+ return -ENOSPC;
+
g2d_add_cmd(ctx, DST_SELECT_REG, G2D_SELECT_MODE_NORMAL);
g2d_add_cmd(ctx, DST_COLOR_MODE_REG, img->color_mode);
g2d_add_base_addr(ctx, img, g2d_dst);
--
2.0.5
More information about the dri-devel
mailing list