From nobody Wed Dec 17 16:11:04 2025 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 97E1D1AAE33 for ; Mon, 30 Dec 2024 17:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578045; cv=none; b=luFlapsuQtdKJXBaWRxaU8HSxMXgo/wcSz496HDH0+yR7Glm6HT6UWxmNUioP/yTCN3SRv3Y7SsVlamZ6j2tc3sLwb1C/b94tDh2FrYkIYSQIC0GHNE0JUmltJY74mbQRZRsDKcnlzgBAvniDMYGoC198OUy7LFD2+xjPI2IGUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578045; c=relaxed/simple; bh=P/EB0Q5IX1CPZrLEQsUh/79qF0MN9BkQ9e3xHArYHKA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h9m+rqTsBy9kHZWwGBynR0dikEYx6jTblnMr3t2zbExUMpiUctZmGs7vj0xK991RMtJsr6U3WG2B0iFLujo/ZahchDxtieimv9smLT0vlA3OKjEUuu6yA1C8jr6GraDJDFb+ZttBjPw9RWxHfTD0EhtbiMMXHtHddP+fr+aCJ2o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Yo5RjMaz; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Yo5RjMaz" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-436a39e4891so12696435e9.1 for ; Mon, 30 Dec 2024 09:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735578042; x=1736182842; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WHfi+dI4OPKFx8z20qLrvZitpcJJyqgdl8C+OLayePk=; b=Yo5RjMaz522v6KWJUdiz+GDakFt72/IfQSVgHdU0GFtOd3oNa9xsgafGTcCIhB9F2K PPy2tNLXT04CTOcpqxDlc6CmUy0MqE8aaLfy1+x31wUUSH4SOGqbhztmDV4U+hscB1MP uEIO/2h3nQO5V3MBYJodLLRX+Y6+TdGHFSGgHWRy78z/fAQ8b6lk0k9CmOygMSkLSEK+ 0kSUBs36s67oJB3yb++94jtsn4GSYHXmH3sQFhF7zgDX5V2AH0dx9hqS8S99P+ZqU7Le GM3pzGVQV4pADc4UoKnRnTypeVbrVEWDxCjf8ZIMCiUHGjoK31hy8PliBNWaB2q7uLLj RPWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735578042; x=1736182842; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WHfi+dI4OPKFx8z20qLrvZitpcJJyqgdl8C+OLayePk=; b=tifIa7euFbDzDQqMogrwawalK8Q9la1pIM57f5LPHtb7Y4DClOWgVXOgRRv0fsSqKJ KCI7NYalcNiWRq4ti+5LTCw+LL/TACImhxFXmHYmw/RFFjx5ww8XmEIMI7yDSlgsc5Av UxKSKygAC1/OGb12K2W1+/7ixgsLPuTo/ap9pzxuwefZ6brU1LpRsOFzrZARryToZ2Bu Ep671suYXoUIN+4WgMC/CMxbf+n0zsnFxBuv3Q8BTSdr9ZzQrAemSCW+s528LeY5QB9W Zk+LD+CPcDVV0KG4c+15f6qopoV5Ia14Xx50ktu/ewgDOLXurdCkjSSvkbGBrAyzzckn vfgA== X-Forwarded-Encrypted: i=1; AJvYcCWdQx8mHu4kwlLjevIZ1lZxjkVqLpIMBxgsPjQry/Em0awWzcVngXxtKEsR0ihETN9jhAVd6npw001KFeM=@vger.kernel.org X-Gm-Message-State: AOJu0YxookRnwak9rDzQVTZ1xYd0/X2IlkTbdt3j83W0Z3Gaa/1FzZ8f vC5Z+4yNJuiI6LD3T+HaZryi0HORtfqKGR3Po7vjB3K4LdUbx4Z4AH0JWt59wOw= X-Gm-Gg: ASbGncvyGsuD/xsUeEquMYSXYo8HWjvk97YrdL5tP3bZch58E4EuGZKUyLbCx0WWL+Z w4LXyvAqb9ZhvRNmOmXF5FJqDEOOukeh7fzCF8wVEcOzbqF/T4iPeC/b9xcMPqTe10nRp0ES1jr 6kCA61LpTO+pvmg6PBID4pyuDkvj2J/oZy+p8RvNG/JVymMTlblYBPkrDau9SwbiSs9nahNrVeA wEzSTNB/qnyACNPKwBXk2yJ9MQR2fqY55T+23Ieql+jD9ycmHpdLHLaggylFMMGPg== X-Google-Smtp-Source: AGHT+IEsG97d/RhUSfJQzw24meZ7Pau3MdD65rar1RKMzi1P53mS1+qA7rUXH7J5lmAuUv3T7NSCdw== X-Received: by 2002:a05:6000:3cd:b0:386:33e8:20f4 with SMTP id ffacd0b85a97d-38a2240f11fmr30572628f8f.59.1735578041905; Mon, 30 Dec 2024 09:00:41 -0800 (PST) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611fc161sm359757955e9.10.2024.12.30.09.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 09:00:41 -0800 (PST) From: Bryan O'Donoghue Date: Mon, 30 Dec 2024 17:00:33 +0000 Subject: [PATCH v6 1/3] media: venus: Add support for static video encoder/decoder declarations Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-1-a4d5070d3aaa@linaro.org> References: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-0-a4d5070d3aaa@linaro.org> In-Reply-To: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-0-a4d5070d3aaa@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: quic_renjiang@quicinc.com, quic_vnagar@quicinc.com, quic_dikshita@quicinc.com, konradybcio@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stanimir Varbanov , Bryan O'Donoghue X-Mailer: b4 0.15-dev-dedf8 Add resource structure data and probe() logic to support static declarations of encoder and decoder. Right now we rely on video encoder/decoder selection happening in the dtb but, this goes against the remit of device tree which is supposed to describe hardware, not select functional logic in Linux drivers. Provide two strings in the venus resource structure enc_nodename and dec_nodename. When set the venus driver will create an OF entry in-memory consistent with: dec_nodename { compat =3D "video-decoder"; }; and/or enc_nodename { compat =3D "video-encoder"; }; This will allow us to reuse the existing driver scheme of relying on compat names maintaining compatibility with old dtb files. dec_nodename can be "video-decoder" or "video0" enc_nodename can be "video-encoder" or "video1" This change relies on of_changeset() API as a result select OF_DYNAMIC will be added to venus/Kconfig Tested-by: Renjiang Han Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/Kconfig | 1 + drivers/media/platform/qcom/venus/core.c | 95 +++++++++++++++++++++++++++= +++- drivers/media/platform/qcom/venus/core.h | 4 ++ 3 files changed, 99 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/Kconfig b/drivers/media/plat= form/qcom/venus/Kconfig index bfd50e8f34219db8a1de7960d7ea93b20db2982a..bc2e410b29cb415a36540a4f987= 09eae44f4ec35 100644 --- a/drivers/media/platform/qcom/venus/Kconfig +++ b/drivers/media/platform/qcom/venus/Kconfig @@ -3,6 +3,7 @@ config VIDEO_QCOM_VENUS depends on V4L_MEM2MEM_DRIVERS depends on VIDEO_DEV && QCOM_SMEM depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST + select OF_DYNAMIC if ARCH_QCOM select QCOM_MDT_LOADER if ARCH_QCOM select QCOM_SCM select VIDEOBUF2_DMA_CONTIG diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platf= orm/qcom/venus/core.c index 4e26b18790537885a77d66c1917a4e7a146eaf57..fe24bccff08aed1ebdfe00f75e1= aa5b67ae7826e 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -286,6 +286,89 @@ static irqreturn_t venus_isr_thread(int irq, void *dev= _id) return ret; } =20 +#if defined(CONFIG_OF_DYNAMIC) +static int venus_add_video_core(struct venus_core *core, const char *node_= name, + const char *compat) +{ + struct of_changeset *ocs =3D core->ocs; + struct device *dev =3D core->dev; + struct device_node *np, *enp; + int ret; + + if (!node_name) + return 0; + + enp =3D of_find_node_by_name(dev->of_node, node_name); + if (enp) { + of_node_put(enp); + return 0; + } + + np =3D of_changeset_create_node(ocs, dev->of_node, node_name); + if (!np) { + dev_err(dev, "Unable to create new node\n"); + return -ENODEV; + } + + ret =3D of_changeset_add_prop_string(ocs, np, "compatible", compat); + if (ret) + dev_err(dev, "unable to add %s\n", compat); + + of_node_put(np); + + return ret; +} + +static int venus_add_dynamic_nodes(struct venus_core *core) +{ + struct device *dev =3D core->dev; + int ret; + + core->ocs =3D kmalloc(sizeof(*core->ocs), GFP_KERNEL); + if (!core->ocs) + return -ENOMEM; + + of_changeset_init(core->ocs); + + ret =3D venus_add_video_core(core, core->res->dec_nodename, "venus-decode= r"); + if (ret) + goto err; + + ret =3D venus_add_video_core(core, core->res->enc_nodename, "venus-encode= r"); + if (ret) + goto err; + + ret =3D of_changeset_apply(core->ocs); + if (ret) { + dev_err(dev, "applying changeset fail ret %d\n", ret); + goto err; + } + + return 0; +err: + of_changeset_destroy(core->ocs); + kfree(core->ocs); + core->ocs =3D NULL; + return ret; +} + +static void venus_remove_dynamic_nodes(struct venus_core *core) +{ + if (core->ocs) { + of_changeset_revert(core->ocs); + of_changeset_destroy(core->ocs); + kfree(core->ocs); + } +} +#else +static int venus_add_dynamic_nodes(struct venus_core *core) +{ + return 0; +} + +static void venus_remove_dynamic_nodes(struct venus_core *core) {} +#endif + static int venus_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; @@ -365,9 +448,15 @@ static int venus_probe(struct platform_device *pdev) if (ret < 0) goto err_runtime_disable; =20 + if (core->res->dec_nodename || core->res->enc_nodename) { + ret =3D venus_add_dynamic_nodes(core); + if (ret) + goto err_runtime_disable; + } + ret =3D of_platform_populate(dev->of_node, NULL, NULL, dev); if (ret) - goto err_runtime_disable; + goto err_remove_dynamic_nodes; =20 ret =3D venus_firmware_init(core); if (ret) @@ -411,6 +500,8 @@ static int venus_probe(struct platform_device *pdev) venus_firmware_deinit(core); err_of_depopulate: of_platform_depopulate(dev); +err_remove_dynamic_nodes: + venus_remove_dynamic_nodes(core); err_runtime_disable: pm_runtime_put_noidle(dev); pm_runtime_disable(dev); @@ -443,6 +534,8 @@ static void venus_remove(struct platform_device *pdev) =20 venus_firmware_deinit(core); =20 + venus_remove_dynamic_nodes(core); + pm_runtime_put_sync(dev); pm_runtime_disable(dev); =20 diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platf= orm/qcom/venus/core.h index 27784fd7082c321222b23ca4b2902a04c49e19ca..306231b4f7d0201175974b4a425= 74f30d23e08f0 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -90,6 +90,8 @@ struct venus_resources { u32 cp_nonpixel_start; u32 cp_nonpixel_size; const char *fwname; + const char *enc_nodename; + const char *dec_nodename; }; =20 enum venus_fmt { @@ -171,6 +173,7 @@ struct venus_format { * @root: debugfs root directory * @venus_ver: the venus firmware version * @dump_core: a flag indicating that a core dump is required + * @ocs: OF changeset pointer */ struct venus_core { void __iomem *base; @@ -235,6 +238,7 @@ struct venus_core { u32 rev; } venus_ver; unsigned long dump_core; + struct of_changeset *ocs; }; =20 struct vdec_controls { --=20 2.47.1 From nobody Wed Dec 17 16:11:04 2025 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.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 171AE1B0427 for ; Mon, 30 Dec 2024 17:00:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578049; cv=none; b=H6D+W2siE+UtwDU+RP5PZ0hMFw5d3m1nSh214DKTwxyk3RQIs/YR05J5C/eijdg/47buMNfT/LIjBaXypvzE9QHQn4zL3STv0TxbKz8qtWDZJ5ZWUcKuGiGOhR3O5c568pVvRUax/mGR2K8TKA7T8WSo4UE90H88djNcDlA6nYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578049; c=relaxed/simple; bh=sybGaLnj3ltEDFRmlBACceTqpOlLG+m+adlX7m6/aV4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tpAUaWKU1CR4BJs2FHKKKRC/APlyfM8RWNdfR44B2zX09K6KCsI7CxEpFzUuhAPtMiZy8KGckOL1CJbQycGnUSvb0ml+e57JOXTJmfXVky3a5jbLgfnZJNcznKpAVCMmeqStiNABAwTIvb0vOXrwAOkGl/TZ9jGKhGDwpXYvfRk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Aq6BaVge; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Aq6BaVge" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4361f796586so98110005e9.3 for ; Mon, 30 Dec 2024 09:00:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735578045; x=1736182845; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DFMvmwBjOS8ynKh8e2OTYX9BXR1Oya1ErnlXSM9INko=; b=Aq6BaVgewS421/8i2GNmb3Bvo72qJBcgRK+u8S5Gu9GGDK9XrEzi6YCwhPjtxj/D6K 6Lla2Q7fNKt2HxPZlbdVrJSG7JgLLFrGAzii02JC3EMJ9cYKGY/j86Xnp4QNvjsl7TYs iSxw5xhoC+u/XAIEKue51SBMqEu8n4WPOcO3LVTk83ydkErUK8Eq8SHc4f19r7W41NmK DYEbJcO34+ILZjiN0YGPQWnhtOLmcjuhbgQF1xx3pK5+3SCHzkgSCGxFlq0+EjIjv367 j48EAhkerbxqma2rzKSCk11oQl2xIsr/FNkfezL3TCFgkb2UMlC0CBtXSJTePoVeQmWo 7wsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735578045; x=1736182845; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DFMvmwBjOS8ynKh8e2OTYX9BXR1Oya1ErnlXSM9INko=; b=PrTIO/XtDYis6gUhgdLOqS7Gd0NF+W5okB7CV3HJUT8b6wxY7WyKccyCkMIFlFXBMF E2fNxWYyfRMC+dxjRYQe3afUXp+uH9kUu1B4kqPu8QKswuHy8su6PRXZ4VXH1nIe3K9J A9ZYb+mfqdLI32+j8b9O+cdg+W+d3K83rS77Sqs4Pbv1fMFwNg04HCjRlCquhWbYhoNM /a9hk6gjMC1oFWPHrVYGUtlNCrngJ8R/FVhjAFUTjsVvE87lcJn6qVAoINj0PMWbCMZP 25VWbgt4pptoVGcfi+MYf9yMInT5gv94yyIEPGkMkB05EJgznqNNu+L9alNsqeludiHZ 2+HQ== X-Forwarded-Encrypted: i=1; AJvYcCUQ6VbIZGp6A9ETuSMWyzibTf6NDWsQ3YmsJQ375xAghdjGRtHnUUcPC5V/XV5rMeR8HwZd+wvE5DdlagY=@vger.kernel.org X-Gm-Message-State: AOJu0YymqXh0DB5/ni+m2cl4EfyOG0mwAPQntp6jm4DJlIAvmfWNpqMh bfSKMPnP09Pj98hhbjMzJpI4YIpxEH/v/RE+uCb1PKaP8m3jRziOmjzwhFglUZw= X-Gm-Gg: ASbGncskmZs2xKKmuIdoEogEPWYNw+BFa2BNdyRc1/4e4VVbjUvRIK0IU1OVWCPzHnp Zqanjk/VGkxHj0xZm/vlc6GxqXjoyzRJRd6khBLGTIPgh4nsNSnkfQi+vGFhbrK0aGWDaXtLibs Dw0RW5x77MxU0Yk1RsMqJm52d4S+ZbUCEQ4DE0QoEciZ/zmfZypl7/+fuwEH5Iwp6jIo5pzmfLx vcPBgDq3RFKmzozH4m+pO3MYK9cMOKoyHIhA6EvmrrmgjHems3LiEUfOCfvJUR5zA== X-Google-Smtp-Source: AGHT+IH/DkrksxLg++wudOsym95SLZxga+heGUPIbkXH9u7A0BMDRm2vHcoMjTz9WgpvhPuFzjPnAg== X-Received: by 2002:a05:600c:474d:b0:436:18d0:aa6e with SMTP id 5b1f17b1804b1-4366835c14fmr310233175e9.5.1735578044060; Mon, 30 Dec 2024 09:00:44 -0800 (PST) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611fc161sm359757955e9.10.2024.12.30.09.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 09:00:43 -0800 (PST) From: Bryan O'Donoghue Date: Mon, 30 Dec 2024 17:00:34 +0000 Subject: [PATCH v6 2/3] media: venus: Populate video encoder/decoder nodename entries Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-2-a4d5070d3aaa@linaro.org> References: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-0-a4d5070d3aaa@linaro.org> In-Reply-To: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-0-a4d5070d3aaa@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: quic_renjiang@quicinc.com, quic_vnagar@quicinc.com, quic_dikshita@quicinc.com, konradybcio@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stanimir Varbanov , Bryan O'Donoghue X-Mailer: b4 0.15-dev-dedf8 Populate encoder and decoder node-name entries for the upstream parts. Once done the compat=3D"video-encoder" and compat=3D"video-decoder" in the dtsi = can be dropped though the venus driver will continue to favour DT declared video-encoder/video-decoder declarations over static declarations for compatibility. Tested-by: Renjiang Han Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platf= orm/qcom/venus/core.c index fe24bccff08aed1ebdfe00f75e1aa5b67ae7826e..56415d459c290fa029921da55ba= e54f752135f0f 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -675,6 +675,8 @@ static const struct venus_resources msm8916_res =3D { .vmem_addr =3D 0, .dma_mask =3D 0xddc00000 - 1, .fwname =3D "qcom/venus-1.8/venus.mbn", + .dec_nodename =3D "video-decoder", + .enc_nodename =3D "video-encoder", }; =20 static const struct freq_tbl msm8996_freq_table[] =3D { @@ -884,6 +886,8 @@ static const struct venus_resources sdm845_res_v2 =3D { .cp_nonpixel_start =3D 0x1000000, .cp_nonpixel_size =3D 0x24800000, .fwname =3D "qcom/venus-5.2/venus.mbn", + .dec_nodename =3D "video-core0", + .enc_nodename =3D "video-core1", }; =20 static const struct freq_tbl sc7180_freq_table[] =3D { @@ -932,6 +936,8 @@ static const struct venus_resources sc7180_res =3D { .cp_nonpixel_start =3D 0x1000000, .cp_nonpixel_size =3D 0x24800000, .fwname =3D "qcom/venus-5.4/venus.mbn", + .dec_nodename =3D "video-decoder", + .enc_nodename =3D "video-encoder", }; =20 static const struct freq_tbl sm8250_freq_table[] =3D { @@ -987,6 +993,8 @@ static const struct venus_resources sm8250_res =3D { .vmem_addr =3D 0, .dma_mask =3D 0xe0000000 - 1, .fwname =3D "qcom/vpu-1.0/venus.mbn", + .dec_nodename =3D "video-decoder", + .enc_nodename =3D "video-encoder", }; =20 static const struct freq_tbl sc7280_freq_table[] =3D { @@ -1049,6 +1057,8 @@ static const struct venus_resources sc7280_res =3D { .cp_nonpixel_start =3D 0x1000000, .cp_nonpixel_size =3D 0x24800000, .fwname =3D "qcom/vpu-2.0/venus.mbn", + .dec_nodename =3D "video-decoder", + .enc_nodename =3D "video-encoder", }; =20 static const struct of_device_id venus_dt_match[] =3D { --=20 2.47.1 From nobody Wed Dec 17 16:11:04 2025 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 B36951B0433 for ; Mon, 30 Dec 2024 17:00:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578051; cv=none; b=uMFVj7y8OddGTcInktDsC42yFqpxOPKt2fIAQN1HfCXdiT6mPj2rKCOAKB+dkXqEDB3vwZryaUY+1LbNq6xddbraRkJaXsV2SWrsQBwlOHeBFLOJZMDTL9L/oe7/BdWrFCo5lOmhJqVLb+pyv56cAua7fo8uQz4rd4inRMGuRV8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735578051; c=relaxed/simple; bh=lveT01XJFbPiCHFrg6nSo0zlm6T0yWAAHdtlgddNXio=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=njN1UotNJNw52mF9jhG1YSIZCBZUlpJrWJj0AAw42A4/XI3AHN4IdPhQR6Ptg1Qy216S1WIudUho9iFsmph6d97FpYMUL9qakVBxIW5vezd/u8O7AMEeqmAVTokqL8wEwGn5NPoKLPjdJNOTFVdAhM5WAnEOVHZA0OYnpvtCVGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=W5AVc4rG; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W5AVc4rG" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-3862d161947so4487093f8f.3 for ; Mon, 30 Dec 2024 09:00:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735578046; x=1736182846; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=t3dDvW0+Cz6kszp6aCIpBOpaxsGIqiTVCAZVfI6Gurs=; b=W5AVc4rG2MH4lbUskBbmtjaiyUOjnwZ8oEpA4A8X+of9iwLhLQ+ypGyjJ6pLD1m05E ObL+QIVrUcKtjEt3Jb4daGxcghJLBt69UgSLaf1km0EdZgazjs+//fkMlET4olH3l+gd GSGIPM2qsgYxtIq+X+ScsejvqFF0mnYwVwSfiB3LKo7h4tOo5Hw+5woWlkMTa5UyloCo R3vaGVff1adUK4UmtE2cIwW7pTacaxzGrO0LdK/AP50H28MfSBAEtEuLbLcjCwjNDG8Q gWzLX/aN4vvp/Z6sR9PT5j4UBMQNhED1DnEUkabm1ZVP+QHDtoDbOEaEuz4d7tX8Jz6Z cOlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735578046; x=1736182846; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t3dDvW0+Cz6kszp6aCIpBOpaxsGIqiTVCAZVfI6Gurs=; b=sXRBE9u8FQKDVjdYBvRrllVz9EKWBLzI1Ea4FlNA8D4QzwJ+g3xnDAh7f1ty5iVsuT 9N5QiSxdYUMxNYtiTKHUGgbEWrJzoOeJFkUQaereqClqfFhV+xly3wG/QsHtj3sAWHhT lRuHiKjSAxoxUgZYUGyNH/U8daMngP22AAg/7VWAYqTCgiRY3NbgaO7QSeRHJAqM470G 0qXQC2ONGyTAHfOBW7CmtfT0E/GB/RUmS04ur3/nykyOEPo5QJCrXXFk0fYloZL83wY/ bYCXwtz++mNcE01KXC4TV/Z2ihq9GQYjY5YHPNUcyM3qpagdM2V88z0RJ7Eng4U+HncG iZWg== X-Forwarded-Encrypted: i=1; AJvYcCWedov8d7NJBkSuBbCW2quxpb2AY9G3ZWX4rdA4CwNdzXXY7UjSk3+P19GQoWMZOEZxnDew10AX6dqIU7k=@vger.kernel.org X-Gm-Message-State: AOJu0YxTGKio79Haf9+0XBQC67VS2FnIZUvhGyZh2xRe/voWYB9RVgN9 h+EwRosTl+kMk7kMR8ydsHudAXX3ho0LBo7rx4AEqFtRRGzejMVlugy2tTJKE74= X-Gm-Gg: ASbGncs4vgmCMXwoOBxOHP/ybOlYz2LW4iyy5B7KUPbB1gKfBy+aQ4Giw1cc5OEBf9e K+lFVUyPdDLosr8Cd12CueqBFImyNtOQZtGsVUvBR5tojrchUPPhq59+5X8b25PvHVd6P3FrAig /Zl4qXt49oUXKL0X0bchTname0627FpXh7KwJpw63xelyzldXGJyte074NxSqclqhgOM0646ZLP /1tSwlIrBcKMxjM9ni0ZVATTZJP5n16+wFAO447pQiF5K7UEHA03aJl7N56a586GA== X-Google-Smtp-Source: AGHT+IFoQuecmMEqmlM8wzWMcChbvuztNzebTrloFvz2r4fCOv6EyW/iVu2r8l0AOzhM8x6DgdV2Tg== X-Received: by 2002:a05:6000:4913:b0:385:f1f2:13ee with SMTP id ffacd0b85a97d-38a223f71bamr30161080f8f.46.1735578046024; Mon, 30 Dec 2024 09:00:46 -0800 (PST) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611fc161sm359757955e9.10.2024.12.30.09.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 09:00:44 -0800 (PST) From: Bryan O'Donoghue Date: Mon, 30 Dec 2024 17:00:35 +0000 Subject: [PATCH v6 3/3] media: dt-bindings: qcom-venus: Deprecate video-decoder and video-encoder where applicable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-3-a4d5070d3aaa@linaro.org> References: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-0-a4d5070d3aaa@linaro.org> In-Reply-To: <20241230-media-staging-24-11-25-rb3-hw-compat-string-v6-0-a4d5070d3aaa@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: quic_renjiang@quicinc.com, quic_vnagar@quicinc.com, quic_dikshita@quicinc.com, konradybcio@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stanimir Varbanov , Bryan O'Donoghue , Krzysztof Kozlowski X-Mailer: b4 0.15-dev-dedf8 For the list of yaml files here the video-decoder and video-encoder nodes provide nothing more than configuration input for the driver. These entries do not in fact impart hardware specific data and should be deprecated. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- .../devicetree/bindings/media/qcom,msm8916-venus.yaml | 12 ++------= ---- .../devicetree/bindings/media/qcom,sc7180-venus.yaml | 12 ++------= ---- .../devicetree/bindings/media/qcom,sc7280-venus.yaml | 12 ++------= ---- .../devicetree/bindings/media/qcom,sdm845-venus-v2.yaml | 12 ++------= ---- .../devicetree/bindings/media/qcom,sm8250-venus.yaml | 12 ++------= ---- 5 files changed, 10 insertions(+), 50 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yam= l b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml index 9410f13ca97c181973c62fe62d0399fc9e82f05d..da140c2e3d3f3c3e886496e3e23= 03eda1df99bb4 100644 --- a/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,msm8916-venus.yaml @@ -45,6 +45,7 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 video-encoder: @@ -57,13 +58,12 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 required: - compatible - iommus - - video-decoder - - video-encoder =20 unevaluatedProperties: false =20 @@ -83,12 +83,4 @@ examples: power-domains =3D <&gcc VENUS_GDSC>; iommus =3D <&apps_iommu 5>; memory-region =3D <&venus_mem>; - - video-decoder { - compatible =3D "venus-decoder"; - }; - - video-encoder { - compatible =3D "venus-encoder"; - }; }; diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml index 5cec1d077cda77817f6d876109defcb0abbfeb2c..83c4a5d95f020437bd160d64568= 50bc84a2cf5ff 100644 --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml @@ -70,6 +70,7 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 video-encoder: @@ -82,14 +83,13 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 required: - compatible - power-domain-names - iommus - - video-decoder - - video-encoder =20 unevaluatedProperties: false =20 @@ -114,12 +114,4 @@ examples: "vcodec0_core", "vcodec0_bus"; iommus =3D <&apps_smmu 0x0c00 0x60>; memory-region =3D <&venus_mem>; - - video-decoder { - compatible =3D "venus-decoder"; - }; - - video-encoder { - compatible =3D "venus-encoder"; - }; }; diff --git a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml index 10c334e6b3dcf25967fa438f8e6e5035448af1b9..413c5b4ee6504ba1d5fe9f74d5b= e04ad8c90c318 100644 --- a/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sc7280-venus.yaml @@ -68,6 +68,7 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 video-encoder: @@ -80,14 +81,13 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 required: - compatible - power-domain-names - iommus - - video-decoder - - video-encoder =20 unevaluatedProperties: false =20 @@ -125,14 +125,6 @@ examples: =20 memory-region =3D <&video_mem>; =20 - video-decoder { - compatible =3D "venus-decoder"; - }; - - video-encoder { - compatible =3D "venus-encoder"; - }; - video-firmware { iommus =3D <&apps_smmu 0x21a2 0x0>; }; diff --git a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.y= aml b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml index 6228fd2b324631f3138e128c918266da58f6b544..c839cb1ebc0999e10b865f4bb43= ea76ffa2bf46d 100644 --- a/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sdm845-venus-v2.yaml @@ -70,6 +70,7 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 video-core1: @@ -82,14 +83,13 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 required: - compatible - power-domain-names - iommus - - video-core0 - - video-core1 =20 unevaluatedProperties: false =20 @@ -119,12 +119,4 @@ examples: iommus =3D <&apps_smmu 0x10a0 0x8>, <&apps_smmu 0x10b0 0x0>; memory-region =3D <&venus_mem>; - - video-core0 { - compatible =3D "venus-decoder"; - }; - - video-core1 { - compatible =3D "venus-encoder"; - }; }; diff --git a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml= b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml index f66033ae8b590e7b6f1e344c368994744411aca2..da54493220c9dc90e7d9f5fcfce= 7590acb241c85 100644 --- a/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sm8250-venus.yaml @@ -73,6 +73,7 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 video-encoder: @@ -85,6 +86,7 @@ properties: required: - compatible =20 + deprecated: true additionalProperties: false =20 required: @@ -95,8 +97,6 @@ required: - iommus - resets - reset-names - - video-decoder - - video-encoder =20 unevaluatedProperties: false =20 @@ -132,12 +132,4 @@ examples: resets =3D <&gcc GCC_VIDEO_AXI0_CLK_ARES>, <&videocc VIDEO_CC_MVS0C_CLK_ARES>; reset-names =3D "bus", "core"; - - video-decoder { - compatible =3D "venus-decoder"; - }; - - video-encoder { - compatible =3D "venus-encoder"; - }; }; --=20 2.47.1