Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1189691pxk; Fri, 2 Oct 2020 03:31:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQW8Zyi+AOMzrFEJN2MVPmqDUNCcXX/UNoY41L4g55CkMYSzGTm+Am7Y0l+0R89HKKfLL4 X-Received: by 2002:a17:906:1f08:: with SMTP id w8mr1496684ejj.181.1601634666116; Fri, 02 Oct 2020 03:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601634666; cv=none; d=google.com; s=arc-20160816; b=jSpE+7KmAdRyBEQGrHKtbGW7OGWtZTspvV52QM+7oaatz+EprSR/ltPFs20e5+GWVC GW1h1JNaulVshLgCfWib6ks4rR92v6ANyCdFjo6jGWd1Ib4IHqX6+EP7oXdqH9W5jr/y wGLFEii6UV/iNCy1s+/LPaCUIqXdvZHRupTcxmP9ASEzk695QaxAJEwCrJsjEoqq9RaF 31zhMsFTnlxLI96xd4HKcV+88VDad2wPpdZ2fUK86HFVlkQNoAE6GWuonKKJgO+kxaga VuyOAPsPG0odYkxTvUVbLavNUAsyCnDvji7DHOLfFt/YfayeaUrQ8ADfvuBHyCFQpLLF WeJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=KXQCMKeYDG6ktwKtVH9Qco0SqdKdx3+YH8aEJfd+3ms=; b=sl+YNcA7UudSua82iMRiQ8WknPrZ6BRQTgTtHZ7el5xYmsndni9CY0XDSgyarcPeM3 UtQtDCxo2PSKWXMHYm+tTziuy6okxfx/7ZRkZF8m6m9eM9vljPlIo2HzUDbn9sKErMmQ 0ZBhOFT54awZlAynwJdmD4buD4yzUeijlzEzYDS9mtjaXRmectPLZ8+Co7CM4SRCRvTT +LHN9GkONKetL8UxZmCs3jVq+Rms5/9ZqD+AfDCurKxO/V7tyeSO1xzouFvewrYPIIhW dosK0I/hNi6gzZX/yidQB0Mtovz3baXnfSLpd/D837FyVc/EXeHGMwQAGJzNI7gWeQun Dm0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n23si710649edw.337.2020.10.02.03.30.43; Fri, 02 Oct 2020 03:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387685AbgJBK3I (ORCPT + 99 others); Fri, 2 Oct 2020 06:29:08 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:23139 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725993AbgJBK3I (ORCPT ); Fri, 2 Oct 2020 06:29:08 -0400 X-IronPort-AV: E=Sophos;i="5.77,327,1596466800"; d="scan'208";a="58760633" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 02 Oct 2020 19:29:06 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B1440422F1FD; Fri, 2 Oct 2020 19:29:04 +0900 (JST) From: Lad Prabhakar To: Hans Verkuil , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Laurent Pinchart , Mauro Carvalho Chehab , UlrichHechtuli+renesas@fpond.eu, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH] media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats Date: Fri, 2 Oct 2020 11:26:52 +0100 Message-Id: <20201002102652.9154-1-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pixelformat in vin priv structure holds V4L2_PIX_FMT_* and not MEDIA_BUS_FMT_* so make sure we check against V4L2_PIX_FMT_* formats while setting the VNIS_REG. Fixes: 8c3e0f67df6c9 ("media: rcar-vin: Extend RAW8 support to all RGB layouts") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das --- Hi Hans, If it isn't too late for v5.10 could you please queue up this patch. Cheers, Prabhakar --- drivers/media/platform/rcar-vin/rcar-dma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c index e9a47b705acc..692dea300b0d 100644 --- a/drivers/media/platform/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/rcar-vin/rcar-dma.c @@ -600,10 +600,10 @@ void rvin_crop_scale_comp(struct rvin_dev *vin) * format in 2 pixel unit hence configure VNIS_REG as stride / 2. */ switch (vin->format.pixelformat) { - case MEDIA_BUS_FMT_SBGGR8_1X8: - case MEDIA_BUS_FMT_SGBRG8_1X8: - case MEDIA_BUS_FMT_SGRBG8_1X8: - case MEDIA_BUS_FMT_SRGGB8_1X8: + case V4L2_PIX_FMT_SBGGR8: + case V4L2_PIX_FMT_SGBRG8: + case V4L2_PIX_FMT_SGRBG8: + case V4L2_PIX_FMT_SRGGB8: stride /= 2; break; default: -- 2.17.1