Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp291262pxb; Thu, 25 Feb 2021 02:39:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5jxt6qFiEBQVl2Q9VCas2QJ+Z3j9e9iHevrsLvCRcsWEqSzZaMNPNIDmpZd9WYiYiNZ9v X-Received: by 2002:a05:6402:50ce:: with SMTP id h14mr2155149edb.283.1614249545149; Thu, 25 Feb 2021 02:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614249545; cv=none; d=google.com; s=arc-20160816; b=NlPRBl0UsePAon3jWuM3U2ZgF4edWKp1c8BqREghAqVEVnt+DPXGapCDXYajZqVauU dX2jQ25izR94f95DpWxLUC2ZzDEAN9AV1G55rOpTmaXzXsNO0HnatQJwct6AOMBLZGTx OWiXGCijLpHUHyKStWuvWkK4fEG2/SyNDT5SIXnxV2fZeuAG+CF3Y3P7A722IZVOeMai /xY9Xwu4WNMVx37Ite1d5wS4VKR5y2XeGqWDLFAsjx29WlcIdnGlBz25XE2cN/9C0+Qb qOHlZbwzjpCqAU2MjyWNXxrw/R9qXcNmOkEtjJCDP5H6cK5cPN9WRzeAeDqaoRkcJFhR syEw== 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=0atpWon12z4IWnuFWgpbQsyQr6nSoFQweJtAwwQcdzg=; b=uQ1sEJ8oANbpzWKZb3LeJ2IPUkV6HLioSc44r5OYhhkv3uS4V/O02G1SytzHLMZWvz 72uz6HxwdIFqQkD/dDHhRnKEsY8P5kGws8oYB4RxTxsqlT1SdNIHGAayD38iw0OJysvh F+TN9mXadY6XpENmE0TAbEFOiKk8EaVl2TfDfqVeJJKMfP7dyTwR+w3JNi0PsYT0dHrV LicFjUWeb0gytaUmNKQt4oxHSaCqc1Xfus4Uv10v/H5/zwbYmFnnUqgTXnCmp4eFRg98 8w7E3vekLFgTNe6X+ypTaDLBWxfSiAXX2Rv2UBK7X5vDZFufke/ENn4pwfPPBXo/RcTx 1zkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Nr5BqbxS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz9si2958049ejb.510.2021.02.25.02.38.42; Thu, 25 Feb 2021 02:39:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Nr5BqbxS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235387AbhBYKh1 (ORCPT + 99 others); Thu, 25 Feb 2021 05:37:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234858AbhBYKQo (ORCPT ); Thu, 25 Feb 2021 05:16:44 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 784DDC0617AB for ; Thu, 25 Feb 2021 02:16:26 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id o22so4811730pjs.1 for ; Thu, 25 Feb 2021 02:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0atpWon12z4IWnuFWgpbQsyQr6nSoFQweJtAwwQcdzg=; b=Nr5BqbxSOcyQWzKpp/SIuKrPwvxQi8Q+NaZCxHSiZbKbAa7GL+dL03bUeGe8+Da7W2 Wh2dyEXlJj21rZwW0q7mdkSY6Y0SBVbJGUE2n9VHhJIa4L2liA1vXmRseWAjFWK0jD01 EvnCG73mMk8Y5NSKJIBUTqCHAfBnBJJeMf1pA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0atpWon12z4IWnuFWgpbQsyQr6nSoFQweJtAwwQcdzg=; b=VWAwOvxUXn/hii/DQwTQ4gEXvw4ABwUUPzrNWytdkhwYFWvZuAcYjQXg8WXFGa9CEZ J8UaUJv5jI26ZrOV8Sd01kOYXMCQn9kwCH0eUonoYwym77Pcef9KGqqPLOe1EMaZtf7a kX5BA9Uju3/DYysnv0OJ5yIeassRuW6q47lgg9PpdX9trFI43UkdreX7v6HvLCz+oSAE UU336e2c1+86FVzJ0U2CqCwax9IAhI1Xbh+BIqVoC6Ar8UlaKoWQ8ES7SPJx/An0EmUV uXs4BMRW/e1sXRcWjTyIdfpsNftWIQLyJ0BlNWjfRLYUejykIsAZyp8BNoXjEszYZgjq EuOA== X-Gm-Message-State: AOAM5328+yBCHTN1wiMLAjM63ZqngaAE4EX4k2dMF28D9pR1j47Lbny2 iqeHhoTQtnbsmUi6Ibz9Vu+kRg== X-Received: by 2002:a17:90a:d318:: with SMTP id p24mr2744855pju.122.1614248186008; Thu, 25 Feb 2021 02:16:26 -0800 (PST) Received: from acourbot.tok.corp.google.com ([2401:fa00:8f:203:2550:3154:2c53:b6e7]) by smtp.gmail.com with ESMTPSA id z2sm5848193pfc.8.2021.02.25.02.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 02:16:25 -0800 (PST) From: Alexandre Courbot To: Tiffany Lin , Andrew-CT Chen , Rob Herring , Yunfei Dong Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Alexandre Courbot Subject: [PATCH v2 0/8] media: mtk-vcodec: vdec: support for MT8183 Date: Thu, 25 Feb 2021 19:16:04 +0900 Message-Id: <20210225101612.2832444-1-acourbot@chromium.org> X-Mailer: git-send-email 2.30.0.617.g56c4b15f3c-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here is the second version is this patchset, although there has been such a delay after the first one that probably nobody remembers it has even been sent. This series adds support for the stateless API into mtk-vcodec, by first separating the stateful ops into their own source file, and introducing a new set of ops suitable for stateless decoding. As such, support for stateful decoders should remain completely unaffected. This series has been tested with both MT8183 and MT8173. Decoding was working for both chips, and in the case of MT8173 no regression has been spotted. v4l2-compliance is also passing, minor a problem when testing requests on MT8183: the test tries to call S_EXT_CTRLS on the first available control, which happens to be V4L2_CID_MIN_BUFFERS_FOR_CAPTURE. Since this control is read-only, the driver returns -EACCESS. I suppose this is a problem with v4l2-compliance and not the driver. Alexandre Courbot (4): media: mtk-vcodec: vdec: handle firmware version field media: mtk-vcodec: support version 2 of decoder firmware ABI media: add Mediatek's MM21 format dt-bindings: media: document mediatek,mt8183-vcodec-dec Yunfei Dong (4): media: mtk-vcodec: vdec: support stateless API media: mtk-vcodec: vdec: support stateless H.264 decoding media: mtk-vcodec: vdec: add media device if using stateless api media: mtk-vcodec: enable MT8183 decoder .../bindings/media/mediatek-vcodec.txt | 1 + .../media/v4l/pixfmt-reserved.rst | 7 + drivers/media/platform/Kconfig | 2 + drivers/media/platform/mtk-vcodec/Makefile | 2 + .../platform/mtk-vcodec/mtk_vcodec_dec.c | 66 +- .../platform/mtk-vcodec/mtk_vcodec_dec.h | 9 +- .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 44 + .../mtk-vcodec/mtk_vcodec_dec_stateful.c | 1 + .../mtk-vcodec/mtk_vcodec_dec_stateless.c | 427 +++++++++ .../platform/mtk-vcodec/mtk_vcodec_drv.h | 9 + .../mtk-vcodec/vdec/vdec_h264_req_if.c | 808 ++++++++++++++++++ .../media/platform/mtk-vcodec/vdec_drv_if.c | 3 + .../media/platform/mtk-vcodec/vdec_drv_if.h | 1 + .../media/platform/mtk-vcodec/vdec_ipi_msg.h | 23 +- .../media/platform/mtk-vcodec/vdec_vpu_if.c | 43 +- .../media/platform/mtk-vcodec/vdec_vpu_if.h | 5 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 18 files changed, 1442 insertions(+), 11 deletions(-) create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateless.c create mode 100644 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c -- 2.30.0.617.g56c4b15f3c-goog