Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2071395pxb; Wed, 9 Feb 2022 10:15:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxur4xKSTm/rZSaF+J3dbtU2Wpteq5XBGKRq0NZWBZ3mpAOgB+yYW70vbDlCbvx8rQFY5QW X-Received: by 2002:a17:90a:c301:: with SMTP id g1mr4778247pjt.132.1644430510883; Wed, 09 Feb 2022 10:15:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644430510; cv=none; d=google.com; s=arc-20160816; b=eQRmtL3mO+Zr5ZlKvdtCJKb1eX8HtGmlUpHP5WvyFoi5CBnXA+nDPUGonuQrkbCVxp SZuQFaOLaKD8Q2F2Zq/rqjuFxGOgneyOPlGnMkKT4PcbQpiUdhEZNa0cHkoL0r8iEfv+ 6zjlYmt6LyA9OaIxERTW/hEQDhYHe/twsYl8Pk6v/r1VNNeLd4Ugt8yMqWYSVjn6RNlS eASZlJhKWmmGQAV21rzy1HEo+S1Ufd3IAHBMZedabbn6U6ZFwohAuu/D8s7FLEzsMuZf WA+SBmgGhC/x7XnzuNxBZ5VuWmOvGlaEpgtZ1zdWZggbgk/sinuP8LPP5sB6epMwa5J3 IYqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=ZyAttm7EWbqNG67CUDg8UPYwEYfS+Y2vi8G1ZAG6NcE=; b=pjmILd6LaQcxmMZl9UiX0Xh6Kw3r8V4CdTKaNs+R6kab8vWPFdCv/5VHQwxAxFMe2S 2y2ouyOptR/xL1Z9ItmdcdD+VP045dSphATmHPH32smZfzJrsDPV6Ds4Te29MyY7x+28 WsfP4uYcSoxGlK74GQ5A3VFHwjFwIXoZWQKPMT/V5VRhg5koivpZ2Fgu1GGeIdoH+tk1 ZyAQq0UAylG0Z/x/zP2G5BBip+u9AfG6S57VGbmYkPEGssU9FpEJf1l7WB5g/5GyuGsM bQGz6Qm0qJpbuoT97eeIQhVPqcXP4r0Xwl9gkHALcdunEZUcziAIJpmg+5PbpzmJMKrF Hd6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RDqrhnCr; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si18168085pfc.119.2022.02.09.10.14.57; Wed, 09 Feb 2022 10:15:10 -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=@gmail.com header.s=20210112 header.b=RDqrhnCr; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235875AbiBIPbz (ORCPT + 99 others); Wed, 9 Feb 2022 10:31:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234208AbiBIPbx (ORCPT ); Wed, 9 Feb 2022 10:31:53 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7850BC0613CA; Wed, 9 Feb 2022 07:31:56 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id i19so298323wmq.5; Wed, 09 Feb 2022 07:31:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=ZyAttm7EWbqNG67CUDg8UPYwEYfS+Y2vi8G1ZAG6NcE=; b=RDqrhnCrVs2cy1RLpuK6nwaQFgj423rToOLIXbkpypkJM667N2WSwDimCP0mSqPCeQ EGTvGluh8N/yHOL5mrdSr6/5y+WgJvk6BJeAneMtafAHX4dN5Jo+hlPJeEroJP46HMaU Ckej5RHBnY3v++NS1SvQbCdf8Rx3q0c+rNYsFVa3ncq0bIqmXi7MmOsGi35r9TTFqAuo rgm/9AlLh6Qw0lXbvKq8CSp4WIkj/KUeu5GjqydWvyAVHMw/tJqN6ymygtrSkJqm6BuS XStOlwNtwE4Z7E7vYJ0gaxrnXORdOeQVDuP4vFQYC1Z69VBMpg6dmzCvbR43jUeXIWt+ 78IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZyAttm7EWbqNG67CUDg8UPYwEYfS+Y2vi8G1ZAG6NcE=; b=zDLqg11Mv/IiRyF6/1MaFNW9tEGHvrE/xzCzoXl9QamtYdkNisbPYUaemvq4o8nE+n P444PbwfouC6JXoO5XeJrt13xzEOXXeXAOxYElHXKFsZ2uhl6Enwjk+oCJFhzaZAsQio 8rY/OsYIxeZL2Zp1IBhmZKqyRh9828XK6YaWWNoW1l/Rr4WfGNuFfd4g8us3q1lNA3gU lVmJatnpIva5JcCA9Q+ctfjHHm2gQ3S0rUVG6FI3cP48FbMi8BHdAGEqgNxM4zgssNI2 RGw4+0GRVZh3LAO8+7glvzdDeLmLTFm+HJomF7J5i/lH9W6/I+jqlZH95LXo3xmEz2gc 0t6g== X-Gm-Message-State: AOAM5337+/dHEOeDOut0bjuSLwoRRuibk1kEV0B7lLFmJRRKrhcy1pi1 463Z99jsqc66k+aG6S6v4Gg= X-Received: by 2002:a05:600c:4f53:: with SMTP id m19mr2529899wmq.45.1644420714828; Wed, 09 Feb 2022 07:31:54 -0800 (PST) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id o125sm2875729wme.37.2022.02.09.07.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 07:31:54 -0800 (PST) From: Christian Hewitt To: Neil Armstrong , Mauro Carvalho Chehab , Greg Kroah-Hartman , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH] drivers: meson: vdec: add VP9 support to GXM Date: Wed, 9 Feb 2022 15:31:50 +0000 Message-Id: <20220209153150.30688-1-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 VP9 support for GXM appears to have been missed from the original codec submission [0] but it works well, so let's add support. [0] https://github.com/torvalds/linux/commit/00c43088aa680989407b6afbda295f67b3f123f1 Signed-off-by: Christian Hewitt --- Tested with LibreELEC 11 nightly 'AMLGX' dev images for Khadas VIM2 and WeTek Core2 GXM devices which can be found here [1]. The images combine Linux 5.16.y [2] with Kodi v20 [3] and FFmpeg 4.4 [4] which notably includes many V4L2 refinements for stability and usability. [1] https://test.libreelec.tv/ [2] https://github.com/chewitt/linux/commits/amlogic-5.16.y [3] https://github.com/xbmc/xbmc/ [4] https://github.com/jc-kynesim/rpi-ffmpeg/commits/dev/4.4/rpi_import_1 drivers/staging/media/meson/vdec/vdec_platform.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c index eabbebab2da2..88c9d72e1c83 100644 --- a/drivers/staging/media/meson/vdec/vdec_platform.c +++ b/drivers/staging/media/meson/vdec/vdec_platform.c @@ -103,6 +103,18 @@ static const struct amvdec_format vdec_formats_gxl[] = { static const struct amvdec_format vdec_formats_gxm[] = { { + .pixfmt = V4L2_PIX_FMT_VP9, + .min_buffers = 16, + .max_buffers = 24, + .max_width = 3840, + .max_height = 2160, + .vdec_ops = &vdec_hevc_ops, + .codec_ops = &codec_vp9_ops, + .firmware_path = "meson/vdec/gxl_vp9.bin", + .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 }, + .flags = V4L2_FMT_FLAG_COMPRESSED | + V4L2_FMT_FLAG_DYN_RESOLUTION, + }, { .pixfmt = V4L2_PIX_FMT_H264, .min_buffers = 2, .max_buffers = 24, -- 2.17.1