From patchwork Tue Jul 26 03:02:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12928577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D44BC43334 for ; Tue, 26 Jul 2022 03:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BD5flb5KvM1U3dID5bww17/DUqv8SCkjbfl3w7MrPj8=; b=bRJKCxHc07hfzP w1R35F0Q7rtWTcyp6CuqpCJAyS7Ga3Yc37LTCs1TdaaR9rHhkujKtZ2Ub0ZM9hR0qofbxFTotLWAc l7pz6U76f/3Z4KUdtqM5JH3s9EkeNRaOIhHOQWlzXv2tueA8sqgQBZJCGxioJ55br6I5nU0C5Pd0o Z0vnQspwYsUt4pwMab5U3FomJOne678/chJ0Nk2Fm41A3ejaNDn59s4Vzl7WCqX6MfVnac/m89HnA JXP++He30Y4UrvG2JWgCXE0NNRBRvoLdr/gfODqlUfAJ0uzRE/s7A/mqyUeSYqnU0iJsm+qNPbm9M Om7Pdtl44Q5LYujRy60w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGAqU-0070Gy-0Y; Tue, 26 Jul 2022 03:02:54 +0000 Received: from mail-db8eur05on2065.outbound.protection.outlook.com ([40.107.20.65] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGAqR-0070Fq-Cb for linux-arm-kernel@lists.infradead.org; Tue, 26 Jul 2022 03:02:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XM+J7fn2ts0z8oHf9qXlnhOgwCi76TZ2QAE1IbO7es/in/la+zwCT8VFxLuyKw3CWqIazfITwrppLrPmyXDmqR1ba15NoPgGhApl3/qrfuxeJJyA6VXX4CbpKZZDOczK32G55d0rxLBoReoSMlGPyEB96t4vaKAYiaywpWs69V4uE85LZDS5Bc/Cx2UeC0WdQCAL48kpNxrp6MQK4U42Kcc+VKiKJyK5o3B3POcp+dvcpvfnFO+zuZTxQXt+GLOhYr9Yms5sfw+W9KVPKHQzYQyu53pTNQ1wdJU2IIXmF9ViKWIu+4dbKx1tUODONb1Z8s8QPS1v024M/8NpFNpvZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GuqCN+bO9wqFCnqBStPQZKMFVBt9uNDeRqK1qGw0Yw8=; b=NUjP2EKIsBP7t7JJlviIM4RwpG8AdORSEdhx9ZSme0NyOoraU0neGTwj7ohoX6yRntwcX2svl8gI7f+iYjaqMFLK9RuKF8vHbniX1CzZtCfOsibEe3ceCCE4ddMuIwJF0ogGnkxDfxoZZMtGbO2o0i2vurk1APlzFuQlK1q/98rPtrQ8A7qfqY4keJsQxMaKM53AzRM6lAHMpailVTODRz1DV7j+Rgm80S4Byn2WMjZHPzccNARSUt+uxPqlsSTOT7l1o4wpx2oMGnuEN3mGtuf1/lv4rk2MW9FKu1WrE5hbbShXwcGbtyORwW/ceFRLrRQLpvDdeX2lkdueKQzyEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GuqCN+bO9wqFCnqBStPQZKMFVBt9uNDeRqK1qGw0Yw8=; b=bNLACiN8O4mhICaA7DXJGkwsf/oCp+DwTAM0r0VGxCMi79musXKlG+tWuQSwBrT48c9wP/bcEjIjPxjvxX+c2JpkUiuWYUY/XVj6i3Ik6iMwt7FmlMEw1QI/HI18UfUX2WG2E8piox3n0V71DXhcU6ovs0s1WTCzGrwRWDFDmKA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by DU0PR04MB9370.eurprd04.prod.outlook.com (2603:10a6:10:359::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.24; Tue, 26 Jul 2022 03:02:45 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::5db6:3f08:2e04:33c]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::5db6:3f08:2e04:33c%4]) with mapi id 15.20.5438.023; Tue, 26 Jul 2022 03:02:45 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] media: amphion: don't change the colorspace reported by decoder. Date: Tue, 26 Jul 2022 11:02:29 +0800 Message-Id: <20220726030229.31419-1-ming.qian@nxp.com> X-Mailer: git-send-email 2.36.1 X-ClientProxiedBy: SI2PR02CA0039.apcprd02.prod.outlook.com (2603:1096:4:196::9) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7395e43-a515-4d15-16c0-08da6eb3500c X-MS-TrafficTypeDiagnostic: DU0PR04MB9370:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pDS252xQnColTKLg4MBkgnmupG8wZe2vOn/hivPr+rTxBQ+m3XzOyDYFaXgAwSUmAUCuesg3NWrDINxqu6VguwlUJdQSUE60lcqgMNwvJyxDOA4wWv4gu6wvaBigNKP9WQarj8nFnKCU3wrJY8yuQE8Mdu4Wk4UQjKVuGQFg63L7m7LfuVY8VVVkLzHiuyaNNekHbtQ6e00V1t42xVK2wBJi4YJgR7ZtHQpzgQKFhlXlacA/1OU0zLxus7KZwGm6HAPBkRTPhjRQpIa3iCbIVS75vTE4g1NU2SdeCCzY3Y8ZANQnHwFHS8S9yetBHkkDMHZ25j7WI1iWkhwa7ntZJVPXi6bzOW/zB01FOgUxUTADT9kRpR5u637TXUur1t/lq7tbfytPABM9XA++J7dKmhpAA8zAYtdnG18eL8/axbQ48gMiS0wOUDi0KFGVVRyeGCagUtV57DHHuR/6YBjfdOhSZmWGZ/GOwP8NjzWUawLsxmQpJKs39ilFAP6iuV/LT4dxb69EPq6/+hj3oLDVYzmoxhOJizjqFyhYifkU2qzkVxvoWLDzB7Yk3dIAK/yxRRRBzCWkeYwhIRmChWDk8pi0+cJDesw/KceADrMOIBVbf8TQHG7Vu8jhToxQjq9GeuUmUuJ1vRsD4Lc5ZoB7SC8JLal26oJDpWBMUOBL1DqbRgb7eTgXCeH3wuK6IV5dI3gbVyHbAJl6tcd7HGsI5mzgNm4DBBEi6uRvj7BvfQNPLp4+jb/io4RHV138myS2YJuYYHrTUXpbu86kOUlbjvfHzWwlgZH2c2/At0XM4oo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6341.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(38100700002)(478600001)(1076003)(38350700002)(186003)(66946007)(4326008)(8676002)(316002)(66556008)(36756003)(66476007)(6486002)(6506007)(2906002)(41300700001)(7416002)(6666004)(86362001)(6512007)(26005)(44832011)(8936002)(2616005)(5660300002)(83380400001)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pq3UNeMzJbR6OJKTuLPAodOcZevMix1/sw6qF7yTis+tFImenfN5EOR2cm0U9gKrcyweCe4AC9dkf7lKFxDAa1KST6SNBQkEJM1a6392TorUlf/a2yF9rlDOyLLF4gYiJB7iFJdlpGgT0C/rD+PHwnsLt9SHtm3UC+ctknTtT0ZE8X5g749XEfxhcnI3GaGHG8/iUJDlR9JmNvBjsri8aqiKL7w/nz9EwLZD8IgeaGJDK8OEOXRhm5QoFa0P6m+p3yAJ2dyQQR0S9VdrqWPLX74F1S5/k1gPDcK1psvK6OtM0KcHQC4SDDyGaYpfHscbfOs+zvkAZsMLKHwuhXtVg+zVfGJpdTjdpzquz/o3KCV5+Shb5UbqwQdolK35Vjxlh/G0BEqmBzHBg6k+Ixs1zsNXtAncKUKmdFOgwDzOeMUtWUB9kB59UmPmTu88DbRzkfitBuOxTUu9WbOSL9qh2zUZPon2nXowdtweD//BHnIMVxuDaD69lXGELuHdX6zhnrnY0Yn0zqJBgTlpax9aMlWlQRpTZuaeidNhwQWLrTVYmzLXZZH0qG/Pcm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7395e43-a515-4d15-16c0-08da6eb3500c X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2022 03:02:45.0329 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iLavOTnkwDJMIbjJJ3EMC0wQXYGFHWt+DhWJPM+H0GVSGsqqXJ/3eDCQ6jbHCKVBK88YXcTGKJiLbeCxvNZdaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9370 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_200251_475349_DC68B4FA X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org decoder will report the colorspace information which is parsed from the sequence header, if they are unspecified, just let application to determine it, don't change it in driver. Fixes: 6de8d628df6ef ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian --- drivers/media/platform/amphion/vdec.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/amphion/vdec.c b/drivers/media/platform/amphion/vdec.c index 9e64041cc1c1..feb75dc204de 100644 --- a/drivers/media/platform/amphion/vdec.c +++ b/drivers/media/platform/amphion/vdec.c @@ -808,14 +808,6 @@ static void vdec_init_fmt(struct vpu_inst *inst) inst->cap_format.field = V4L2_FIELD_NONE; else inst->cap_format.field = V4L2_FIELD_SEQ_TB; - if (vdec->codec_info.color_primaries == V4L2_COLORSPACE_DEFAULT) - vdec->codec_info.color_primaries = V4L2_COLORSPACE_REC709; - if (vdec->codec_info.transfer_chars == V4L2_XFER_FUNC_DEFAULT) - vdec->codec_info.transfer_chars = V4L2_XFER_FUNC_709; - if (vdec->codec_info.matrix_coeffs == V4L2_YCBCR_ENC_DEFAULT) - vdec->codec_info.matrix_coeffs = V4L2_YCBCR_ENC_709; - if (vdec->codec_info.full_range == V4L2_QUANTIZATION_DEFAULT) - vdec->codec_info.full_range = V4L2_QUANTIZATION_LIM_RANGE; } static void vdec_init_crop(struct vpu_inst *inst) @@ -1555,6 +1547,14 @@ static int vdec_get_debug_info(struct vpu_inst *inst, char *str, u32 size, u32 i vdec->codec_info.frame_rate.numerator, vdec->codec_info.frame_rate.denominator); break; + case 9: + num = scnprintf(str, size, "colorspace: %d, %d, %d, %d (%d)\n", + vdec->codec_info.color_primaries, + vdec->codec_info.transfer_chars, + vdec->codec_info.matrix_coeffs, + vdec->codec_info.full_range, + vdec->codec_info.vui_present); + break; default: break; }