Re: [PATCH] staging: bcm2835-camera: Restore return behavior of ctrl_set_bitrate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 24, 2019 at 11:13 PM Stefan Wahren <wahrenst@xxxxxxx> wrote:
>
> The commit 52c4dfcead49 ("Staging: vc04_services: Cleanup in
> ctrl_set_bitrate()") changed the return behavior of ctrl_set_bitrate().
> This breaks probing of bcm2835-camera:
>
>     bcm2835-v4l2: mmal_init: failed to set all camera controls: -3
>     Cleanup: Destroy video encoder
>     Cleanup: Destroy image encoder
>     Cleanup: Destroy video render
>     Cleanup: Destroy camera
>     bcm2835-v4l2: bcm2835_mmal_probe: mmal init failed: -3
>     bcm2835-camera: probe of bcm2835-camera failed with error -3
>
> So restore the old behavior and fix this issue.
>
> Fixes: 52c4dfcead49 ("Staging: vc04_services: Cleanup in ctrl_set_bitrate()")
> Signed-off-by: Stefan Wahren <wahrenst@xxxxxxx>
Tested-by: Peter Robinson <pbrobinson@xxxxxxxxx>

Thanks Stefan, I can confirm this resolves the issue I have seen with
the camera on 5.2 but hadn't had the time to bisect it yet.

Tested with a v2.1 camera module attached to a RPI3A+

Regards,
Peter

> ---
>  drivers/staging/vc04_services/bcm2835-camera/controls.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c
> index d60e378..1c4c9e8 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
> @@ -610,9 +610,11 @@ static int ctrl_set_bitrate(struct bm2835_mmal_dev *dev,
>
>         encoder_out = &dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->output[0];
>
> -       return vchiq_mmal_port_parameter_set(dev->instance, encoder_out,
> -                                            mmal_ctrl->mmal_id, &ctrl->val,
> -                                            sizeof(ctrl->val));
> +       vchiq_mmal_port_parameter_set(dev->instance, encoder_out,
> +                                     mmal_ctrl->mmal_id, &ctrl->val,
> +                                     sizeof(ctrl->val));
> +
> +       return 0;
>  }
>
>  static int ctrl_set_bitrate_mode(struct bm2835_mmal_dev *dev,
> --
> 2.7.4
>
>
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux