From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>,
Jonathan Corbet <corbet@lwn.net>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Subject: [PATCH 4.0 15/60] [media] marvell-ccic: fix YCbCr ordering
Date: Fri, 15 May 2015 16:14:16 -0700 [thread overview]
Message-ID: <20150515231019.283533109@linuxfoundation.org> (raw)
In-Reply-To: <20150515231018.815421141@linuxfoundation.org>
4.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <hans.verkuil@cisco.com>
commit 2a700d8edffdbfb8200332d96c3147e042b337f1 upstream.
Various formats had their byte ordering implemented incorrectly, and
the V4L2_PIX_FMT_UYVY is actually impossible to create, instead you
get V4L2_PIX_FMT_YVYU.
This was working before commit ad6ac452227b7cb93ac79beec092850d178740b1
("add new formats support for marvell-ccic driver"). That commit broke
the original format support and the OLPC XO-1 laptop showed wrong
colors ever since (if you are crazy enough to attempt to run the latest
kernel on it, like I did).
The email addresses of the authors of that patch are no longer valid,
so without a way to reach them and ask them about their test setup
I am going with what I can test on the OLPC laptop.
If this breaks something for someone on their non-OLPC setup, then
contact the linux-media mailinglist. My suspicion however is that
that commit went in untested.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/marvell-ccic/mcam-core.c | 14 +++++++-------
drivers/media/platform/marvell-ccic/mcam-core.h | 8 ++++----
2 files changed, 11 insertions(+), 11 deletions(-)
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -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_
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_
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,
--- a/drivers/media/platform/marvell-ccic/mcam-core.h
+++ b/drivers/media/platform/marvell-ccic/mcam-core.h
@@ -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 */
next prev parent reply other threads:[~2015-05-15 23:16 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 23:14 [PATCH 4.0 00/60] 4.0.4-stable review Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 01/60] x86/spinlocks: Fix regression in spinlock contention detection Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 02/60] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 03/60] x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 04/60] ACPI / PNP: add two IDs to list for PNPACPI device enumeration Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 05/60] ocfs2: dlm: fix race between purge and get lock resource Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 06/60] rtc: armada38x: fix concurrency access in armada38x_rtc_set_time Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 07/60] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 08/60] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 09/60] gpio: sysfs: fix memory leaks and device hotplug Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 10/60] mnt: Fix fs_fully_visible to verify the root directory is visible Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 11/60] mm/memory-failure: call shake_page() when error hits thp tail page Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 12/60] path_openat(): fix double fput() Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 13/60] writeback: use |1 instead of +1 to protect against div by zero Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 14/60] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Greg Kroah-Hartman
2015-05-15 23:14 ` Greg Kroah-Hartman [this message]
2015-05-15 23:14 ` [PATCH 4.0 16/60] vfio: Fix runaway interruptible timeout Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 17/60] xen/events: Clear cpu_evtchn_mask before resuming Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 18/60] xen/xenbus: Update xenbus event channel on resume Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 19/60] xen/console: Update console " Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 20/60] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq() Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 21/60] xen-pciback: Add name prefix to global permissive variable Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 22/60] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY" Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 23/60] block: destroy bdi before blockdev is unregistered Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 24/60] blk-mq: fix race between timeout and CPU hotplug Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 25/60] blk-mq: fix CPU hotplug handling Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 26/60] ARM: dts: OMAP3-N900: Add microphone bias voltages Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 27/60] ARM: dts: imx25: Add #pwm-cells to pwm4 Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 28/60] ARM: dts: imx6: phyFLEX: USB VBUS control is active-high Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 29/60] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 30/60] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0 Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 31/60] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 32/60] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 33/60] ARM: OMAP2+: Fix omap off idle power consumption creeping up Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 34/60] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 35/60] ARM: ux500: Move GPIO regulator for SD-card into board DTSs Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 36/60] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 37/60] ARM: ux500: Enable GPIO regulator for SD-card for snowball Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 40/60] drm/i915: Add missing MacBook Pro models with dual channel LVDS Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 41/60] drm/i915/dp: there is no audio on port A Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 42/60] drm/amdkfd: allow unregister process with queues Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 43/60] drm/amdkfd: Initialize sdma vm when creating sdma queue Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 45/60] drm/radeon: dont setup audio on asics that dont support it Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 50/60] pinctrl: Dont just pretend to protect pinctrl_maps, do it for real Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 51/60] mmc: card: Dont access RPMB partitions for normal read/write Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 52/60] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 53/60] mmc: sh_mmcif: Fix timeout value for command request Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 54/60] ARM: 8307/1: psci: move psci firmware calls out of line Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 55/60] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 56/60] coredump: accept any write method Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 57/60] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 58/60] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Greg Kroah-Hartman
2015-05-15 23:15 ` [PATCH 4.0 59/60] ACPICA: Utilities: Cleanup to convert physical address printing formats Greg Kroah-Hartman
2015-05-15 23:15 ` [PATCH 4.0 60/60] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers Greg Kroah-Hartman
2015-05-16 3:16 ` [PATCH 4.0 00/60] 4.0.4-stable review Guenter Roeck
2015-05-16 15:26 ` Greg Kroah-Hartman
2015-05-16 3:16 ` Shuah Khan
2015-05-16 15:27 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150515231019.283533109@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=corbet@lwn.net \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox