* Re: [PATCH] media: venus: drop bogus probe deferrals
2025-10-17 5:58 ` [PATCH] media: venus: drop bogus probe deferrals Johan Hovold
@ 2025-10-17 11:40 ` Bryan O'Donoghue
2025-10-28 10:43 ` Dikshita Agarwal
2025-10-28 12:36 ` Vikash Garodia
2 siblings, 0 replies; 4+ messages in thread
From: Bryan O'Donoghue @ 2025-10-17 11:40 UTC (permalink / raw)
To: Johan Hovold, Vikash Garodia, Dikshita Agarwal
Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
On 17/10/2025 06:58, Johan Hovold wrote:
> The encoder and decoder platform devices are registered by the venus
> driver as children of the venus device, but even if someone were to mess
> this up no amount of probe deferring is going to conjure up a parent.
>
> Relatedly, the venus driver sets its driver data before registering the
> child devices and if this ever breaks we want to learn about it by
> failing probe.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 5 +----
> drivers/media/platform/qcom/venus/venc.c | 5 +----
> 2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 55c27345b7d8..2d822ad86dce 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -1778,12 +1778,9 @@ static int vdec_probe(struct platform_device *pdev)
> struct venus_core *core;
> int ret;
>
> - if (!dev->parent)
> - return -EPROBE_DEFER;
> -
> core = dev_get_drvdata(dev->parent);
> if (!core)
> - return -EPROBE_DEFER;
> + return -EINVAL;
>
> platform_set_drvdata(pdev, core);
>
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index fba07557a399..f1abd2bdce6b 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -1560,12 +1560,9 @@ static int venc_probe(struct platform_device *pdev)
> struct venus_core *core;
> int ret;
>
> - if (!dev->parent)
> - return -EPROBE_DEFER;
> -
> core = dev_get_drvdata(dev->parent);
> if (!core)
> - return -EPROBE_DEFER;
> + return -EINVAL;
>
> platform_set_drvdata(pdev, core);
>
> --
> 2.49.1
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: venus: drop bogus probe deferrals
2025-10-17 5:58 ` [PATCH] media: venus: drop bogus probe deferrals Johan Hovold
2025-10-17 11:40 ` Bryan O'Donoghue
@ 2025-10-28 10:43 ` Dikshita Agarwal
2025-10-28 12:36 ` Vikash Garodia
2 siblings, 0 replies; 4+ messages in thread
From: Dikshita Agarwal @ 2025-10-28 10:43 UTC (permalink / raw)
To: Johan Hovold, Vikash Garodia, Dikshita Agarwal, Bryan ODonoghue
Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
On 10/17/2025 11:28 AM, Johan Hovold wrote:
> The encoder and decoder platform devices are registered by the venus
> driver as children of the venus device, but even if someone were to mess
> this up no amount of probe deferring is going to conjure up a parent.
>
> Relatedly, the venus driver sets its driver data before registering the
> child devices and if this ever breaks we want to learn about it by
> failing probe.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 5 +----
> drivers/media/platform/qcom/venus/venc.c | 5 +----
> 2 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 55c27345b7d8..2d822ad86dce 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -1778,12 +1778,9 @@ static int vdec_probe(struct platform_device *pdev)
> struct venus_core *core;
> int ret;
>
> - if (!dev->parent)
> - return -EPROBE_DEFER;
> -
> core = dev_get_drvdata(dev->parent);
> if (!core)
> - return -EPROBE_DEFER;
> + return -EINVAL;
>
> platform_set_drvdata(pdev, core);
>
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index fba07557a399..f1abd2bdce6b 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -1560,12 +1560,9 @@ static int venc_probe(struct platform_device *pdev)
> struct venus_core *core;
> int ret;
>
> - if (!dev->parent)
> - return -EPROBE_DEFER;
> -
> core = dev_get_drvdata(dev->parent);
> if (!core)
> - return -EPROBE_DEFER;
> + return -EINVAL;
>
> platform_set_drvdata(pdev, core);
>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Thanks,
Dikshita
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: venus: drop bogus probe deferrals
2025-10-17 5:58 ` [PATCH] media: venus: drop bogus probe deferrals Johan Hovold
2025-10-17 11:40 ` Bryan O'Donoghue
2025-10-28 10:43 ` Dikshita Agarwal
@ 2025-10-28 12:36 ` Vikash Garodia
2 siblings, 0 replies; 4+ messages in thread
From: Vikash Garodia @ 2025-10-28 12:36 UTC (permalink / raw)
To: Johan Hovold, Dikshita Agarwal, Bryan ODonoghue
Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
On 10/17/2025 11:28 AM, Johan Hovold wrote:
> The encoder and decoder platform devices are registered by the venus
> driver as children of the venus device, but even if someone were to mess
> this up no amount of probe deferring is going to conjure up a parent.
>
> Relatedly, the venus driver sets its driver data before registering the
> child devices and if this ever breaks we want to learn about it by
> failing probe.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread