vdin: add bin info to vdin1 histogram dump [1/1]

PD#SWPL-11289

Problem:
bin data is missing from vdin1 histogram

Solution:
have histogram bin data copied

Verify:
TL1

Change-Id: I080448b2278e265d7a1649fb57fd6aacc0e6e576
Signed-off-by: Xihai Zhu <xihai.zhu@amlogic.com>
This commit is contained in:
Xihai Zhu
2019-07-09 21:50:40 -04:00
committed by Tao Zeng
parent 0355079e4f
commit 8dc725fbcb
2 changed files with 10 additions and 0 deletions

View File

@@ -1328,6 +1328,7 @@ static void vdin_hist_tgt(struct vdin_dev_s *devp, struct vframe_s *vf)
int ave_luma;
int pix_sum;
ulong flags;
unsigned int i = 0;
spin_lock_irqsave(&devp->hist_lock, flags);
vdin1_hist.sum = vf->prop.hist.luma_sum;
@@ -1349,6 +1350,9 @@ static void vdin_hist_tgt(struct vdin_dev_s *devp, struct vframe_s *vf)
if (vdin1_hist.ave > 255)
vdin1_hist.ave = 255;
for (i = 0; i < 64; i++)
vdin1_hist.hist[i] = vf->prop.hist.gamma[i];
spin_unlock_irqrestore(&devp->hist_lock, flags);
}
@@ -2716,6 +2720,8 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
vdin1_hist_temp.width = vdin1_hist.width;
vdin1_hist_temp.height = vdin1_hist.height;
vdin1_hist_temp.ave = vdin1_hist.ave;
for (i = 0; i < 64; i++)
vdin1_hist_temp.hist[i] = vdin1_hist.hist[i];
spin_unlock_irqrestore(&devp->hist_lock, flags);
if (vdin_dbg_en) {
if (pr_times++ > 10) {
@@ -2724,6 +2730,9 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
vdin1_hist_temp.height,
vdin1_hist_temp.width,
vdin1_hist_temp.ave);
for (i = 0; i < 64; i++)
pr_info("-:vdin1 hist[%d]=%d\n",
i, vdin1_hist_temp.hist[i]);
}
}

View File

@@ -425,6 +425,7 @@ struct vdin_hist_s {
int width;
int height;
int ave;
unsigned short hist[64];
};
struct vdin_v4l2_param_s {