提交 39977168 编写于 作者: N Niklas Söderlund 提交者: Mauro Carvalho Chehab

media: rcar-vin: fix crop and compose handling for Gen3

When refactoring the Gen3 enablement series crop and compose handling
where broken. This went unnoticed but can result in writing out side the
capture buffer. Fix this by restoring the crop and compose to reflect
the format dimensions as we have not yet enabled the scaler for Gen3.

Fixes: 5e7c6236 ("media: rcar-vin: use different v4l2 operations in media controller mode")
Reported-by: NJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: NHans Verkuil <hansverk@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 d73c3357
......@@ -702,6 +702,12 @@ static int rvin_mc_s_fmt_vid_cap(struct file *file, void *priv,
vin->format = f->fmt.pix;
vin->crop.top = 0;
vin->crop.left = 0;
vin->crop.width = vin->format.width;
vin->crop.height = vin->format.height;
vin->compose = vin->crop;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部