forked from luck/tmp_suning_uos_patched
media fixes for v4.1-rc3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJVSIvdAAoJEAhfPr2O5OEVegMQAI53Jv5ls3uauICyh6Cd+KJW
PowBTV041kFefzZf/1QzoJRaGFsXJlkK6ZVv1PsTyfnR02z+2r0dFpTRJHtWK+08
CbbXbWi7wmQXya6mb+c6heWVZa/NAH+DYbDZwrSLUeHgOst13SUMKefLr90kjhBv
ay08WsL3P9fZMwRUOndE57qGkBZ1w+Irp12VYk+Udt8F1ImTxfcJFulazD5DGWO0
JjoYzO1mlRlp7wVkhKfQJd/fjCgHWlFGUV4aH6i6N6nh3RtU5X03eNDmGLiHcn/z
7fHOB2DNtsEDWqmXLpLwdndt9rmFYmV3pk/vjQDaJmNLS+FojUmrPC5xdOe1e2SW
ikzQr5BgIGnvl4n7SIECzutjX9knxuhtGRU1myiRVBDcyVmR2e9+Gx3xTmo9Lg7I
mXbxQx7yZHqpHP9cA6Ih8fCAwqqxysKrRUlfHG0J1/G3iVGbVYTnlSTDeTTkdg5k
2vpAfxbH5iqwCmcvpNSitU2vCNNF8IOOhTI2LvT5OZk9H2cK0YpfWIozK1KSxefT
8X3NQ5Tt+lqOVCdiA81HNZDpm56lVo3YNNalgesrQCQl1bCCo0WEuf+LqjzgMBtA
fRdlYq8KDi9sr6xxfomdD9cuS+SnhTiMpqXTersO8bHEiqKqTOee9IgNsfCr81KI
j/prjUBnL0VgtzmfmbBb
=gmuD
-----END PGP SIGNATURE-----
Merge tag 'media/v4.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
"Three driver fixes:
- fix for omap4, fixing a regression due to a subsystem API that got
removed for 4.1 (commit efde234674
);
- fix for one of the formats supported by Marvel ccic driver;
- fix rcar_vin driver that, when stopping abnormally, the driver
can't return from wait_for_completion"
* tag 'media/v4.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] v4l: omap4iss: Replace outdated OMAP4 control pad API with syscon
[media] media: soc_camera: rcar_vin: Fix wait_for_completion
[media] marvell-ccic: fix Y'CbCr ordering
This commit is contained in:
commit
c02d7da3dd
|
@ -116,8 +116,8 @@ static struct mcam_format_struct {
|
|||
.planar = false,
|
||||
},
|
||||
{
|
||||
.desc = "UYVY 4:2:2",
|
||||
.pixelformat = V4L2_PIX_FMT_UYVY,
|
||||
.desc = "YVYU 4:2:2",
|
||||
.pixelformat = V4L2_PIX_FMT_YVYU,
|
||||
.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8,
|
||||
.bpp = 2,
|
||||
.planar = false,
|
||||
|
@ -748,7 +748,7 @@ static void mcam_ctlr_image(struct mcam_camera *cam)
|
|||
|
||||
switch (fmt->pixelformat) {
|
||||
case V4L2_PIX_FMT_YUYV:
|
||||
case V4L2_PIX_FMT_UYVY:
|
||||
case V4L2_PIX_FMT_YVYU:
|
||||
widthy = fmt->width * 2;
|
||||
widthuv = 0;
|
||||
break;
|
||||
|
@ -784,15 +784,15 @@ static void mcam_ctlr_image(struct mcam_camera *cam)
|
|||
case V4L2_PIX_FMT_YUV420:
|
||||
case V4L2_PIX_FMT_YVU420:
|
||||
mcam_reg_write_mask(cam, REG_CTRL0,
|
||||
C0_DF_YUV | C0_YUV_420PL | C0_YUVE_YVYU, C0_DF_MASK);
|
||||
C0_DF_YUV | C0_YUV_420PL | C0_YUVE_VYUY, C0_DF_MASK);
|
||||
break;
|
||||
case V4L2_PIX_FMT_YUYV:
|
||||
mcam_reg_write_mask(cam, REG_CTRL0,
|
||||
C0_DF_YUV | C0_YUV_PACKED | C0_YUVE_UYVY, C0_DF_MASK);
|
||||
C0_DF_YUV | C0_YUV_PACKED | C0_YUVE_NOSWAP, C0_DF_MASK);
|
||||
break;
|
||||
case V4L2_PIX_FMT_UYVY:
|
||||
case V4L2_PIX_FMT_YVYU:
|
||||
mcam_reg_write_mask(cam, REG_CTRL0,
|
||||
C0_DF_YUV | C0_YUV_PACKED | C0_YUVE_YUYV, C0_DF_MASK);
|
||||
C0_DF_YUV | C0_YUV_PACKED | C0_YUVE_SWAP24, C0_DF_MASK);
|
||||
break;
|
||||
case V4L2_PIX_FMT_JPEG:
|
||||
mcam_reg_write_mask(cam, REG_CTRL0,
|
||||
|
|
|
@ -330,10 +330,10 @@ int mccic_resume(struct mcam_camera *cam);
|
|||
#define C0_YUVE_YVYU 0x00010000 /* Y1CrY0Cb */
|
||||
#define C0_YUVE_VYUY 0x00020000 /* CrY1CbY0 */
|
||||
#define C0_YUVE_UYVY 0x00030000 /* CbY1CrY0 */
|
||||
#define C0_YUVE_XYUV 0x00000000 /* 420: .YUV */
|
||||
#define C0_YUVE_XYVU 0x00010000 /* 420: .YVU */
|
||||
#define C0_YUVE_XUVY 0x00020000 /* 420: .UVY */
|
||||
#define C0_YUVE_XVUY 0x00030000 /* 420: .VUY */
|
||||
#define C0_YUVE_NOSWAP 0x00000000 /* no bytes swapping */
|
||||
#define C0_YUVE_SWAP13 0x00010000 /* swap byte 1 and 3 */
|
||||
#define C0_YUVE_SWAP24 0x00020000 /* swap byte 2 and 4 */
|
||||
#define C0_YUVE_SWAP1324 0x00030000 /* swap bytes 1&3 and 2&4 */
|
||||
/* Bayer bits 18,19 if needed */
|
||||
#define C0_EOF_VSYNC 0x00400000 /* Generate EOF by VSYNC */
|
||||
#define C0_VEDGE_CTRL 0x00800000 /* Detect falling edge of VSYNC */
|
||||
|
|
|
@ -135,6 +135,8 @@
|
|||
#define VIN_MAX_WIDTH 2048
|
||||
#define VIN_MAX_HEIGHT 2048
|
||||
|
||||
#define TIMEOUT_MS 100
|
||||
|
||||
enum chip_id {
|
||||
RCAR_GEN2,
|
||||
RCAR_H1,
|
||||
|
@ -820,7 +822,10 @@ static void rcar_vin_wait_stop_streaming(struct rcar_vin_priv *priv)
|
|||
if (priv->state == STOPPING) {
|
||||
priv->request_to_stop = true;
|
||||
spin_unlock_irq(&priv->lock);
|
||||
wait_for_completion(&priv->capture_stop);
|
||||
if (!wait_for_completion_timeout(
|
||||
&priv->capture_stop,
|
||||
msecs_to_jiffies(TIMEOUT_MS)))
|
||||
priv->state = STOPPED;
|
||||
spin_lock_irq(&priv->lock);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ config VIDEO_OMAP4
|
|||
bool "OMAP 4 Camera support"
|
||||
depends on VIDEO_V4L2=y && VIDEO_V4L2_SUBDEV_API && I2C=y && ARCH_OMAP4
|
||||
depends on HAS_DMA
|
||||
select MFD_SYSCON
|
||||
select VIDEOBUF2_DMA_CONTIG
|
||||
---help---
|
||||
Driver for an OMAP 4 ISS controller.
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/dma-mapping.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -1386,6 +1387,16 @@ static int iss_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, iss);
|
||||
|
||||
/*
|
||||
* TODO: When implementing DT support switch to syscon regmap lookup by
|
||||
* phandle.
|
||||
*/
|
||||
iss->syscon = syscon_regmap_lookup_by_compatible("syscon");
|
||||
if (IS_ERR(iss->syscon)) {
|
||||
ret = PTR_ERR(iss->syscon);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Clocks */
|
||||
ret = iss_map_mem_resource(pdev, iss, OMAP4_ISS_MEM_TOP);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include "iss_ipipe.h"
|
||||
#include "iss_resizer.h"
|
||||
|
||||
struct regmap;
|
||||
|
||||
#define to_iss_device(ptr_module) \
|
||||
container_of(ptr_module, struct iss_device, ptr_module)
|
||||
#define to_device(ptr_module) \
|
||||
|
@ -79,6 +81,7 @@ struct iss_reg {
|
|||
|
||||
/*
|
||||
* struct iss_device - ISS device structure.
|
||||
* @syscon: Regmap for the syscon register space
|
||||
* @crashed: Bitmask of crashed entities (indexed by entity ID)
|
||||
*/
|
||||
struct iss_device {
|
||||
|
@ -93,6 +96,7 @@ struct iss_device {
|
|||
|
||||
struct resource *res[OMAP4_ISS_MEM_LAST];
|
||||
void __iomem *regs[OMAP4_ISS_MEM_LAST];
|
||||
struct regmap *syscon;
|
||||
|
||||
u64 raw_dmamask;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "../../../../arch/arm/mach-omap2/control.h"
|
||||
|
||||
|
@ -140,9 +141,11 @@ int omap4iss_csiphy_config(struct iss_device *iss,
|
|||
* - bit [18] : CSIPHY1 CTRLCLK enable
|
||||
* - bit [17:16] : CSIPHY1 config: 00 d-phy, 01/10 ccp2
|
||||
*/
|
||||
cam_rx_ctrl = omap4_ctrl_pad_readl(
|
||||
OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX);
|
||||
|
||||
/*
|
||||
* TODO: When implementing DT support specify the CONTROL_CAMERA_RX
|
||||
* register offset in the syscon property instead of hardcoding it.
|
||||
*/
|
||||
regmap_read(iss->syscon, 0x68, &cam_rx_ctrl);
|
||||
|
||||
if (subdevs->interface == ISS_INTERFACE_CSI2A_PHY1) {
|
||||
cam_rx_ctrl &= ~(OMAP4_CAMERARX_CSI21_LANEENABLE_MASK |
|
||||
|
@ -166,8 +169,7 @@ int omap4iss_csiphy_config(struct iss_device *iss,
|
|||
cam_rx_ctrl |= OMAP4_CAMERARX_CSI22_CTRLCLKEN_MASK;
|
||||
}
|
||||
|
||||
omap4_ctrl_pad_writel(cam_rx_ctrl,
|
||||
OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX);
|
||||
regmap_write(iss->syscon, 0x68, cam_rx_ctrl);
|
||||
|
||||
/* Reset used lane count */
|
||||
csi2->phy->used_data_lanes = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user