From patchwork Wed Jul 6 23:00:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9217395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7878460467 for ; Wed, 6 Jul 2016 23:14:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6ADC828526 for ; Wed, 6 Jul 2016 23:14:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FA0A28529; Wed, 6 Jul 2016 23:14:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07B2B28526 for ; Wed, 6 Jul 2016 23:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932559AbcGFXOe (ORCPT ); Wed, 6 Jul 2016 19:14:34 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:32777 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932423AbcGFXOe (ORCPT ); Wed, 6 Jul 2016 19:14:34 -0400 Received: by mail-pf0-f195.google.com with SMTP id c74so115948pfb.0 for ; Wed, 06 Jul 2016 16:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JsW4PRJYUDMOt+syLqutIorKko//17LHIqpC1qVKuxo=; b=p5gzXme8xQ8BhByVPvPf16tJDTtCAEKIKGph90wWMzcajbsYKsZf8ZjAd04w1vF9O3 UF1a0XFKlmDn12fEZ4nnBpRAj2TwiYeBG+6Q4UODXxjVt4vTcfy07xFhj1DF2af725Ll mSSOUKgVAsiVguMNPE2lNXQrQC7vqdqj2/iGVkIBy169AgsCVBxnSjwAMeqnBvxFmNF8 C5xPs+DSWBQ+skqvVVHHpXabqlR/P7sx+PdeLpoEHBqlatx0DOp3wNdwiFcV407R1I0C oCI89GyJ8OkRwDsMPw2IHVcF9vNwQb8SKuzPTrREONPL9CbwvnOnSZkmUrXb7p1UZMr9 hzoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JsW4PRJYUDMOt+syLqutIorKko//17LHIqpC1qVKuxo=; b=YkeGMJ4gKzziupInOeWElsv8XLIRQOLhVVREHM2LT2hpZ0XHjaogtCFCng3Gmuutcc ECkvrZ6N+gGP1FXdp90SIXaPJFYOP3ZYI4kJcMK9UYP7LedZ0hl9mHn85ZK84goy7Vlp cz6zbmL6lg2f/lTwcB8aSxoqboAWwJKQrzmj+CJk1uvVwaCXL2NkfBA3u38ZUCQVmSG9 7BsY7SgnaJhsc7BeLRhAhzJrI+E+2rk/wbNyNiEolPE7/Ukuk7xr51Nu55JUJlAQ31sD QgvxjDlZFZ/W/kq+jJduJCtbW7k7st60CoXMjqH3nAafR0OZ95M4hSeejSPUNfQS/KLF oIWw== X-Gm-Message-State: ALyK8tLE9dGOa1Os2HX8D68QEnqxzuprzWFqSq46NtQMbZHpB8T+4INPc0lyrQ2oY47sXA== X-Received: by 10.98.135.193 with SMTP id i184mr46539953pfe.3.1467846056308; Wed, 06 Jul 2016 16:00:56 -0700 (PDT) Received: from mothership.sklembedded.com (c-73-241-2-21.hsd1.ca.comcast.net. [73.241.2.21]) by smtp.googlemail.com with ESMTPSA id v126sm6915578pfb.60.2016.07.06.16.00.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 16:00:55 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH 07/11] media: adv7180: change mbus format to UYVY Date: Wed, 6 Jul 2016 16:00:00 -0700 Message-Id: <1467846004-12731-8-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467846004-12731-1-git-send-email-steve_longerbeam@mentor.com> References: <1467846004-12731-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors now look correct when capturing with the i.mx6 backend. The other option is to set the SWPC bit in register 0x27 to swap the Cr and Cb output samples. Signed-off-by: Steve Longerbeam Acked-by: Lars-Peter Clausen Tested-by: Tim Harvey Acked-by: Tim Harvey Acked-by: Niklas Söderlund --- drivers/media/i2c/adv7180.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index fff887c..427695d 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -654,7 +654,7 @@ static int adv7180_enum_mbus_code(struct v4l2_subdev *sd, if (code->index != 0) return -EINVAL; - code->code = MEDIA_BUS_FMT_YUYV8_2X8; + code->code = MEDIA_BUS_FMT_UYVY8_2X8; return 0; } @@ -664,7 +664,7 @@ static int adv7180_mbus_fmt(struct v4l2_subdev *sd, { struct adv7180_state *state = to_state(sd); - fmt->code = MEDIA_BUS_FMT_YUYV8_2X8; + fmt->code = MEDIA_BUS_FMT_UYVY8_2X8; fmt->colorspace = V4L2_COLORSPACE_SMPTE170M; fmt->width = 720; fmt->height = state->curr_norm & V4L2_STD_525_60 ? 480 : 576;