From patchwork Tue Jun 4 05:15:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13684660 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08249C25B74 for ; Tue, 4 Jun 2024 05:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SclMF4/zLzaOdKwxjLdWOdbLyZXB2B/n2dRVfSuMZec=; b=GUmsPaZozUqWo2 26ImYBR0xpS9Go0qaAXhMo3SRhVRIlm5Y/IPihzG4Av6aOvOHoNCAn5iBijgdaCEQ/oOx0sNiFmDo QKPmsOq9ApXaovcxBUNqwF37YulCKFqrcbuGYEsjSsM02wt5Roqk6oFg+9yP8vsNIZW77wXtsoNtn ToVB/SObZl9QU5IrP1wTS0slzl95vSQymii2mMiQZI33ZoyvNrpfXZVXIf0t+jiEoqd+bQ/ZXsrGH /J58Y2u5+OGixlH8kfmEMXKnJwaMiervMJNKjOQ6WN3TZnhq5BNdoV0vWT0oCqZHbrrbyGFz8Mb9V EYQo692xIoIERtjFuFgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEMWV-00000001FQF-1avm; Tue, 04 Jun 2024 05:15:51 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEMWR-00000001FL5-1Hle; Tue, 04 Jun 2024 05:15:48 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-57a30b3a6cbso653652a12.1; Mon, 03 Jun 2024 22:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717478138; x=1718082938; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2KFwSuk79X9DX5w/ku6Z9rjU54vKlCO06+DBoLY9A3Y=; b=eYIEjprSY722B8Kp+r8BRkR1jj+c7YlZnEmRkK92eC+1PIGwlNTE9hE6jlGcU9oNAm YOt47SFuSx9UTogYA+iRaLQZV//C4CfOBqnw2be2ogTNQthvr08cyEgcXBR2PH4LUvix WODPt0RyjIHyDaZort0s8Un1KcqULOBiDXbNznJFpwlYopk+eV6rYsR9f5PorFkKNtGU kNpilwdnTDWZMfeVH6XJu96BShyOQf3LQzrXng6aLIv5Coev+30/tbIOCpND8ek7zyUB 6XbNodUD6gCOkj+4OTj781TykxBnLX/5+6lRU95XlgmpkosGSs4caJGwCcghQ3qBt+7R 6r7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717478138; x=1718082938; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2KFwSuk79X9DX5w/ku6Z9rjU54vKlCO06+DBoLY9A3Y=; b=Uv+IJPf5G+TsapXy1ge2NaqFthWmoaqLZtZH3iC2frqq9B3dFpSEDXyszj9B7Fkrr/ eXFRjkSBh2iHs/9Ja5V7v0KhzKU4SmIEp1cA9Yt7cZfXndMyaTEouvJ1RKnMm+dxnS9z dxyBdeCCBDbwNvpV1hKuWyDg4gmSB3joDXzdfkCmS4JCfeaIHGQH2du7piRrMNABbD05 rqlmLB1ndPGP+1XWLcP0DQIx+YmqPgSWlJ8hwEhBJOQ8Fv/iZG+OC0o0kWhT2KJJSdlU dtZRadYShRRn2PpE8097mMaGduSg97ay04KAAsWRZTtQ+gDg4f9Rrq/DujVTzyGpsySC 897w== X-Forwarded-Encrypted: i=1; AJvYcCVH1DvdLRGzCf7wt8GNy5smdoax//2U3jfU+L1kIfBjxvb2RTjgHV0E7Zj2UdTFenhA6MTo0tDJEWjTgG5PZuaebG/njODlJPvCmAFCVzr+ZwEpE2IObXBNV7H8T3iZdos5LVOOeCL5afsppZW2OoCpaw9D6UtuOg== X-Gm-Message-State: AOJu0Yw6QNiU+P/CBbvQ8gW13kq61WeIkNF9/s8JmUR2MtLZsvWMRK/T 6JJhbTBd90qnjOp6OttXhze4zJtneXScgJfKMW/ZbNdf/ZdWNzu/ X-Google-Smtp-Source: AGHT+IELwPjYkPPMjx/cOlLOkJTKS9byWM4fjPErh9dLotwDfRJJOfxB6eikJGAPgwJevRJtlecYGA== X-Received: by 2002:a17:907:970e:b0:a69:228:8a6e with SMTP id a640c23a62f3a-a690228939dmr370899266b.44.1717478138040; Mon, 03 Jun 2024 22:15:38 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68afbaac03sm451896566b.149.2024.06.03.22.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 22:15:37 -0700 (PDT) From: Christian Hewitt To: Neil Armstrong , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 1/2] dt-bindings: media: amlogic,gx-vdec: add the GXLX SoC family and update GXL Date: Tue, 4 Jun 2024 05:15:32 +0000 Message-Id: <20240604051533.3312944-1-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_221547_357305_1A880C55 X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The GXLX SoC is a GXL variant that omits VP9 codec support. Also add S905W and S905Y as GXL chips and sort the GXL comment. Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Acked-by: Neil Armstrong --- Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml index 55930f6107c9..47dce75aeae6 100644 --- a/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml +++ b/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml @@ -31,7 +31,8 @@ properties: - items: - enum: - amlogic,gxbb-vdec # GXBB (S905) - - amlogic,gxl-vdec # GXL (S905X, S905D) + - amlogic,gxl-vdec # GXL (S905D, S905W, S905X, S905Y) + - amlogic,gxlx-vdec # GXLX (S905L) - amlogic,gxm-vdec # GXM (S912) - const: amlogic,gx-vdec - enum: From patchwork Tue Jun 4 05:15:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 13684659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41F07C25B74 for ; Tue, 4 Jun 2024 05:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ywPYnZmCyS6LZ/l9qg7GxAvabeUORLEAh2wVeC3OKYw=; b=jAmCbJzo8MVbgJ MzLJq40eN/efmGJwUEvBqM5oqiec2zDiJ5KfrgxL9D2ReKAqSZ7ESXvwg4713a3lHbCdjfagWBM1n +sq1cz6FMQTEtEiDsVEpg6E/exROA4B6bi26SlLFtCW0PyDBX0Da3duJuJ6ZvfdghRsY2NVRnUda9 9vAY/F5SuFq+9oH/vSRvD4ifuR8MdmGRjTFsbbw3b3+q8KrbaYlkrT52Lu0ucccsZ1sktST9r88AC yvr8VXqBCZ2M+oPU9wglZ35thKwHAGGcNqUr2HaKP/ZAgIQ47etMqR9rzy+GI47uSQvfwwQfnq2Mi lgNMlqIZNM5+Y+k72A+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEMWW-00000001FQe-0fva; Tue, 04 Jun 2024 05:15:52 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEMWR-00000001FLj-1Hgv; Tue, 04 Jun 2024 05:15:48 +0000 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-578517c7ae9so604099a12.3; Mon, 03 Jun 2024 22:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717478141; x=1718082941; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8SJccidjsLYGh4yEPOhnunVr6ljOJkGUx3ObCldCrBM=; b=kFhAlh7ZX4rcyS1f5m0IIW8bImdPT8kO5vKHJrOAqbm12TXh8LRhvZv+9f2MyHrUyy 0N8iCvWv50YBncHmH/Zs9FkJIKq0ayjrwubrZTLVstWKwiahOVxgVTBFE0ojdOSQVx2/ BidBwBRymwHi7BC9sdM55nBTHKMTO7k5YNQe+k4QeS1PCQ4iUXjSa7EyfxJKNCzoH4AX IesjMkFbmWz4MtRnKzjh/TLvNZqIWcLhcwwUpMWDbVy3V/LnJa63h9ViE1KjhLOXYemA GseaZ+sr7mUQOIUUzPs1jMLbyXPIaqZNvUuAEnC3LlPiuLT2JZDU8uyGjJU0WPuPAfBu Rp6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717478141; x=1718082941; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8SJccidjsLYGh4yEPOhnunVr6ljOJkGUx3ObCldCrBM=; b=tTYt9/jc7WCQLORlIdyWxPwtQ/3sJr2Ng9uVi8M6wwykk0DtIre8U7KgL6Se10mkc7 aZHfFKSfwYoY5+0zSaVLdAv/RgaAv37+d0wre+nb4u7HDVwLV3G2eoEb8/Wp3NfVhePZ B5pVARrPJl4VynJXyRbak+s18vB2IDGi2jeFlSAqttjv6kbWAPE1x7MGrvA6IHhxox/8 Cb20GZkbNn/IpWagezkUZM+va31oUVmZenotbAf4dhGi9ZdcAvVt9Ia8E1dMB0teT4ct p8CW57lvSayMUByuX/ou6qhH4JbaAFcC5P71UWJwtU1P054vEPbww0iGB6BssevQPl0T MXjA== X-Forwarded-Encrypted: i=1; AJvYcCXKqbSUmtDa0y8rG5P+QMmhQgpQIUIZPq7Lg3j368iW2OXywIsmaV3D9rtBF5lSPKwXNAQ2/zUY6qyFjkvbGoR0IR2NntTtuYiQUw4JUTe0V5oK6xIbTlvaAxwvT+LsOkl5c0Cse3QB1qMKsfF7c4NlledI2lfU+Q== X-Gm-Message-State: AOJu0YwceO6+ZbGo+uBVb84ndq8x3l8mAwLRXtAN1mhU/A8TI26g2W2m 9Fz54OnFlXtaXy/+vCsVJBaMEw8824R/MsFwc3b06nAIHJjt2J8U+eUUrmpfObpS0A== X-Google-Smtp-Source: AGHT+IGZ8TPHTibom2cLxGJgP0J5h41ltwlDrg51oTsOx+WeTH4ROT9lb8ZKceTCPjvT/pMzBjeQoQ== X-Received: by 2002:a17:906:3718:b0:a68:cf22:ebdb with SMTP id a640c23a62f3a-a68cf22ee12mr383305766b.43.1717478140978; Mon, 03 Jun 2024 22:15:40 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68afbaac03sm451896566b.149.2024.06.03.22.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 22:15:40 -0700 (PDT) From: Christian Hewitt To: Neil Armstrong , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt Subject: [PATCH 2/2] media: meson: vdec: add GXLX SoC platform Date: Tue, 4 Jun 2024 05:15:33 +0000 Message-Id: <20240604051533.3312944-2-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604051533.3312944-1-christianshewitt@gmail.com> References: <20240604051533.3312944-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_221547_365274_B1066023 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the GXLX SoC platform which is based on GXL but omits the VP9 codec. Signed-off-by: Christian Hewitt Acked-by: Neil Armstrong --- drivers/staging/media/meson/vdec/vdec.c | 2 + .../staging/media/meson/vdec/vdec_platform.c | 44 +++++++++++++++++++ .../staging/media/meson/vdec/vdec_platform.h | 2 + 3 files changed, 48 insertions(+) diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c index de3e0345ab7c..5e5b296f93ba 100644 --- a/drivers/staging/media/meson/vdec/vdec.c +++ b/drivers/staging/media/meson/vdec/vdec.c @@ -982,6 +982,8 @@ static const struct of_device_id vdec_dt_match[] = { .data = &vdec_platform_gxm }, { .compatible = "amlogic,gxl-vdec", .data = &vdec_platform_gxl }, + { .compatible = "amlogic,gxlx-vdec", + .data = &vdec_platform_gxlx }, { .compatible = "amlogic,g12a-vdec", .data = &vdec_platform_g12a }, { .compatible = "amlogic,sm1-vdec", diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c index 70c9fd7c8bc5..66bb307db85a 100644 --- a/drivers/staging/media/meson/vdec/vdec_platform.c +++ b/drivers/staging/media/meson/vdec/vdec_platform.c @@ -101,6 +101,44 @@ static const struct amvdec_format vdec_formats_gxl[] = { }, }; +static const struct amvdec_format vdec_formats_gxlx[] = { + { + .pixfmt = V4L2_PIX_FMT_H264, + .min_buffers = 2, + .max_buffers = 24, + .max_width = 3840, + .max_height = 2160, + .vdec_ops = &vdec_1_ops, + .codec_ops = &codec_h264_ops, + .firmware_path = "meson/vdec/gxl_h264.bin", + .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 }, + .flags = V4L2_FMT_FLAG_COMPRESSED | + V4L2_FMT_FLAG_DYN_RESOLUTION, + }, { + .pixfmt = V4L2_PIX_FMT_MPEG1, + .min_buffers = 8, + .max_buffers = 8, + .max_width = 1920, + .max_height = 1080, + .vdec_ops = &vdec_1_ops, + .codec_ops = &codec_mpeg12_ops, + .firmware_path = "meson/vdec/gxl_mpeg12.bin", + .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, + .flags = V4L2_FMT_FLAG_COMPRESSED, + }, { + .pixfmt = V4L2_PIX_FMT_MPEG2, + .min_buffers = 8, + .max_buffers = 8, + .max_width = 1920, + .max_height = 1080, + .vdec_ops = &vdec_1_ops, + .codec_ops = &codec_mpeg12_ops, + .firmware_path = "meson/vdec/gxl_mpeg12.bin", + .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, + .flags = V4L2_FMT_FLAG_COMPRESSED, + }, +}; + static const struct amvdec_format vdec_formats_gxm[] = { { .pixfmt = V4L2_PIX_FMT_VP9, @@ -263,6 +301,12 @@ const struct vdec_platform vdec_platform_gxl = { .revision = VDEC_REVISION_GXL, }; +const struct vdec_platform vdec_platform_gxlx = { + .formats = vdec_formats_gxlx, + .num_formats = ARRAY_SIZE(vdec_formats_gxlx), + .revision = VDEC_REVISION_GXLX, +}; + const struct vdec_platform vdec_platform_gxm = { .formats = vdec_formats_gxm, .num_formats = ARRAY_SIZE(vdec_formats_gxm), diff --git a/drivers/staging/media/meson/vdec/vdec_platform.h b/drivers/staging/media/meson/vdec/vdec_platform.h index 731877a771f4..88ca4a9db8a8 100644 --- a/drivers/staging/media/meson/vdec/vdec_platform.h +++ b/drivers/staging/media/meson/vdec/vdec_platform.h @@ -14,6 +14,7 @@ struct amvdec_format; enum vdec_revision { VDEC_REVISION_GXBB, VDEC_REVISION_GXL, + VDEC_REVISION_GXLX, VDEC_REVISION_GXM, VDEC_REVISION_G12A, VDEC_REVISION_SM1, @@ -28,6 +29,7 @@ struct vdec_platform { extern const struct vdec_platform vdec_platform_gxbb; extern const struct vdec_platform vdec_platform_gxm; extern const struct vdec_platform vdec_platform_gxl; +extern const struct vdec_platform vdec_platform_gxlx; extern const struct vdec_platform vdec_platform_g12a; extern const struct vdec_platform vdec_platform_sm1;