author | zhiwei.yuan <zhiwei.yuan@amlogic.com> | 2019-10-08 07:26:08 (GMT) |
---|---|---|
committer | zihuan.ling <zihuan.ling@amlogic.com> | 2019-10-12 01:47:55 (GMT) |
commit | 4371fd7fa38bd7c2f7fa4ab3610fe794351147ce (patch) | |
tree | c3f0bb707dca2e6981504c3b9d57b8a78fc2560e | |
parent | b9932b505b6c8e33612b8be91be5e1f1495c2002 (diff) | |
download | common-4371fd7fa38bd7c2f7fa4ab3610fe794351147ce.zip common-4371fd7fa38bd7c2f7fa4ab3610fe794351147ce.tar.gz common-4371fd7fa38bd7c2f7fa4ab3610fe794351147ce.tar.bz2 |
vdin: [side-effect]hdmi 4k,garbage is seen at the bottom [1/1]
PD#SWPL-14760
Problem:
There's no enough mem for screen cap
Solution:
Inc mem only for HDMI 4k afbce
Verify:
verified by t962x2_x301
Change-Id: I688bc67f5b9f754ae3db9fa650778cf36eec18dc
Signed-off-by: zhiwei.yuan <zhiwei.yuan@amlogic.com>
-rw-r--r-- | drivers/amlogic/media/vin/tvin/vdin/vdin_canvas.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/amlogic/media/vin/tvin/vdin/vdin_canvas.c b/drivers/amlogic/media/vin/tvin/vdin/vdin_canvas.c index 2620009..112d469 100644 --- a/drivers/amlogic/media/vin/tvin/vdin/vdin_canvas.c +++ b/drivers/amlogic/media/vin/tvin/vdin/vdin_canvas.c @@ -523,8 +523,11 @@ unsigned int vdin_cma_alloc(struct vdin_dev_s *devp) /*for almost uncompressed pattern,garbage at bottom *1024x1658 is the worst case,each page wast 2160x3x256byte for 4096 *since every block must not be separated by 2 pages + *screen cap & v4l2 debug doesn't use afbce,no need inc mem */ - mem_size += 1024 * 1658; + if (!(devp->parm.reserved & PARAM_STATE_SCREENCAP) && + (!(devp->flags & VDIN_FLAG_V4L2_DEBUG))) + mem_size += 1024 * 1658; if ((devp->format_convert >= VDIN_FORMAT_CONVERT_YUV_NV12) && (devp->format_convert <= VDIN_FORMAT_CONVERT_RGB_NV21)) |