Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp386678imn; Mon, 25 Jul 2022 20:32:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ud7ZB2yt+aFK+11UbysmyBbNNB2eh0ouvYWbfGZnA2hSaP0mnuRaAaT2stOTbduB3MO3zm X-Received: by 2002:a17:907:9693:b0:72f:9cc:63d7 with SMTP id hd19-20020a170907969300b0072f09cc63d7mr12708050ejc.661.1658806366741; Mon, 25 Jul 2022 20:32:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658806366; cv=pass; d=google.com; s=arc-20160816; b=Uk2pn8rPwdOHzr73NdrtNtenno5KtxGciyfwpsjUgJ1ACkkFKUbYsDmJVeZRwP47tm E6noH8sq5QB/+UtD/x+25Z3GHBeSi1L27i+SFzIMPrCSFhSHP2sAKEXMWKfv/Kmsdpkc T3PfOkq7zCc4Nbu0gr4P6elxEqpOT4eatBC+h3AQInJFsPDFcrC0h6vVkN9abiK7c66j nAyaV3n6wJHAxVvZZTCQJWfbu7ckNqiaQ0kH00Ouk/QQRaU4z85kBclJzO7ir/Abfw4A hHM15GbgV3CA+KQCgIqOGPBpb1Ax8ACm35y0ChWl7Z3Wh+KOk7GK3bT+ecZsc6fgAQlc bMVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=GuqCN+bO9wqFCnqBStPQZKMFVBt9uNDeRqK1qGw0Yw8=; b=bfpBtqr68wEpwxIQFTdd06gvhNI7+U5cATUtPfs48YEt1qgi4+akvZmoK7eAB1CQpI EEG/LpwujRycV4RFIl9RMuj47eyvAfxvPle1Ps+2s6iq1yDck6tH1d97dKA8Q2eQTbv9 9OELl3FAhg7fewwhj5dcZFNDNkH20qZYxim2XZbJwJSSbhey0y77x666FzoCTpYZXlI7 c47KlqRdirbEkWOmiFUN0eHs7PSNRmiQgC4ceb8i2mHvla1cWMoxjhMeZLwV7sLAoUIy hHuLF1ayqByKhDNNat0LBeQvnielIwy8M3nJJHtra0mnzoyKvtbZaDQ/BqeXvto83K9e o6vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bNLACiN8; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a05640226c600b0043be972ae5bsi6642931edd.495.2022.07.25.20.32.21; Mon, 25 Jul 2022 20:32:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bNLACiN8; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237194AbiGZDCu (ORCPT + 99 others); Mon, 25 Jul 2022 23:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231151AbiGZDCs (ORCPT ); Mon, 25 Jul 2022 23:02:48 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2055.outbound.protection.outlook.com [40.107.20.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AC74237EF; Mon, 25 Jul 2022 20:02:47 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?pq3UNeMzJbR6OJKTuLPAodOcZevMix1/sw6qF7yTis+tFImenfN5EOR2cm0U?= =?us-ascii?Q?9gKrcyweCe4AC9dkf7lKFxDAa1KST6SNBQkEJM1a6392TorUlf/a2yF9rlDO?= =?us-ascii?Q?yLLF4gYiJB7iFJdlpGgT0C/rD+PHwnsLt9SHtm3UC+ctknTtT0ZE8X5g749X?= =?us-ascii?Q?EfxhcnI3GaGHG8/iUJDlR9JmNvBjsri8aqiKL7w/nz9EwLZD8IgeaGJDK8OE?= =?us-ascii?Q?OXRhm5QoFa0P6m+p3yAJ2dyQQR0S9VdrqWPLX74F1S5/k1gPDcK1psvK6OtM?= =?us-ascii?Q?0KcHQC4SDDyGaYpfHscbfOs+zvkAZsMLKHwuhXtVg+zVfGJpdTjdpzquz/o3?= =?us-ascii?Q?KCV5+Shb5UbqwQdolK35Vjxlh/G0BEqmBzHBg6k+Ixs1zsNXtAncKUKmdFOg?= =?us-ascii?Q?wDzOeMUtWUB9kB59UmPmTu88DbRzkfitBuOxTUu9WbOSL9qh2zUZPon2nXow?= =?us-ascii?Q?dtweD//BHnIMVxuDaD69lXGELuHdX6zhnrnY0Yn0zqJBgTlpax9aMlWlQRpT?= =?us-ascii?Q?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GGVIyQm1kpao728A?= =?us-ascii?Q?2+Pp0hKSDAX8g3kbY3D5ShFO5s9NFymHIu3Xc1YG4pUa3CMoMRg/NZnJgNJ6?= =?us-ascii?Q?YNiIbPHcXv0wx2htMo+wNgkzyB8OjhSg80U3KG7dqxnxt0Y22rduSBtnuFca?= =?us-ascii?Q?CoOI02DASOV2epGFQ2LeP9yydKVRYJBPyu/VJa4z?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7395e43-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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; } -- 2.36.1