From nobody Wed Dec 17 16:11:39 2025 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 8BC742206A5 for ; Mon, 9 Dec 2024 11:52:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733745180; cv=none; b=qyoQ7yXJ190C3jCOUnBK/smbGm++OnLZUsSGgbvjKdkO/WfYzXVNoQDy8S0S2QsECnkuU0G6E+eM+J3p4uySg/Aukgmmw0HSpE7ziiJXryJ0DTHvuzMZ7b7ySNwtxGCHiHKEmG3Zrdo24l1qf+KPbowkpDMhbrAgSFyxh4YvtnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733745180; c=relaxed/simple; bh=MUj9GEOsI8x/GUI7Cn3GA34WkthggJJh0pVciz+tOzY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qsUJIPrYWTVdqNdJnbVGMUz4w9eN/aFcw2S7sSs7yxTTS5tkIZLTmb+2ylpFucrKniPhQMOwzRES1jqrA9RhVHYZhI5Gfy1itax64cdAZeKlWUkN9V+b4Oi62xovVmAB0qtD8/+RhIW1fcTNvw5GHkpEkPJhFbw8GxZvLySMPag= 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=qNcY2QWq; arc=none smtp.client-ip=209.85.218.54 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="qNcY2QWq" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-aa5f1909d6fso807372666b.3 for ; Mon, 09 Dec 2024 03:52:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733745177; x=1734349977; 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=zmy83kro+8flL7LgVM3y5DWoO7YZdsYDOqXSagXiZjQ=; b=qNcY2QWqFK31ocHgugSLzwjUPZ31IhPkrVhWdtGH6zsGGITak0wwXv+EJWEUcZYT4g zPmb/7+TVYxK6jCqd5bh7LY1MnlC0gfa6HGYIW3on/+nos2/5TDWtAjLF6hqCsq88wXh h81chr29XBzOv2Ngth8j4HIcrT7NG8Dh6C1UIiVJgLiVzN0VzseLYmzst8Ampmw94wui +LNBajs8K/9JF6mgImIj8KgDZqla62llTEDWwrjTR2+f5Nlo/kQ9GP7sMzckjkUpBMm8 GhkNrPpDDYKmDiYggskLTLjuOdkIAzUSQHKihFopyXkdMB2+Yuw3TTnKlbcJxLM+a8AR ZA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733745177; x=1734349977; 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=zmy83kro+8flL7LgVM3y5DWoO7YZdsYDOqXSagXiZjQ=; b=gh/WT+lhVsy+ldfHB5g4NtxbXGr7eMoH3NEpwwW6lFIbBu1tEZs+AMPh+5K7E54SiJ 5Hkyt70yOAuyPE1fXHsRhUXsuCKgOrpuWaa/9fOa0JeDPbxekxY0iAWSp0FOrRwSCdP3 FnNxIKca+syhIo/w7NceqMjJL+2LaIJxeVAd472f1+EnAuyjdHA8exBmfZCc5Ghj8keY 2WQ8pZoWld1ZNcsaNd9b0UERivO76kaT+yn2NgxvyJipx40ypS538kyo+k4at1yUFJVl 0vejdaS0+zSIlRu4IZwbn1ozLB+aQ+kmWjkyCPCKH9lgH0HhkvTvqtQjuzVxjusyxveI Svrw== X-Forwarded-Encrypted: i=1; AJvYcCXCIQ+5LaeHo4oe5NOZ70jBzuIvfi+DqsHJ8Espfmnd6BEJyYgFED6OgAbXoUluh5L5pD3M+hqaxo8LV1A=@vger.kernel.org X-Gm-Message-State: AOJu0YwIWsLQpPXhpzZAOeeLkP/kD3pu1cE4adnX7FdQdHqCHJ+qnidH bxy1GsM2ijqGbqueBH3ZgTAf7lHV+wblWxF+ZsmFinUm0HBGoUSUsCBpiOpqoik= X-Gm-Gg: ASbGnctlhJ6XLg0FA+l1BEufgULUBAGv6edgcgE5xCkj4oOORCgqIoTavRYSYBtusrf XqVxsy8gX8TN2og16tMOHuooO8NeAa29+V0gdQ22c8xm1V1OQ5V8XeIipP9aveP2ya7WQLIjfnO 6adbcPm8FaIJc6YaNXFV6j7Q7janixtGKUq4+aWVp9Fw3lQa5h9KyXNyWRMHVU0/DqgcnMu59uq b45BmC1dUow7lwmVivYRc6bnyPU6yNFvPFsHeXvPHwpzDL5igFMgvbCKSM= X-Google-Smtp-Source: AGHT+IGiWbOTy8zye1QYnkmHeO+nIc+nRXYGew0YVSqcwnSc2t4cADrXq8qKclvHTVj6CC4TOLtF7w== X-Received: by 2002:a17:906:9555:b0:aa6:8275:2239 with SMTP id a640c23a62f3a-aa69ce44c4fmr966766b.57.1733745176691; Mon, 09 Dec 2024 03:52:56 -0800 (PST) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa677968cdbsm247614266b.125.2024.12.09.03.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 03:52:56 -0800 (PST) From: Bryan O'Donoghue Date: Mon, 09 Dec 2024 11:52:53 +0000 Subject: [PATCH v5 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: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-1-ef7e5f85f302@linaro.org> References: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-0-ef7e5f85f302@linaro.org> In-Reply-To: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-0-ef7e5f85f302@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 Signed-off-by: Bryan O'Donoghue Tested-by: Renjiang Han --- drivers/media/platform/qcom/venus/Kconfig | 1 + drivers/media/platform/qcom/venus/core.c | 94 +++++++++++++++++++++++++++= +++- drivers/media/platform/qcom/venus/core.h | 4 ++ 3 files changed, 98 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..88dfa9f240dc6d18a7f58dc06b1= bf10274b7121e 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,14 @@ 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) { + if (venus_add_dynamic_nodes(core)) + 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 +499,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 +533,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:39 2025 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 91F3B221DB0 for ; Mon, 9 Dec 2024 11:52:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733745181; cv=none; b=ey9bc/tYQjnEd4T3eBsQsRtrH56ZzoiO6oPjb7AoVuoWDQfqnEtlnZ+ZLMy6ivnmbHPOUZdlCMB+ECDrWY6wM6ke8pJMbgE/lXPa8U/f2wkZefS242ZvIb2CWFWZlcSJJkmGZ/NNKdbTp7tclIV0FfNZs2eEkzpnZ0fUD/WCS4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733745181; c=relaxed/simple; bh=pf4aKmzgi3RBLEJZUi/1R8tLQs1HmFlgFYPDOVq6wOI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pznHxMJY7v9ndQ2dKEbLNO5rgsgazvlIqyseXHwoIWHnaMLB020UYAKXYJlrVtVt7kCzymxEZMzXHGZsxxpoLMgLaMtIGoiIrsB1xoPQ57yEh9NbXftLIVqHW1cBlzcFBFMgXNsdYw+Y00pMeZlG368TsHtSeueL26Hq8OPUBpQ= 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=XVDatnvf; arc=none smtp.client-ip=209.85.218.43 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="XVDatnvf" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9e44654ae3so683223166b.1 for ; Mon, 09 Dec 2024 03:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733745178; x=1734349978; 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=2Ss0In4eAnB21GaaJYNQJneoRBodNwxSKbh+KMZRPV4=; b=XVDatnvfBMdi6nK2Qd2P2XUS32nDIY1UW428Tp+9D4Yemxeoci7tcxsoQITJcQigJ2 XhLsB/HIMnz4dh54jyBfhJgUS++iKg3yY8CUa2RCuDRhLOy3tpOU6sHgUpLax3qiY5aO jXVJh4muVWEVAbgkzg0dZt2qIDt00OE61qjwqpb+9xiGHiXEUnMkT8RG+UfTShtFKRkx eZzQ4UMsDPxi+1v75+OHRnOoBxG4LH5Xd0aWXlvYBJ37dLg8mFi+YAiUkPsIpmmL/gcv NQvdLGzSHsF0vG2G6yza2NITpRg1Z22Vyd9ZfCFMZFLfK6yF2Zf+We7GEwhpSlynyk9Z lgCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733745178; x=1734349978; 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=2Ss0In4eAnB21GaaJYNQJneoRBodNwxSKbh+KMZRPV4=; b=I8WEgjsJl7KGRaL+mJ6RfzMpTyCp3Mub/eGZ4G4p2dlFAYxz0xph+hO3ZJ985cjj3S jMfKS+57hsJjJePzvHEPcFXaoBcN1NqnHLYkNNTdGcsCBKx2Mg8zlk9mfkgcycscXs4t uyoMCcPyqBerRMMPNIuVzwEqPF28nL4CU1PYzXDonTNcmEyJXWOCvRUy+twxexFQr5C+ fp0yO078NYQu58ZSdq+g1JKy2he4C2caxIvdLN2gANeBvzLQgwm0e5CI4I2TVDIpdqTc IHmiMPEFqSgtTAK/hJyhRJI1vXn2Nk9NHo4LDJPOx/OnNMOP+ftogo76vkrN9K+40h05 NCdg== X-Forwarded-Encrypted: i=1; AJvYcCXKVVHc+Dn3j8NJS4hC7AzRVrMppplxYpeDwEtiyCCjWNz3sMyT2NEqTqTFsSBQsvYnMdlxaFu5vA+ipm8=@vger.kernel.org X-Gm-Message-State: AOJu0YwKTqWdVQTI31RzX+rfcBGH35WQFg8ivNENWt2aQff8dQPGJ6Wc x8TDBEnF5skcYRWeD6vBt2P5jZoBrOuJnyfITPbdr0E14j60zEtirNP2ttJ811I= X-Gm-Gg: ASbGncur3FNxH02KxdnqDtq+0S/LsDdnR/xSYNfGdedvwpA4zVSvG0UyTfxYDJbw9Z7 6PPpWGGRnY1kSw/fWxTt0sd91SwG+er6mU799oMeSWHyZpbmvrPSEb6qkHiacXaA0zDw2Id/LG7 /OH3osED2h02Nnc14iGY8GzgyG/cigE/guh4Sifub4O3gp6qmVKN/vsZNAnfpYlo18dwKJBMIw8 roglYzciN71f5pDuomfyCdNgHhd8QEmDacX8DBjerkw6Nf4Ci/wgUS/TWc= X-Google-Smtp-Source: AGHT+IHnAeVlLcy4h5Agfr3CS9r8pCDCnLWpdgEYvJe/AP2380juCNdkfMUgMdq1nq6aK1DAonfJOQ== X-Received: by 2002:a17:906:3291:b0:aa6:98b4:ba50 with SMTP id a640c23a62f3a-aa69ce22164mr1753266b.40.1733745177943; Mon, 09 Dec 2024 03:52:57 -0800 (PST) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa677968cdbsm247614266b.125.2024.12.09.03.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 03:52:57 -0800 (PST) From: Bryan O'Donoghue Date: Mon, 09 Dec 2024 11:52:54 +0000 Subject: [PATCH v5 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: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-2-ef7e5f85f302@linaro.org> References: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-0-ef7e5f85f302@linaro.org> In-Reply-To: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-0-ef7e5f85f302@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. Signed-off-by: Bryan O'Donoghue Tested-by: Renjiang Han --- 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 88dfa9f240dc6d18a7f58dc06b1bf10274b7121e..deef391d78770b8ae0f486dd3a3= ab44c4ea6a581 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -674,6 +674,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 { @@ -883,6 +885,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 { @@ -931,6 +935,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 { @@ -986,6 +992,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 { @@ -1048,6 +1056,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:39 2025 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 F24032236E2 for ; Mon, 9 Dec 2024 11:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733745184; cv=none; b=fWl7Q9Gf4xMRT/Kad32Rol8PvSxgq7XJLzpSpFtYvFcgpVf5DVvJQ06Xfe5800JrLpma/IUAU++GK/zbkJZgTwYs3mWgg9kmkoc2xM9AcW5Ua0wnvVusGBiBRtkGTN584DdmTJOqxiurXt8SPTEm3B4lsd8po3b/KMjL77W4g34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733745184; c=relaxed/simple; bh=lveT01XJFbPiCHFrg6nSo0zlm6T0yWAAHdtlgddNXio=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p5pBC2PBQxnXkmWYUafw2+Ay9OBnEvyNw4BHZCAEI5Kthv6qdbOGvwCQRSKi6Qry86JPd9W9Q34D1ZW5fAQ61Z9vdCX9m4lh7KDm8GTvcUJLktwSDkMall9eLn7Z5SLKprq7P6VmAVTXJ6495wh5E62eET0GcfxV36lgg41XZ2Q= 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=cRK327lQ; arc=none smtp.client-ip=209.85.218.41 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="cRK327lQ" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-aa68d0b9e7bso139027866b.3 for ; Mon, 09 Dec 2024 03:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733745179; x=1734349979; 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=cRK327lQv1nXa339nvYMPL/x6x1wTObM6V8o+j0SNZ3QKEhX1nsdgWaV7KGn1fX1dA LQ6Gx+PLS/kPIlSp/zz+kKF37p4UlV8egfbq616T4UAOL8pZ8CcvZIzah5Iv555NH3jj 4+WAXXRE8pAsKNtDCRgFk6fd6q8FFiZQLEGftlkxJ/n1fxT4sI560kORK6MHkxr/mo6N DiOzB6T7iaiNxfuJUGj+aNge+iutkcJtNGtSrZ84IHrVDZAARaCF5b6niNrvaaNBgnE6 Z/V5w0t0EIAuID19sKZd+ZXePiOh8pRtOGG7sBDi3FEQ/M+fikcalhN2XTUAjuo2HBZT WEuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733745179; x=1734349979; 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=RwMbv251xIQA8JOUQeOWADEDxT4IL540csgNrX20RyiHU+bgz2j0IwIx69pyJ4ufvO Gwuau9iF+AjzrrYSOVA0K9G4iCU6Q6yTzpbyEYQlMeaoXpUz0u1Cnj7dKERk3Vinz1um 4mzlugnv9AmTyML3oUty8awMS2H6nCBXVOEtlCFlZ4LMWMfJpLWLJxFZlQxI4mIyyIBU 4pWfSHQLCqE1l+BNgvxxEuiciyDtSrrs0vQ2OsGkzYK8mdMMUgYKYHWlqIxq66g+p06W qT63R+BF9medVayxOQPWWqTX0HY8rYa3Cb1KaUWCq1xISb6TekalYjJC7HmujAn2VyHM /xoQ== X-Forwarded-Encrypted: i=1; AJvYcCXg6fx911lipDqcbdb0oTIer46EIH9jJtYq9PaFM9ZMLWzc5zskYNrxCNslytnlikLZHa//iTLOCbnXW6I=@vger.kernel.org X-Gm-Message-State: AOJu0Yws8cxeq24qjnEej0FiDAC+e8qwSAImJT3pnZzASg3TzMSEWxtV KgzcqoN3wG9deZsZccmT6cfHD5OvWAj8mXbTNqLBawN2SuvLo/M7ZDyK1iPjIVE= X-Gm-Gg: ASbGnctPKOkd57i0s8MQBWb2guhGYzM9QcKpw6siXE52gRky4m30z34cBAStVe4WiQh TSuHsCKwSW6CNokL8ylpTnK3++uT2d30mhVHii/S2m908VSjEC/vNb9qfjYjfxttdPxVNWmJS9D ddNipo7cVrabCgNwMiyV16xXS146I/Wgc0IvZOmQod/unpPx5CzMS0CFAxQe/39xkA82T+BtC9d 0emjOQtEH8ULlfSew5hw3BTcpGdDzzI7z3SGRQkE8GKLXUBEf8G/se2xfg= X-Google-Smtp-Source: AGHT+IE2KmIau7W1utfz/bUGmihA/tI1zeIRorx8zV6WkinRpJDJW35i9sOrNPieWod81zle6su0Cg== X-Received: by 2002:a17:906:3082:b0:aa6:7933:8b33 with SMTP id a640c23a62f3a-aa69cd4540fmr5215466b.15.1733745179161; Mon, 09 Dec 2024 03:52:59 -0800 (PST) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa677968cdbsm247614266b.125.2024.12.09.03.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 03:52:58 -0800 (PST) From: Bryan O'Donoghue Date: Mon, 09 Dec 2024 11:52:55 +0000 Subject: [PATCH v5 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: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-3-ef7e5f85f302@linaro.org> References: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-0-ef7e5f85f302@linaro.org> In-Reply-To: <20241209-media-staging-24-11-25-rb3-hw-compat-string-v5-0-ef7e5f85f302@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 Tested-by: Renjiang Han --- .../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