summaryrefslogtreecommitdiff
path: root/drivers/media/platform/sti/bdisp/bdisp-hw.c
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2015-07-10 08:29:22 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-07-17 12:52:59 (GMT)
commit3d8bffe88316c0c8b5edad633fc8a25cae644bb4 (patch)
tree3e177e35403141e1920f4db907f4da58a320081c /drivers/media/platform/sti/bdisp/bdisp-hw.c
parentd3194520e2790591b5fabeb913dd74af908ca160 (diff)
downloadlinux-3d8bffe88316c0c8b5edad633fc8a25cae644bb4.tar.xz
[media] bdisp: composing support
Support the composing (at VIDEO_CAPTURE) with the _selection API. v4l2-compliance successfully run ("test Composing: OK") Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/sti/bdisp/bdisp-hw.c')
-rw-r--r--drivers/media/platform/sti/bdisp/bdisp-hw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c b/drivers/media/platform/sti/bdisp/bdisp-hw.c
index 465828e..c83f9c2 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-hw.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-hw.c
@@ -336,8 +336,8 @@ static int bdisp_hw_get_hv_inc(struct bdisp_ctx *ctx, u16 *h_inc, u16 *v_inc)
src_w = ctx->src.crop.width;
src_h = ctx->src.crop.height;
- dst_w = ctx->dst.width;
- dst_h = ctx->dst.height;
+ dst_w = ctx->dst.crop.width;
+ dst_h = ctx->dst.crop.height;
if (bdisp_hw_get_inc(src_w, dst_w, h_inc) ||
bdisp_hw_get_inc(src_h, dst_h, v_inc)) {
@@ -483,9 +483,9 @@ static void bdisp_hw_build_node(struct bdisp_ctx *ctx,
src_rect.width -= src_x_offset;
src_rect.width = min_t(__s32, MAX_SRC_WIDTH, src_rect.width);
- dst_x_offset = (src_x_offset * dst->width) / ctx->src.crop.width;
+ dst_x_offset = (src_x_offset * dst_width) / ctx->src.crop.width;
dst_rect.left += dst_x_offset;
- dst_rect.width = (src_rect.width * dst->width) / ctx->src.crop.width;
+ dst_rect.width = (src_rect.width * dst_width) / ctx->src.crop.width;
/* General */
src_fmt = src->fmt->pixelformat;