Imx8mPlus IPU error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Imx8mPlus IPU error

Jump to solution
655 Views
kevin_huang1
Contributor I

Dear Sir,

I am using Imx8mPlus and yocto-L5.10.35_2.0.0.

It seems that the IPU error occurs during compiler linux kernel.

I turn on the config in kernel as below:

CONFIG_MXC_IPU=y
CONFIG_MXC_IPU_V3=y

and apply below patch:

diff --git a/drivers/media/platform/mxc/capture/ipu_csi_enc.c b/drivers/media/platform/mxc/capture/ipu_csi_enc.c
index 241c744bfcb0..86ee9394fc0c 100644
--- a/drivers/media/platform/mxc/capture/ipu_csi_enc.c
+++ b/drivers/media/platform/mxc/capture/ipu_csi_enc.c
@@ -239,7 +239,7 @@ static int csi_enc_enabling_tasks(void *private)

cam->dummy_frame.vaddress = dma_alloc_coherent(cam->dev,
PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage),
- &cam->dummy_frame.paddress,
+ (dma_addr_t *) &cam->dummy_frame.paddress,
GFP_DMA | GFP_KERNEL);
if (cam->dummy_frame.vaddress == 0) {
pr_err("ERROR: v4l2 capture: Allocate dummy frame "
diff --git a/drivers/media/platform/mxc/capture/ipu_prp_enc.c b/drivers/media/platform/mxc/capture/ipu_prp_enc.c
index c26ef944cb46..d2509572aac2 100644
--- a/drivers/media/platform/mxc/capture/ipu_prp_enc.c
+++ b/drivers/media/platform/mxc/capture/ipu_prp_enc.c
@@ -383,7 +383,7 @@ static int prp_enc_enabling_tasks(void *private)

cam->dummy_frame.vaddress = dma_alloc_coherent(cam->dev,
PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage),
- &cam->dummy_frame.paddress,
+ (dma_addr_t *) &cam->dummy_frame.paddress,
GFP_DMA | GFP_KERNEL);
if (cam->dummy_frame.vaddress == 0) {
pr_err("ERROR: v4l2 capture: Allocate dummy frame "
diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
index a7444ce375c7..688b77e8f31f 100644
--- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
@@ -266,7 +266,7 @@ static int mxc_allocate_frame_buf(cam_data *cam, int count)
cam->frame[i].vaddress =
dma_alloc_coherent(cam->dev,
PAGE_ALIGN(cam->v2f.fmt.pix.sizeimage),
- &cam->frame[i].paddress,
+ (dma_addr_t *) &cam->frame[i].paddress,
GFP_DMA | GFP_KERNEL);
if (cam->frame[i].vaddress == 0) {
pr_err("ERROR: v4l2 capture: "
diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c
index 86e93e418e36..f1b4726c281f 100644
--- a/drivers/mxc/ipu3/ipu_device.c
+++ b/drivers/mxc/ipu3/ipu_device.c
@@ -557,7 +557,7 @@ static void dump_task_info(struct ipu_task_entry *t)
dev_dbg(t->dev, "[0x%p]\tcrop.pos.y = %d\n",
(void *)t, t->input.crop.pos.y);
dev_dbg(t->dev, "[0x%p]input buffer:\n", (void *)t);
- dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%x\n", (void *)t, t->input.paddr);
+ dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%llx\n", (void *)t, t->input.paddr);
dev_dbg(t->dev, "[0x%p]\ti_off = 0x%x\n", (void *)t, t->set.i_off);
dev_dbg(t->dev, "[0x%p]\ti_uoff = 0x%x\n", (void *)t, t->set.i_uoff);
dev_dbg(t->dev, "[0x%p]\ti_voff = 0x%x\n", (void *)t, t->set.i_voff);
@@ -566,7 +566,7 @@ static void dump_task_info(struct ipu_task_entry *t)
dev_dbg(t->dev, "[0x%p]deinterlace enabled with:\n", (void *)t);
if (t->input.deinterlace.motion != HIGH_MOTION) {
dev_dbg(t->dev, "[0x%p]\tlow/medium motion\n", (void *)t);
- dev_dbg(t->dev, "[0x%p]\tpaddr_n = 0x%x\n",
+ dev_dbg(t->dev, "[0x%p]\tpaddr_n = 0x%llx\n",
(void *)t, t->input.paddr_n);
} else
dev_dbg(t->dev, "[0x%p]\thigh motion\n", (void *)t);
@@ -584,7 +584,7 @@ static void dump_task_info(struct ipu_task_entry *t)
(void *)t, t->output.crop.pos.y);
dev_dbg(t->dev, "[0x%p]\trotate = %d\n", (void *)t, t->output.rotate);
dev_dbg(t->dev, "[0x%p]output buffer:\n", (void *)t);
- dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%x\n", (void *)t, t->output.paddr);
+ dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%llx\n", (void *)t, t->output.paddr);
dev_dbg(t->dev, "[0x%p]\to_off = 0x%x\n", (void *)t, t->set.o_off);
dev_dbg(t->dev, "[0x%p]\to_uoff = 0x%x\n", (void *)t, t->set.o_uoff);
dev_dbg(t->dev, "[0x%p]\to_voff = 0x%x\n", (void *)t, t->set.o_voff);
@@ -607,7 +607,7 @@ static void dump_task_info(struct ipu_task_entry *t)
dev_dbg(t->dev, "[0x%p]\tcrop.pos.y = %d\n",
(void *)t, t->overlay.crop.pos.y);
dev_dbg(t->dev, "[0x%p]overlay buffer:\n", (void *)t);
- dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%x\n",
+ dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%llx\n",
(void *)t, t->overlay.paddr);
dev_dbg(t->dev, "[0x%p]\tov_off = 0x%x\n",
(void *)t, t->set.ov_off);
@@ -620,7 +620,7 @@ static void dump_task_info(struct ipu_task_entry *t)
if (t->overlay.alpha.mode == IPU_ALPHA_MODE_LOCAL) {
dev_dbg(t->dev, "[0x%p]local alpha enabled with:\n",
(void *)t);
- dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%x\n",
+ dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%llx\n",
(void *)t, t->overlay.alpha.loc_alp_paddr);
dev_dbg(t->dev, "[0x%p]\tov_alpha_off = 0x%x\n",
(void *)t, t->set.ov_alpha_off);
@@ -2829,7 +2829,7 @@ static void do_task(struct ipu_task_entry *t)
dev_dbg(t->dev, "[0x%p]\tformat = 0x%x\n", (void *)t, t->set.r_fmt);
dev_dbg(t->dev, "[0x%p]\twidth = %d\n", (void *)t, t->set.r_width);
dev_dbg(t->dev, "[0x%p]\theight = %d\n", (void *)t, t->set.r_height);
- dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%x\n", (void *)t, t->set.r_paddr);
+ dev_dbg(t->dev, "[0x%p]\tpaddr = 0x%llx\n", (void *)t, t->set.r_paddr);
dev_dbg(t->dev, "[0x%p]\trstride = %d\n", (void *)t, t->set.r_stride);

ret = init_ic(ipu, t);
@@ -3561,7 +3561,7 @@ static long mxc_ipu_ioctl(struct file *file,
return -EFAULT;
}

- dev_dbg(ipu_dev, "allocated %d bytes @ 0x%08X\n",
+ dev_dbg(ipu_dev, "allocated %d bytes @ 0x%08llX\n",
mem->size, mem->phy_addr);

break;
@@ -3590,7 +3590,7 @@ static long mxc_ipu_ioctl(struct file *file,
}
mutex_unlock(&ipu_alloc_lock);
if (0 == ret)
- dev_dbg(ipu_dev, "free %d bytes @ 0x%08X\n",
+ dev_dbg(ipu_dev, "free %d bytes @ 0x%08llX\n",
mem->size, mem->phy_addr);

break;
@@ -3649,7 +3649,7 @@ static int mxc_ipu_release(struct inode *inode, struct file *file)
mem->size,
mem->cpu_addr,
mem->phy_addr);
- dev_dbg(ipu_dev, "rel-free %d bytes @ 0x%08X\n",
+ dev_dbg(ipu_dev, "rel-free %d bytes @ 0x%08llX\n",
mem->size, mem->phy_addr);
kfree(mem);
}
diff --git a/arch/arm64/include/asm/outercache.h b/arch/arm64/include/asm/outercache.h
new file mode 100644
index 000000000000..1137a8e97d6f
--- /dev/null
+++ b/arch/arm64/include/asm/outercache.h
@@ -0,0 +1 @@
+#include "../../../arm/include/asm/outercache.h"

 

However, It seems that IPU error occurs as below .

GEN Makefile
CALL /home/imx8mpevk/yocto-5.10.35/fic-src/linux-imx/scripts/atomic/check-atomics.sh
CALL /home/imx8mpevk/yocto-5.10.35/fic-src/linux-imx/scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/mxc/ipu3/ipu_device.o
/home/imx8mpevk/yocto-5.10.35/fic-src/linux-imx/drivers/mxc/ipu3/ipu_device.c: In function 'vdi_split_process':
/home/imx8mpevk/yocto-5.10.35/fic-src/linux-imx/drivers/mxc/ipu3/ipu_device.c:2500:4: error: implicit declaration of function 'dmac_flush_range'; did you mean 'outer_flush_range'? [-Werror=implicit-function-declaration]
2500 | dmac_flush_range(base_off + offset_addr,

 

Q1.

How can we resolve this error? 

Best Regards,

Kevin Huang

0 Kudos
1 Solution
651 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Kevin,

 

Those driver are for the MX6, since MX8Mplus don't have IPU.

 

Regards

View solution in original post

0 Kudos
1 Reply
652 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Kevin,

 

Those driver are for the MX6, since MX8Mplus don't have IPU.

 

Regards

0 Kudos