From patchwork Tue Jan 29 02:32:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kasireddy, Vivek" X-Patchwork-Id: 10785337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED24B13B5 for ; Tue, 29 Jan 2019 02:51:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5A5E2AE5F for ; Tue, 29 Jan 2019 02:51:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9D392B561; Tue, 29 Jan 2019 02:51:08 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 77E1D2AE5F for ; Tue, 29 Jan 2019 02:51:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727119AbfA2CvH (ORCPT ); Mon, 28 Jan 2019 21:51:07 -0500 Received: from mga01.intel.com ([192.55.52.88]:27600 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbfA2CvH (ORCPT ); Mon, 28 Jan 2019 21:51:07 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jan 2019 18:51:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,535,1539673200"; d="scan'208";a="139627962" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga004.fm.intel.com with ESMTP; 28 Jan 2019 18:51:06 -0800 Received: from vkasired-desk2.fm.intel.com (10.22.254.140) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 28 Jan 2019 18:51:06 -0800 From: Vivek Kasireddy To: CC: "Kasireddy, Vivek" Subject: [PATCH] media: v4l2-tpg: Fix the memory layout of AYUV buffers Date: Mon, 28 Jan 2019 18:32:22 -0800 Message-ID: <20190129023222.10036-1-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.14.5 MIME-Version: 1.0 X-Originating-IP: [10.22.254.140] 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 From: "Kasireddy, Vivek" The memory layout of AYUV buffers (V4L2_PIX_FMT_YUV32) should be similar to V4L2_PIX_FMT_ABGR32 instead of V4L2_PIX_FMT_ARGB32. While displaying the packed AYUV buffers generated by the Vivid driver using v4l2-tpg on Weston, it was observed that these AYUV images were not getting displayed correctly. Changing the memory layout makes them display as expected. Signed-off-by: Vivek Kasireddy --- drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c index d9a590ae7545..825667f67c92 100644 --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c @@ -1269,7 +1269,6 @@ static void gen_twopix(struct tpg_data *tpg, case V4L2_PIX_FMT_HSV32: alpha = 0; /* fall through */ - case V4L2_PIX_FMT_YUV32: case V4L2_PIX_FMT_ARGB32: buf[0][offset] = alpha; buf[0][offset + 1] = r_y_h; @@ -1280,6 +1279,7 @@ static void gen_twopix(struct tpg_data *tpg, case V4L2_PIX_FMT_XBGR32: alpha = 0; /* fall through */ + case V4L2_PIX_FMT_YUV32: case V4L2_PIX_FMT_ABGR32: buf[0][offset] = b_v; buf[0][offset + 1] = g_u_s;