summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorRobby Cai <robby.cai@nxp.com>2017-12-07 20:22:25 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit1b6b4cbe55470009859207b54e232329cc5f8b7e (patch)
treee5673c6825dfc8a6310f1727eba7c55809e8cefd /drivers/media/platform
parent542651739e98f830c82773b0b5dc8f254a5d8753 (diff)
MLK-17058 media: csi: fix spurious warning message
When boot up with 4K HDMI display, and at same time do a capture with 720p (or above), meet following message. [ 241.572132] mx6s-csi 30a90000.csi1_bridge: 82300000 != 82300000 [ 241.604974] mx6s-csi 30a90000.csi1_bridge: 82700000 != 82700000 [ 241.638305] mx6s-csi 30a90000.csi1_bridge: 82b00000 != 82b00000 [ 241.704969] mx6s-csi 30a90000.csi1_bridge: 82300000 != 82300000 ... cast the type of unsigned long to unsigned int before compare two variables to fix it. Signed-off-by: Robby Cai <robby.cai@nxp.com> Reviewed-by: Sandor Yu <sandor.yu@nxp.com> (cherry picked from commit 0972b05917dd5bd3d6aa28e57b7181d647da28b8)
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/mxc/capture/mx6s_capture.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/platform/mxc/capture/mx6s_capture.c b/drivers/media/platform/mxc/capture/mx6s_capture.c
index 4b89e0441b71..262618c0c076 100644
--- a/drivers/media/platform/mxc/capture/mx6s_capture.c
+++ b/drivers/media/platform/mxc/capture/mx6s_capture.c
@@ -997,6 +997,8 @@ static void mx6s_csi_frame_done(struct mx6s_csi_dev *csi_dev,
struct mx6s_buffer *buf;
struct vb2_buffer *vb;
unsigned long phys;
+ unsigned int phys_fb1;
+ unsigned int phys_fb2;
ibuf = list_first_entry(&csi_dev->active_bufs, struct mx6s_buf_internal,
queue);
@@ -1013,14 +1015,16 @@ static void mx6s_csi_frame_done(struct mx6s_csi_dev *csi_dev,
vb = &buf->vb.vb2_buf;
phys = vb2_dma_contig_plane_dma_addr(vb, 0);
if (bufnum == 1) {
- if (csi_read(csi_dev, CSI_CSIDMASA_FB2) != phys) {
+ phys_fb2 = csi_read(csi_dev, CSI_CSIDMASA_FB2);
+ if (phys_fb2 != (u32)phys) {
dev_err(csi_dev->dev, "%lx != %x\n", phys,
- csi_read(csi_dev, CSI_CSIDMASA_FB2));
+ phys_fb2);
}
} else {
- if (csi_read(csi_dev, CSI_CSIDMASA_FB1) != phys) {
+ phys_fb1 = csi_read(csi_dev, CSI_CSIDMASA_FB1);
+ if (phys_fb1 != (u32)phys) {
dev_err(csi_dev->dev, "%lx != %x\n", phys,
- csi_read(csi_dev, CSI_CSIDMASA_FB1));
+ phys_fb1);
}
}
dev_dbg(csi_dev->dev, "%s (vb=0x%p) 0x%p %lu\n", __func__, vb,