From patchwork Sat Oct 22 07:24:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7848 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1154117wrr; Sat, 22 Oct 2022 04:07:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5SLChkcKVNEbnyTv8tx/G9yGsMl7dq7sTLmo5vTca8tON92QAR48ccB/4xTX20AfKk1I6n X-Received: by 2002:aa7:8b13:0:b0:55f:69de:d17c with SMTP id f19-20020aa78b13000000b0055f69ded17cmr23596381pfd.20.1666436856873; Sat, 22 Oct 2022 04:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666436856; cv=none; d=google.com; s=arc-20160816; b=DaCg2kNUyvjU/LhZHzzczt4WktSaiwMkArbax3Un/t1+zZYwVE+8jf5Nfz4UZOP+Ri opr31W4SFPbyQIWHatcKBNlZwIk0090TW8wiayTK6qSVyZy0Jg0jm/3l/LkqwDQTlvQk BO1SPg55TJz0REyNuOxmitllGASCdE4g8/aggUzPpb1VsPCfHg/FgrKKIjLEHq03/6q7 ZN0J6LZlNQ6sAmQLmKYmZUfXaVAghmbYZoqKwnJKpjr2LQUujZtljtT2l0fQRmNXLD2c HzjE8OEhIDpAqqxvHu6JllLMfN8FwLJu5ADxh/hOdhDs8EGCt1tb60EvoLqfAxaEWQ7R /8Ag== 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=RhT0EvohbRLuAjC8lXdzii5Ee0Y6C2nS9gJLL4MEaFA=; b=jRiYHOEUuHL2WWmLKjumyr5Csf2/CCwjjXyhKf2VF4dfRamcveJVyFpmsU36+7LtIW MLf19CcKPpdKh6WoVuOoPn6Fo3sCgAB/BOpJUbYoHRd7OQx4sxvlkffkM4GJcTjiuax4 A6bynbT2R+ow2bv8Gn4u/oP5mdqdBFk83vsCRyxNdVk6NIgmj+0pSEVaqY42bTQ4WaeQ XP0qydmmmoVOlT3i3ZMdRlZTIfYFiwQYv90o2LG0d7cpx9m+i90urI0X6RlEsHlOazs0 sQPeinpymoVeULPWmaKB8+8wMRupCJU11aKLmpIXGUShj0Yj+z5fynL489gEPvtWjDoA sE1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="YTh/jYIz"; 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 d21-20020a056a0024d500b00565ec924efasi28466806pfv.365.2022.10.22.04.07.24; Sat, 22 Oct 2022 04:07:36 -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="YTh/jYIz"; 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 S231150AbiJVLDh (ORCPT + 99 others); Sat, 22 Oct 2022 07:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbiJVLCm (ORCPT ); Sat, 22 Oct 2022 07:02:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F3F22FA5F1; Sat, 22 Oct 2022 03:21:13 -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 ams.source.kernel.org (Postfix) with ESMTPS id 17C89B82DFB; Sat, 22 Oct 2022 07:53:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 534ACC433D6; Sat, 22 Oct 2022 07:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425210; bh=h5rZI2DhtyRw6JJ9HZ5Nms1rZq9aonnNTsh+tp6sooA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YTh/jYIz+yZ5iHvht3bMcRkjEciWsjQ1Q/TIUuA8gCkQhUsCjNEORcgP5fGJ/uwfs sAQ/mJlO4CCNoeGFpwEcmubqSnHxtZYEUnLIPcLYzFF7m6HU97NJks/MB0ehUvywxM +wz+V7LMQquAdUDkVfOUEP/96DYyFPrHh2jDcGcw= 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 5.19 398/717] media: amphion: dont change the colorspace reported by decoder. Date: Sat, 22 Oct 2022 09:24:37 +0200 Message-Id: <20221022072515.462478704@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@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?1747385693892751718?= X-GMAIL-MSGID: =?utf-8?q?1747385693892751718?= 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 44dbca0fe17f..6d6842ff12e2 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) @@ -1556,6 +1548,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; }