From patchwork Tue Jul 11 12:57:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WXVuZmVpIERvbmcgKOiRo+S6kemjnik=?= X-Patchwork-Id: 11865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp479913vqm; Tue, 11 Jul 2023 06:29:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlHoPWEUcn/krR+OWgPkk/c8Q2Bw6xUzJ/RmxkHzq3EsfLup9SGY5etJTzC4hITYJ+iPGbSM X-Received: by 2002:a17:907:3c0a:b0:98e:370c:be69 with SMTP id gh10-20020a1709073c0a00b0098e370cbe69mr18370074ejc.6.1689082198535; Tue, 11 Jul 2023 06:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689082198; cv=none; d=google.com; s=arc-20160816; b=vBey79b3FwfTNdwu7OxtB/Rr6lejKik04ShQNiKEQ0DSTEW+BOAPsl4gk0wXcC0T00 xSXVN4TA/sy6NQK/Ee7k4lDZWV7zwwMiBf5Wqi1uJSyU/TlIWXRntvi6KZr1rIoupuac 7E5sNbgtpWQ8Yj2SHutzK7nkkruPMgQtkELY3r5Ks+l0eXcpIp7fPmHj7O/fmuvggsAy gmmQo2CWlLDiIUSTXdrhd0v6JKbDZrsbxRIMedARQQdzSJXFb26yFFN3uIHwL+1rNPj+ 4zwuAfxpWxsrQgapGGhPTaklro2l/mZ8HFFwJ31s46khgTVlhMCU9hquUhhBiTJfdEQc 0+CQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=MaO4Pp49q26ZvXTVzU2ZtIU90FsXfRWQRbJkJwwgleA=; fh=xPbS+/DX5PtuKYqmiu+tTQOaqnNR82bA60iDNSNQ7fo=; b=KRKDOE43euHNcpxm6cdYRmFX8/adOCfwJOap1ce15iurscMhipz+QP6MyhOgCvPFMQ 3QDY9oMcuIooJN0jrA31VD+viOd9Ifn7Rx5f4QMY2tUqniP/xghjDq7kCiHqM/E6nsrX YxwPTVg+J08L2YiZhLo6n5sGuPREG2kZiCKKfBZDMomjrUWGd52eB/g2FMTXlhHNnwNu hZviGGOcirFyJ+02fzo5CgHTevSSqmso3uPM31mpxk/eOpZJwUmxHSXj5lZVjbItCiwe JE+FjtFn8W6UICotfNR9qkTQLgXw1AuizCh4ltQm++HyM81snY1ucr8ehdEZ8IstiXSj VgSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=H1YchBBd; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h27-20020a17090619db00b0099233867740si1991247ejd.144.2023.07.11.06.29.33; Tue, 11 Jul 2023 06:29:57 -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=@mediatek.com header.s=dk header.b=H1YchBBd; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232659AbjGKM6n (ORCPT + 99 others); Tue, 11 Jul 2023 08:58:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232376AbjGKM6a (ORCPT ); Tue, 11 Jul 2023 08:58:30 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2684170B; Tue, 11 Jul 2023 05:57:59 -0700 (PDT) X-UUID: 8bc3dc341fea11eeb20a276fd37b9834-20230711 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=MaO4Pp49q26ZvXTVzU2ZtIU90FsXfRWQRbJkJwwgleA=; b=H1YchBBdxt90zTliS+PHEBDBSB/ydxtkqMgk40f2U5ulZ/EDwJAeviSxWCFh2zOR6UPPVnLu27ihusXLgS0joNngMNPgbzP1q2wNEr7SzXlkI4FXVAnMJfIznwN+idLvoSRriTjFbjfBICxIpoECNZmTWKYaxFinbnIcKuwcLdc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.28,REQID:31695e12-f710-4ba1-ae5b-dd79da6205ee,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:176cd25,CLOUDID:e55ad00d-26a8-467f-b838-f99719a9c083,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 8bc3dc341fea11eeb20a276fd37b9834-20230711 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1355193415; Tue, 11 Jul 2023 20:57:52 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 11 Jul 2023 20:57:50 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 11 Jul 2023 20:57:50 +0800 From: Yunfei Dong To: =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert CC: Chen-Yu Tsai , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Yunfei Dong , Mingjia Zhang , , , , , , Subject: [PATCH 0/3] media: mediatek: vcodec: Add driver to support 10bit Date: Tue, 11 Jul 2023 20:57:46 +0800 Message-ID: <20230711125749.15555-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-MTK: N 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_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1771131055354465574 X-GMAIL-MSGID: 1771131055354465574 Define two capture formats V4L2_PIX_FMT_MT2110R and V4L2_PIX_FMT_MT2110T to support 10bit in mt8195, mt8199 and more. Getting the size of each plane again when userspace set 10bit syntax to driver. V4L2_PIX_FMT_MT2110R is used for H264, and V4L2_PIX_FMT_MT2110T is used for AV1/VP9/HEVC. patch 1 Add driver to support 10bit patch 2 Add capture format V4L2_PIX_FMT_MT2110T to support 10bit tile mode patch 3 Add capture format V4L2_PIX_FMT_MT2110R to support 10bit raster mode --- - send the first version v1: - Run 10bit VP9/AV1 fluster test pass. - Will return error when the 10bit parameter no correctly in function mtk_vdec_s_ctrl. --- Reference series: [1]: this series depends on v6 which is send by Yunfei Dong. message-id: 20230704131349.8354-1-yunfei.dong@mediatek.com Mingjia Zhang (3): media: mediatek: vcodec: Add capture format to support 10bit tile mode media: mediatek: vcodec: Add capture format to support 10bit raster mode media: mediatek: vcodec: Add driver to support 10bit .../media/v4l/pixfmt-reserved.rst | 15 ++ .../mediatek/vcodec/decoder/mtk_vcodec_dec.c | 22 ++- .../vcodec/decoder/mtk_vcodec_dec_drv.h | 5 + .../vcodec/decoder/mtk_vcodec_dec_stateless.c | 140 +++++++++++++++++- drivers/media/v4l2-core/v4l2-common.c | 4 + drivers/media/v4l2-core/v4l2-ioctl.c | 2 + include/uapi/linux/videodev2.h | 2 + 7 files changed, 186 insertions(+), 4 deletions(-)