Re: [RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-20 Thread Bingbu Cao
Andy, On 4/20/21 6:20 PM, Andy Shevchenko wrote: > On Tue, Apr 20, 2021 at 10:48:33AM +0800, Bingbu Cao wrote: >> Intel IPU(Image Processing Unit) has its own (IO)MMU hardware, >> The IPU driver allocates its own page table that is not mapped >> via the DMA, and thus the Inte

[RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-19 Thread Bingbu Cao
fault addr 76406000 [fault reason 06] PTE Read access is not set As IPU is not an external facing device which is not risky, so use IOMMU passthrough mode for Intel IPUs. Fixes: 26f5689592e2 ("media: staging/intel-ipu3: mmu: Implement driver") Signed-off-by: Bingbu Cao --

[PATCH v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-19 Thread Bingbu Cao
fault addr 76406000 [fault reason 06] PTE Read access is not set As IPU is not an external facing device which is not risky, so use IOMMU passthrough mode for Intel IPUs. Fixes: 26f5689592e2 ("media: staging/intel-ipu3: mmu: Implement driver") Signed-off-by: Bingbu Cao --- Cha

[PATCH] iommu: Use passthrough mode for the Intel IPUs

2021-04-18 Thread Bingbu Cao
fault addr 76406000 [fault reason 06] PTE Read access is not set As IPU is not an external facing device which is not risky, so use IOMMU passthrough mode for Intel IPUs. Signed-off-by: Bingbu Cao --- drivers/iommu/intel/iommu.c | 35 +++ drivers

Re: [PATCH 1/1] staging: ipu3-imgu: Move the UAPI header from include under include/uapi

2021-04-13 Thread Bingbu Cao
Reviewed-by: Bingbu Cao On 4/12/21 7:11 PM, Sakari Ailus wrote: > The header defines the user space interface but may be mistaken as > kernel-only header due to its location. Add "uapi" directory under > driver's include directory and move the header there. > > Sugges

Re: [PATCH v2 1/2] media: staging/intel-ipu3: Fix memory leak in imu_fmt

2021-03-17 Thread Bingbu Cao
On 3/17/21 1:50 AM, Ricardo Ribalda wrote: > Hi Bingbu > > Thanks for your review > > On Tue, Mar 16, 2021 at 12:29 PM Bingbu Cao > wrote: >> >> Hi, Ricardo >> >> Thanks for your patch. >> It looks fine for me, do you mind squash 2 patchsets

Re: [PATCH v2 1/2] media: staging/intel-ipu3: Fix memory leak in imu_fmt

2021-03-16 Thread Bingbu Cao
* CSS expects some format on OUT queue */ > - if (i != IPU3_CSS_QUEUE_OUT && > - !imgu_pipe->nodes[inode].enabled) > - fmts[i] = NULL; > } > > if (!try) { > -- Best regards, Bingbu Cao

Re: [PATCH v9 6/7] media: i2c: imx319: Support probe while the device is off

2021-01-28 Thread Bingbu Cao
Reviewed-by: Bingbu Cao On 1/29/21 7:27 AM, Sakari Ailus wrote: > From: Rajmohan Mani > > Tell ACPI device PM code that the driver supports the device being powered > off when the driver's probe function is entered. > > Signed-off-by: Rajmohan Mani > Signed

Re: [PATCH v2 1/1] v4l: ioctl: Fix memory leak in video_usercopy

2021-01-13 Thread Bingbu Cao
On 1/14/21 12:50 PM, Bingbu Cao wrote: > Sakari, > > On 12/21/20 4:11 AM, Sakari Ailus wrote: >> When an IOCTL with argument size larger than 128 that also used array >> arguments were handled, two memory allocations were made but alas, only >> the latt

Re: [PATCH v2 1/1] v4l: ioctl: Fix memory leak in video_usercopy

2021-01-13 Thread Bingbu Cao
@ video_usercopy(struct file *file, unsigned int > orig_cmd, unsigned long arg, > if (video_put_user((void __user *)arg, parg, cmd, orig_cmd)) > err = -EFAULT; > out: > + kvfree(array_buf); > kvfree(mbuf); > return err; > } > -- Best regards, Bingbu Cao

Re: [PATCH][next] media: ov2740: fix dereference before null check on pointer nvm

2020-12-02 Thread Bingbu Cao
2740(i2c_get_clientdata(client)); > + > nvm->nvm_buffer = kzalloc(CUSTOMER_USE_OTP_SIZE, GFP_KERNEL); > if (!nvm->nvm_buffer) > return -ENOMEM; > Reviewed-by: Bingbu Cao -- Best regards, Bingbu Cao

Re: [PATCH 10/18] ipu3-cio2: Rename ipu3-cio2.c to allow module to be built from multiple source files retaining ipu3-cio2 name

2020-11-30 Thread Bingbu Cao
On 12/1/20 2:56 PM, Bingbu Cao wrote: > I see there will be multiple files, but there will be no conflict if keep as > the main > file name unchanged, right? If so, I prefer keep as it was. Oops, I notice you try to build all the files into single module, so please ignore my comm

Re: [PATCH 10/18] ipu3-cio2: Rename ipu3-cio2.c to allow module to be built from multiple source files retaining ipu3-cio2 name

2020-11-30 Thread Bingbu Cao
u3-cio2.o > + > +ipu3-cio2-y += ipu3-cio2-main.o > diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c > b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c > similarity index 100% > rename from drivers/media/pci/intel/ipu3/ipu3-cio2.c > rename to drivers/media/pci/intel/ipu3/ipu3-cio2-main.c > -- Best regards, Bingbu Cao

Re: [PATCH 01/18] property: Return true in fwnode_device_is_available for node types that do not implement this operation

2020-11-30 Thread Bingbu Cao
ol fwnode_device_is_available(const struct fwnode_handle *fwnode) > { > + if (!fwnode_has_op(fwnode, device_is_available)) > + return true; blank line here? > return fwnode_call_bool_op(fwnode, device_is_available); > } > EXPORT_SYMBOL_GPL(fwnode_device_is_available); > -- Best regards, Bingbu Cao

Re: [PATCH] media: ov8856: Remove 3280x2464 mode

2020-11-24 Thread Bingbu Cao
On 11/24/20 6:20 PM, Robert Foss wrote: > On Tue, 24 Nov 2020 at 10:42, Bingbu Cao wrote: >> >> Hi, Robert >> >> I remember that the full size of ov8856 image sensor is 3296x2480 and we can >> get the 3280x2464 >> frames based on current settings. >

Re: [PATCH] media: ov8856: Remove 3280x2464 mode

2020-11-24 Thread Bingbu Cao
Hi, Robert I remember that the full size of ov8856 image sensor is 3296x2480 and we can get the 3280x2464 frames based on current settings. Do you have any issues with this mode? On 11/16/20 11:50 PM, Robert Foss wrote: > 0x3812, 0x00}, > 236 {0x3813, 0x01}, -- Best regards, Bingbu Cao

Re: [PATCH] media: staging/intel-ipu3: css: Correctly reset some memory

2020-08-23 Thread Bingbu Cao
, 0, > sizeof(cfg->scaler_coeffs_chroma)); > - memset(>scaler_coeffs_luma, 0, sizeof(*cfg->scaler_coeffs_luma)); > + memset(>scaler_coeffs_luma, 0, sizeof(cfg->scaler_coeffs_luma)); > do { > phase_step_correction++; > > Reviewed-by: Bingbu Cao -- Best regards, Bingbu Cao

Re: [PATCH v5 0/6] Support running driver's probe for a device powered off

2020-08-14 Thread Bingbu Cao
On 8/14/20 12:11 PM, Bingbu Cao wrote: > > > On 8/10/20 10:27 PM, Sakari Ailus wrote: >> Hi all, >> > ...snip... >> >> The use case is such that there is a privacy LED next to an integrated >> user-facing laptop camera, and this LED is there to signa

Re: [PATCH v5 3/6] ov5670: Support probe whilst the device is in a low power state

2020-08-13 Thread Bingbu Cao
On 8/12/20 5:12 PM, Bingbu Cao wrote: > > > On 8/10/20 10:27 PM, Sakari Ailus wrote: >> Tell ACPI device PM code that the driver supports the device being in a >> low power state when the driver's probe function is entered. >> >> Signed-off-by: Sakari Ai

Re: [PATCH v5 0/6] Support running driver's probe for a device powered off

2020-08-13 Thread Bingbu Cao
en the VCM (I have not figure out who did that), it will also trigger the acpi pm resume/suspend, as the VCM always shares same power rail with camera sensor, so the privacy LED still has a blink. > ...snip... -- Best regards, Bingbu Cao

[PATCH v3] nvmem: core: add sanity check in nvmem_device_read()

2020-08-13 Thread Bingbu Cao
nvmem device read/write could be called directly once nvmem device registered, the sanity check should be done before each nvmem_reg_read/write(). Signed-off-by: Bingbu Cao --- drivers/nvmem/core.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvmem/core.c b/drivers/nvmem

Re: [PATCH v5 3/6] ov5670: Support probe whilst the device is in a low power state

2020-08-12 Thread Bingbu Cao
he matched driver actually can drive until try to streaming the camera, so is it necessary to return appropriate error in .s_stream ops to notify user it is not the hardware that current driver can drive? if no other better way. -- Best regards, Bingbu Cao

Re: [PATCH] nvmem: core: add sanity check in nvmem_device_read()

2020-08-04 Thread Bingbu Cao
On 8/4/20 6:03 PM, Srinivas Kandagatla wrote: > > > On 04/08/2020 10:58, Sakari Ailus wrote: >> Hi Bingbu, >> >> Thank you for the patch. >> >> On Tue, Aug 04, 2020 at 05:13:56PM +0800, Bingbu Cao wrote: >>> nvmem_device_read() could be

[PATCH] nvmem: core: add sanity check in nvmem_device_read()

2020-08-04 Thread Bingbu Cao
nvmem_device_read() could be called directly once nvmem device registered, the sanity check should be done before call nvmem_reg_read() as cell and sysfs read did now. Signed-off-by: Bingbu Cao --- drivers/nvmem/core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvmem

[PATCH v2] MAINTAINERS: Fix email typo and correct name of Tianshu

2020-07-27 Thread Bingbu Cao
Fix the typo in email address of Tianshu Qiu and correct the name. Reported-by: Bjorn Helgaas Signed-off-by: Tianshu Qiu Signed-off-by: Bingbu Cao --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5392f00cec46

[PATCH] MAINTAINERS: Fix email typo and correct name of Tianshu

2020-07-26 Thread Bingbu Cao
Fix the typo in email address of Tianshu Qiu and correct the name. Signed-off-by: Bingbu Cao Signed-off-by: Tianshu Qiu Reported-by: Bjorn Helgaas --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5392f00cec46

Re: [PATCH] staging: media: ipu3: Replace depracated MSI API.

2020-07-19 Thread Bingbu Cao
, 1, PCI_IRQ_MSI); > > - if (r) { > + if (r < 0) { > dev_err(>dev, "failed to enable MSI (%d)\n", r); > return r; > } > -- Best regards, Bingbu Cao

[PATCH] media: ov2740: add NVMEM interface to read customized OTP data

2020-06-12 Thread Bingbu Cao
From: Qingwu Zhang ov2740 includes 512bytes of one-time programmable memory and 256 bytes are reserved for customers which can be used to store customized information. This patch provide an NVMEM interface to support read out the customized data in OTP. Signed-off-by: Bingbu Cao Signed-off

Re: ipu3-imgu 0000:00:05.0: required queues are disabled

2019-01-29 Thread Bingbu Cao
On 01/28/2019 11:45 PM, Kai Heng Feng wrote: Hi Kieran, On Jan 28, 2019, at 4:48 PM, Kieran Bingham wrote: Hi Kai-Heng, On 27/01/2019 05:56, Kai-Heng Feng wrote: Hi, We have a bug report [1] that the ipu3 doesn’t work. Does ipu3 need special userspace to work? Yes, it will need

Re: [PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2019-01-07 Thread Bingbu Cao
On 01/07/2019 07:00 PM, Sakari Ailus wrote: Hi Bingbu, On Mon, Jan 07, 2019 at 10:38:19AM +0800, Bingbu Cao wrote: Hi, Haibing Thanks for your patch, it looks fine for me. Reviewed-by: Bingbu Cao On 12/29/2018 10:45 AM, YueHaibing wrote: css->pipes[pipe].bindex = binary; I'm tak

Re: [PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2019-01-06 Thread Bingbu Cao
Hi, Haibing Thanks for your patch, it looks fine for me. Reviewed-by: Bingbu Cao On 12/29/2018 10:45 AM, YueHaibing wrote: css->pipes[pipe].bindex = binary;