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: 13684655 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C83DF9473; Tue, 4 Jun 2024 05:15:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717478141; cv=none; b=mSbok9fkHaogrQv48LLgs20xRdnfnhg8KMXf37Pil68gylpZqPoTLn7C+NDVkwdMA/FuCESixlwmOzmeuVJopFgiDN6xZoEC27OE++mvXJ4lcBlTyw1ZqR99hcdXrBOx4XWqQa0IkoUd3Oasw5P4kqK7LEFZP6+sTY7Uz4xjeLs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717478141; c=relaxed/simple; bh=D6Si2bEd/gJd1CSLAqajZQzPBLVMC2TuZsR1YACoGVo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=cIDWSj9agiso7/FYmmmWKBPlNcp6ICzb7cOcwV2Wexa7JUJeVs44NSCKdhYxJF01dAK05p2yub4mXlqveBF3q13cnMAUTUr6YHF6Kv1xRvqWAU3ONGWzZPCIZJ3Kbcj62NXG2POw6lD5KW0/Cn0xu2C0IKce4HbmsXTm+79mo1g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hWuvVcMZ; arc=none smtp.client-ip=209.85.208.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hWuvVcMZ" Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-578517c7ae9so604012a12.3; 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=vger.kernel.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=hWuvVcMZJDni9yIPxApdpEd3XmChL3NDHzSjp6jcUa5V92SxA178ezdC5OyD6yA+UM 3z2WdFGR49359jsqliMqD2d2sNuUaO5o9nppOAv7b+DjY4brWfPPqLw2z4v7CcvZmOrk hCzLnbkL1ZAMsXhDOEQN1svjE0jZx3CmVBKoOHv1Q54850epOue23BjVaaAksHa1rULP rmajYfWljtfb6YMgIVCVnp+LF+a3bO0NlxyUU7Ar7wgSHdC8FA1B7gVw1yV6iaT5qr5w L3lVNK50rfOdkLJebE1CdZMURATHJYl/AiGN1euQRz7XR0+te39lSzAfJd/ep+HvAXdZ /zkQ== 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=Zn3PElb6dYy7XuorKMpV6LzC7Hk4yb1gncnkOe3k/JAxqjZRA+mqzbwT0l3LY4V6Dn KcYbo96RkLdUCbcGHgbswSmRamnHwyRmo7MVJkoE69ilegHfvzwR3RSa2m+KD2SWK/pt vk3sfK8vBqtVeqUz2LDyORb+Fa2X4V5R/Bk4mFcFLkiJj6QYnjlnEN7Ed3m5E0UYEFIC lW7U5kJwlJ4BTv/tJ2lDU6YNvlrRDGwKJ1PHvIBHJWNd04As6Kg+XtEI/cCvcEiSQWba tsT8fj5RBlpg4S/PhGiQDpHAnNP7apTMSgpwBsNqr3J0f5oFwdSmQN9Q9VSUhS0jJqfu mjtA== X-Forwarded-Encrypted: i=1; AJvYcCUVpXZkInqrmiZizsGJ1gZCD12Y7tIcEQn1RUB8TBDvrhk4tLdZU5F3LDVqUu7+bpkspuKNtp0t7/mLHULiTygmIexyv57OSboJ6oRUU1S7+JrTc3XedUdLRUCUt3DLT3q5SjekfRTBXvA62TGjEjgEkUdWyVGwKJ61NkvaNvFNsMPyuIQE X-Gm-Message-State: AOJu0YxsEBdSrLdz1ZNt9dd5ghYpd4Rq8DVc5xIkqqonyw1iYqBab72o GoF+Bazj4ZxLKT6LFXw97XDbCceWRkt1HilOw20mrMKk5+SzoVv5 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 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: 13684656 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E90CB13F447; Tue, 4 Jun 2024 05:15:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717478144; cv=none; b=bTdZM+zIX9bOMoaYCnCR3JmtF1+C19ySUyNqUcFGO765BpPV1/udqGoi9oXnNVfDwoncfjhoh7aa6LJtNnS6hIt7ayBhDki4c3QnQqhxwb3fkhLrO8k/nq+J5NmBAch1oUIZ8i3uc1rTNtwDiBdzxdsF7KBLztWkWsmb2RcteqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717478144; c=relaxed/simple; bh=DEfGGNbbf6mS0MilM1GKmovkDe2QE6KoBd+BZ/dvfkE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YH70zHCSTMIlsROYn05KKqSjZWkk5osKp8JdI9teprEZ8L9WvSqNWkS/mpTlnEjWI0yDUw9ZAdjGsej1NjRjTHJFLt/qKr0RtdOq+TxQC0+6SNKgy8h3saahyYVGfIqlAXbrrJqh03uTVX+zQkrIRbsrPv6SHV1pOCryEiHolKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YeWBkxiC; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YeWBkxiC" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-57a30b3a6cbso653735a12.1; 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=vger.kernel.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=YeWBkxiCV+yXIJff/qQMwLJntNEqwQkE+SBwP9ZCGHVdYAFeMUGo9OvlCCG4y8NfLP wzaujEoXxKrmHzaI4IdOs4JQ50xtpKrOU9fl3eZOmwjUwMxGRKs8JWc58zi9apIwHJO6 h8lPae4UeowoPKozFCEtaRO8jj8DAdhJHb4FWU9ci/WkNRa4+dGJhfTG+u1SLjsEZQj+ b1iFeHbB1kA9SPGZg8KO3rTYC2gNW1i0fecl6v4DreXeALsqXzhehzbhSYLcgzxqR5/3 cb36BZtx5AambKXYxOheR8Hupfub2rAMv2HOxTcw39CSJJZZjEymXo3hhr3eqGC4fh5E Ogpg== 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=o/OHlxduiVN9N7x/mehBJwBWxLMAfeaNlzBbwoIjt/X0Rfvh77gVvntSVZkrYpcJ+d gRbJiU/x+FgICl/pZtwrc8pVKuAl8ub/nL6G4Syx8hKb8uSyh0tmUCFvjwxYKAQW8qMt c36p0Xlt9HbeD2z69vewFdavz0O3XA5r/yVyOm7mEjNy+d7dUaqEVuQd9r5o8LmBuxdY JysD7QCIrkgvsFrgfECvv7jb5Q8ltScoMozyKAQERLRJIy+x575ScyvEElVDwyNEeNhK tDKY+XW1fXOlWoexYCIGQMqusWrcTgqZzbSlr1G5gh0VUHEAdqBB05S1L1jH2gBCKxl7 WwUQ== X-Forwarded-Encrypted: i=1; AJvYcCUTyxwsjhCslPPxh3s8/7ewfbQ1MZwX+aQe1IVJbXQcjYBSVFfUX3QuN6xnNk4TSlq2Y9gEPKY97yXd5z5sX1PAM1kniVDv38qJjNlKthg/ehAD9Ov4WzzIbBqQI5/gkgNupZg/Xwh3rUQkM1iV8hlVzqjOhrQnpn1ew06nqO+SLVj5qDM1 X-Gm-Message-State: AOJu0YzEWZH9miykdXXkLDNbCGXN/F/PI8iNr++/LubunCKIbLQXQzxT f8iDxxLj//R+mKh78riIk4VzNHbG2P5Li3hUJ6Dy/CMUgxtDiel5 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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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;