Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2116e02a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull media fixes from Mauro Carvalho Chehab:
 - gspca: add needed delay for I2C traffic for sonixb/sonixj cameras
 - gspca: add one missing Kinect USB ID
 - usbvideo: some regression fixes
 - omap3isp: fix some build issues
 - videobuf2: fix video output handling
 - exynos s5p/m5mols: a few regression fixes.

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
  [media] uvcvideo: Cleanup leftovers of partial revert
  [media] uvcvideo: Return -EACCES when trying to set a read-only control
  [media] omap3isp: Don't include <plat/cpu.h>
  [media] s5p-mfc: Fix interrupt error handling routine
  [media] s5p-fimc: Fix return value of __fimc_md_create_flite_source_links()
  [media] m5mols: Fix typo in get_fmt callback
  [media] v4l: vb2: Set data_offset to 0 for single-plane output buffers
  [media] [FOR,v3.8] omap3isp: Don't include deleted OMAP plat/ header files
  [media] gspca_sonixj: Add a small delay after i2c_w1
  [media] gspca_sonixb: Properly wait between i2c writes
  [media] gspca_kinect: add Kinect for Windows USB id
parents 248152b6 68d6f84b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -556,7 +556,7 @@ static int m5mols_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
	mutex_lock(&info->lock);

	format = __find_format(info, fh, fmt->which, info->res_type);
	if (!format)
	if (format)
		fmt->format = *format;
	else
		ret = -EINVAL;
+0 −3
Original line number Diff line number Diff line
@@ -35,9 +35,6 @@
#include <linux/vmalloc.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
#include <plat/iommu.h>
#include <plat/iovmm.h>
#include <plat/omap-pm.h>

#include "ispvideo.h"
#include "isp.h"
+1 −1
Original line number Diff line number Diff line
@@ -593,7 +593,7 @@ static int __fimc_md_create_flite_source_links(struct fimc_md *fmd)
{
	struct media_entity *source, *sink;
	unsigned int flags = MEDIA_LNK_FL_ENABLED;
	int i, ret;
	int i, ret = 0;

	for (i = 0; i < FIMC_LITE_MAX_DEVS; i++) {
		struct fimc_lite *fimc = fmd->fimc_lite[i];
+37 −51
Original line number Diff line number Diff line
@@ -412,39 +412,19 @@ static void s5p_mfc_handle_frame(struct s5p_mfc_ctx *ctx,
}

/* Error handling for interrupt */
static void s5p_mfc_handle_error(struct s5p_mfc_ctx *ctx,
				 unsigned int reason, unsigned int err)
static void s5p_mfc_handle_error(struct s5p_mfc_dev *dev,
		struct s5p_mfc_ctx *ctx, unsigned int reason, unsigned int err)
{
	struct s5p_mfc_dev *dev;
	unsigned long flags;

	/* If no context is available then all necessary
	 * processing has been done. */
	if (ctx == NULL)
		return;

	dev = ctx->dev;
	mfc_err("Interrupt Error: %08x\n", err);
	s5p_mfc_hw_call(dev->mfc_ops, clear_int_flags, dev);
	wake_up_dev(dev, reason, err);

	if (ctx != NULL) {
		/* Error recovery is dependent on the state of context */
		switch (ctx->state) {
	case MFCINST_INIT:
		/* This error had to happen while acquireing instance */
	case MFCINST_GOT_INST:
		/* This error had to happen while parsing the header */
	case MFCINST_HEAD_PARSED:
		/* This error had to happen while setting dst buffers */
	case MFCINST_RETURN_INST:
		/* This error had to happen while releasing instance */
		clear_work_bit(ctx);
		wake_up_ctx(ctx, reason, err);
		if (test_and_clear_bit(0, &dev->hw_lock) == 0)
			BUG();
		s5p_mfc_clock_off();
		ctx->state = MFCINST_ERROR;
		break;
		case MFCINST_RES_CHANGE_INIT:
		case MFCINST_RES_CHANGE_FLUSH:
		case MFCINST_RES_CHANGE_END:
		case MFCINST_FINISHING:
		case MFCINST_FINISHED:
		case MFCINST_RUNNING:
@@ -454,20 +434,26 @@ static void s5p_mfc_handle_error(struct s5p_mfc_ctx *ctx,
			ctx->state = MFCINST_ERROR;
			/* Mark all dst buffers as having an error */
			spin_lock_irqsave(&dev->irqlock, flags);
		s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue, &ctx->dst_queue,
				&ctx->vq_dst);
			s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue,
						&ctx->dst_queue, &ctx->vq_dst);
			/* Mark all src buffers as having an error */
		s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue, &ctx->src_queue,
				&ctx->vq_src);
			s5p_mfc_hw_call(dev->mfc_ops, cleanup_queue,
						&ctx->src_queue, &ctx->vq_src);
			spin_unlock_irqrestore(&dev->irqlock, flags);
		if (test_and_clear_bit(0, &dev->hw_lock) == 0)
			BUG();
		s5p_mfc_clock_off();
			wake_up_ctx(ctx, reason, err);
			break;
		default:
		mfc_err("Encountered an error interrupt which had not been handled\n");
			clear_work_bit(ctx);
			ctx->state = MFCINST_ERROR;
			wake_up_ctx(ctx, reason, err);
			break;
		}
	}
	if (test_and_clear_bit(0, &dev->hw_lock) == 0)
		BUG();
	s5p_mfc_hw_call(dev->mfc_ops, clear_int_flags, dev);
	s5p_mfc_clock_off();
	wake_up_dev(dev, reason, err);
	return;
}

@@ -632,7 +618,7 @@ static irqreturn_t s5p_mfc_irq(int irq, void *priv)
				dev->warn_start)
			s5p_mfc_handle_frame(ctx, reason, err);
		else
			s5p_mfc_handle_error(ctx, reason, err);
			s5p_mfc_handle_error(dev, ctx, reason, err);
		clear_bit(0, &dev->enter_suspend);
		break;

+1 −0
Original line number Diff line number Diff line
@@ -381,6 +381,7 @@ static const struct sd_desc sd_desc = {
/* -- module initialisation -- */
static const struct usb_device_id device_table[] = {
	{USB_DEVICE(0x045e, 0x02ae)},
	{USB_DEVICE(0x045e, 0x02bf)},
	{}
};

Loading