From patchwork Wed Oct 19 08:29:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp266027wrs; Wed, 19 Oct 2022 04:23:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7no4O7xQiylbE2iuWJf7bVO0hGh1bBjm64cGTBBlFjketPKVbya5gNqMKvArHXRuq5883A X-Received: by 2002:a63:da4f:0:b0:43f:6af:74ed with SMTP id l15-20020a63da4f000000b0043f06af74edmr6910452pgj.290.1666178621953; Wed, 19 Oct 2022 04:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178621; cv=none; d=google.com; s=arc-20160816; b=mCS3SDiNnULi90eTpKUHol8yus1BAk4up12RivMOKtGkhoV+oVs6OwtD0Lld570qH0 4+z6Hhk016QPa/yDywZwsdFBOYE6xeTtS1NyDLX26DR8tiBB+YYk/FP0OjGyM6GWciDw SYS4XemH4LSyKEXTQu/RXx3VrpvawcDFr9gEpgrMdGw3T8FQwSeL8E7wF9TeNFSi9E3w 1gz+F+h3f94p4tl0gAOonqBivoA4TbL8Os8W/Ohl90JPdlNisbTYbp31Wh3mrDmmYcv4 NkM1BVsq+nlNjbeV9gwenonSbwZFceBsMzQqs4KgVNqMKibS349l2d/WXurEtraaVIk0 vQgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UmjCuZmX0JhxCzHFet7tHXHBoLaCJoQdSfpQeJ6pVlc=; b=MhcxJjyRBCE6cBUxmMkrhuDheVWrQMbkyiPxVUsPw8auUCdjeDF43GwRphtScVNI14 T5MIlJiH4YgHTcxNSQFghR/MK9Zd7h5hfAcc5qLddOHh3RSauipqJQgswXG2dRe/hdUD /xAiUbJoeO3+JKsErqMbqniz2yOKsT7gse8HWrtlULLfKnNYstczzn9dBdUHHs/kipOu SIDJ1epEdVD7RXHTtazE73fFwzkwwCRHIW+5QB0DoKdFfVSnUGjtVMdVf1droV+wb7me X1ZCj/Wx+iGp2eqc/cYCQRpYlJPQu4hO2QnG2giJI1E/gLleOhXJ5vsxRBD9kzNnrZ1P wVNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dMOMn7qr; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a630a4b000000b0044b8e2abe1csi18747263pgk.170.2022.10.19.04.23.28; Wed, 19 Oct 2022 04:23:41 -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=@linuxfoundation.org header.s=korg header.b=dMOMn7qr; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbiJSLMc (ORCPT + 99 others); Wed, 19 Oct 2022 07:12:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbiJSLL3 (ORCPT ); Wed, 19 Oct 2022 07:11:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08C80152C6F; Wed, 19 Oct 2022 03:38:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 29E0C617F0; Wed, 19 Oct 2022 09:00:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BC2FC433D7; Wed, 19 Oct 2022 09:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170006; bh=S4RSHtuV1Yq7gBtTypNHchaWySqiBm1BQG1Zydq1K/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dMOMn7qrddfAc6xqWngJeM5kpklMQ4xasrJIGZc1fcZOS9wLYORoeTxaeqjagmdzU fwYtyOLqsbJMUI9k79zi71WO7pWmaFj2AxfDuv3QfN1v1HdBRCj12bkU7OMJ5YeC0M XWsoVy9ZVUGQJ6uXkBZhU/ehRYLO9ci/7KFjSvcA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Qian , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.0 492/862] media: amphion: dont change the colorspace reported by decoder. Date: Wed, 19 Oct 2022 10:29:39 +0200 Message-Id: <20221019083311.727638675@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747114914590885518?= X-GMAIL-MSGID: =?utf-8?q?1747114914590885518?= From: Ming Qian [ Upstream commit 61c2698ee60630c6a7d2e99850fa81ff6450270a ] 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- 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; }