From: Johan Hovold <johan@kernel.org>
To: Dikshita Agarwal <quic_dikshita@quicinc.com>
Cc: "Vikash Garodia" <quic_vgarodia@quicinc.com>,
"Abhinav Kumar" <quic_abhinavk@quicinc.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Hans Verkuil" <hverkuil@xs4all.nl>,
"Sebastian Fricke" <sebastian.fricke@collabora.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Nicolas Dufresne" <nicolas@ndufresne.ca>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Jianhua Lu" <lujianhua000@gmail.com>,
"Stefan Schmidt" <stefan.schmidt@linaro.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Bjorn Andersson" <andersson@kernel.org>
Subject: Re: [PATCH v9 27/28] media: iris: enable video driver probe of SM8250 SoC
Date: Thu, 9 Jan 2025 16:11:04 +0100 [thread overview]
Message-ID: <Z3_nCPk_g8znto4A@hovoldconsulting.com> (raw)
In-Reply-To: <20241212-qcom-video-iris-v9-27-e8c2c6bd4041@quicinc.com>
On Thu, Dec 12, 2024 at 05:21:49PM +0530, Dikshita Agarwal wrote:
> Initialize the platform data and enable video driver probe of SM8250
> SoC. Add a kernel param to select between venus and iris drivers for
> platforms supported by both drivers, for ex: SM8250.
Why do you want to use a module parameter for this? What would be the
default configuration? (Module parameters should generally be avoided.)
Why not simply switch to the new driver (and make sure that the new
driver is selected if the old one was enabled in the kernel config)?
> Tested-by: Stefan Schmidt <stefan.schmidt@linaro.org> # x1e80100 (Dell
Looks like something is missing from Stefan's Tested-by tag throughout
the series ("Dell XPS13"?)
> Reviewed-by: Stefan Schmidt <stefan.schmidt@linaro.org>
> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
> +static bool prefer_venus = true;
> +MODULE_PARM_DESC(prefer_venus, "Select whether venus or iris driver should be preferred");
> +module_param(prefer_venus, bool, 0444);
> +
> +/* list all platforms supported by only iris driver */
> +static const char *const iris_only_platforms[] = {
> + "qcom,sm8550-iris",
> + NULL,
> +};
Surely you don't want to have to add every new platform to two tables
(i.e. the id table and again here).
> +
> +/* list all platforms supported by both venus and iris drivers */
> +static const char *const venus_to_iris_migration[] = {
> + "qcom,sm8250-venus",
> + NULL,
> +};
> +
> +static bool video_drv_should_bind(struct device *dev, bool is_iris_driver)
> +{
> + if (of_device_compatible_match(dev->of_node, iris_only_platforms))
> + return is_iris_driver;
> +
> + /* If it is not in the migration list, use venus */
> + if (!of_device_compatible_match(dev->of_node, venus_to_iris_migration))
> + return !is_iris_driver;
> +
> + return prefer_venus ? !is_iris_driver : is_iris_driver;
> +}
> +
> static int iris_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -196,6 +224,9 @@ static int iris_probe(struct platform_device *pdev)
> u64 dma_mask;
> int ret;
>
> + if (!video_drv_should_bind(&pdev->dev, true))
> + return -ENODEV;
AFAICT nothing is preventing venus from binding even when 'prefer_venus'
is false.
> +
> core = devm_kzalloc(&pdev->dev, sizeof(*core), GFP_KERNEL);
> if (!core)
> return -ENOMEM;
> @@ -324,6 +355,10 @@ static const struct of_device_id iris_dt_match[] = {
> .compatible = "qcom,sm8550-iris",
> .data = &sm8550_data,
> },
> + {
> + .compatible = "qcom,sm8250-venus",
> + .data = &sm8250_data,
> + },
> { },
> };
> MODULE_DEVICE_TABLE(of, iris_dt_match);
Johan
next prev parent reply other threads:[~2025-01-09 15:11 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 11:51 [PATCH v9 00/28] Qualcomm iris video decoder driver Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 01/28] dt-bindings: media: Add video support for QCOM SM8550 SoC Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 02/28] media: iris: add platform driver for iris video device Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 03/28] media: iris: implement iris v4l2 file ops Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 04/28] media: iris: introduce iris core state management with shared queues Dikshita Agarwal
2025-01-15 12:45 ` Markus Elfring
2024-12-12 11:51 ` [PATCH v9 05/28] media: iris: implement video firmware load/unload Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 06/28] media: iris: implement boot sequence of the firmware Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 07/28] media: iris: introduce host firmware interface with necessary hooks Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 08/28] media: iris: implement power management Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 09/28] media: iris: implement reqbuf ioctl with vb2_queue_setup Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 10/28] media: iris: implement s_fmt, g_fmt and try_fmt ioctls Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 11/28] media: iris: implement g_selection ioctl Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 12/28] media: iris: implement enum_fmt and enum_framesizes ioctls Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 13/28] media: iris: implement subscribe_event and unsubscribe_event ioctls Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 14/28] media: iris: implement iris v4l2_ctrl_ops Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 15/28] media: iris: implement query_cap ioctl Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 16/28] media: iris: implement vb2 streaming ops Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 17/28] media: iris: implement set properties to firmware during streamon Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 18/28] media: iris: subscribe parameters and properties to firmware for hfi_gen2 Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 19/28] media: iris: allocate, initialize and queue internal buffers Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 20/28] media: iris: implement vb2 ops for buf_queue and firmware response Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 21/28] media: iris: add support for dynamic resolution change Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 22/28] media: iris: handle streamoff/on from client in " Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 23/28] media: iris: add support for drain sequence Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 24/28] media: iris: add check whether the video session is supported or not Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 25/28] media: iris: implement power scaling for vpu2 and vpu3 Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 26/28] media: iris: add check to allow sub states transitions Dikshita Agarwal
2024-12-12 11:51 ` [PATCH v9 27/28] media: iris: enable video driver probe of SM8250 SoC Dikshita Agarwal
2024-12-23 10:30 ` Mauro Carvalho Chehab
2024-12-23 10:51 ` Dikshita Agarwal
2025-01-07 13:57 ` Nicolas Dufresne
2025-01-08 7:43 ` Dikshita Agarwal
2025-01-08 7:47 ` Hans Verkuil
2025-01-08 8:51 ` Dikshita Agarwal
2025-01-08 8:55 ` Hans Verkuil
2025-01-08 10:21 ` Dikshita Agarwal
2025-01-08 10:43 ` Hans Verkuil
2025-01-08 11:12 ` Dikshita Agarwal
2025-01-08 14:52 ` Mauro Carvalho Chehab
2025-01-09 8:43 ` Dikshita Agarwal
2025-01-09 9:49 ` Stanimir Varbanov
2025-01-09 10:37 ` Hans Verkuil
2025-01-09 15:11 ` Johan Hovold [this message]
2025-01-09 17:48 ` Vikash Garodia
2025-01-10 14:28 ` Johan Hovold
2025-01-10 17:30 ` Dikshita Agarwal
2025-01-10 18:01 ` Dmitry Baryshkov
2025-01-11 10:45 ` Hans Verkuil
2025-01-13 8:51 ` Dmitry Baryshkov
2025-01-15 15:15 ` Bryan O'Donoghue
2025-02-03 8:39 ` Johan Hovold
2025-02-03 15:37 ` Dmitry Baryshkov
2025-02-04 9:52 ` Johan Hovold
2025-02-04 15:35 ` Dmitry Baryshkov
2025-02-04 16:22 ` Johan Hovold
2025-01-10 0:12 ` Dmitry Baryshkov
2025-01-15 22:49 ` Bryan O'Donoghue
2025-01-15 22:51 ` Bryan O'Donoghue
2025-01-16 1:23 ` Dmitry Baryshkov
2024-12-12 11:51 ` [PATCH v9 28/28] media: MAINTAINERS: add Qualcomm iris video accelerator driver Dikshita Agarwal
2024-12-14 11:04 ` [PATCH v9 00/28] Qualcomm iris video decoder driver Krzysztof Kozlowski
2024-12-16 14:48 ` Neil Armstrong
2025-01-06 12:36 ` Joel Stanley
2025-01-06 12:46 ` Joel Stanley
2025-01-08 9:54 ` Dikshita Agarwal
2025-01-08 9:52 ` Dikshita Agarwal
2025-01-08 11:00 ` Dmitry Baryshkov
2025-01-09 14:58 ` Johan Hovold
2025-01-22 15:34 ` Stefan Schmidt
2025-02-03 8:43 ` Johan Hovold
2025-02-03 9:27 ` Vikash Garodia
2025-01-15 22:57 ` Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z3_nCPk_g8znto4A@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=hverkuil@xs4all.nl \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lujianhua000@gmail.com \
--cc=mchehab@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nicolas@ndufresne.ca \
--cc=p.zabel@pengutronix.de \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=robh@kernel.org \
--cc=sebastian.fricke@collabora.com \
--cc=stefan.schmidt@linaro.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox