From patchwork Tue Sep 1 11:16:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 11747987 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5002213B1 for ; Tue, 1 Sep 2020 11:48:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29F3D20707 for ; Tue, 1 Sep 2020 11:48:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HFfmR8X/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29F3D20707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wn+rCsQi8uc1WNo6Bv3vbLnFOEreL/2qj96I8Z8S0Qw=; b=HFfmR8X/UMLpvQLCnRG3a7OGT9 KJsZoYeJNVm5H32F5BzDcuphqKcbe9T7elOSrJzu3r3UAwyglT8Gj0jRcOvbn5J+TPg4lqdvRPV4H t82kXnOYAkFeecLmiayL/iWOMIzOCcJ1WyImRHfS9Dh8Oa7tlaqQXfmF6bXOly08GSvN/3QWmG9Rl bAoEwasiQ52FQpjS4mg2mt8Tj++yIKCCA3jKnxvehZEhkjk1mOwk3+oZnG7j9Yd/Y6QrnmIb12Sqo cHkhYai9/+xM3i+s+1/tjbiboanK42hiChjD7chpFQcWe5JAQhPxtTPu9Ac1UKtJ/sQD1STXpaXU3 od3PEazg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD4H3-0004c5-M7; Tue, 01 Sep 2020 11:16:25 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kD4H1-0004Yd-5l for linux-rockchip@lists.infradead.org; Tue, 01 Sep 2020 11:16:24 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dafna) with ESMTPSA id 98AD9298950 From: Dafna Hirschfeld To: linux-media@vger.kernel.org Subject: [PATCH v4 01/10] media: staging: rkisp1: cap: change RGB24 format to XBGR32 Date: Tue, 1 Sep 2020 13:16:03 +0200 Message-Id: <20200901111612.10552-2-dafna.hirschfeld@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200901111612.10552-1-dafna.hirschfeld@collabora.com> References: <20200901111612.10552-1-dafna.hirschfeld@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200901_071623_310209_4BAFFB21 X-CRM114-Status: GOOD ( 11.99 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mchehab@kernel.org, dafna.hirschfeld@collabora.com, dafna3@gmail.com, tfiga@chromium.org, hverkuil@xs4all.nl, linux-rockchip@lists.infradead.org, helen.koike@collabora.com, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, kernel@collabora.com, ezequiel@collabora.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org According to the TRM [1], the YUV->RGB conversion outputs RGB 888 format with 4 bytes, where the last byte is ignored, using big endian representation: |___X___|___R___|___G___|___B___| 31 24 16 8 0 Which matches format V4L2_PIX_FMT_XBGR32 in little endian representation, so replace it accordingly. "24 bit word". What it means is that 4 bytes are used with 24bit for the RGB and the last byte is ignored. This matches format V4L2_PIX_FMT_XBGR32. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Tomasz Figa --- drivers/staging/media/rkisp1/rkisp1-capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c index 0632582a95b4..f4d5cc3e2f12 100644 --- a/drivers/staging/media/rkisp1/rkisp1-capture.c +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c @@ -276,7 +276,7 @@ static const struct rkisp1_capture_fmt_cfg rkisp1_sp_fmts[] = { }, /* rgb */ { - .fourcc = V4L2_PIX_FMT_RGB24, + .fourcc = V4L2_PIX_FMT_XBGR32, .write_format = RKISP1_MI_CTRL_SP_WRITE_PLA, .output_format = RKISP1_MI_CTRL_SP_OUTPUT_RGB888, }, {