* [PATCH v2] media: camss: vfe: Don't call hw_version() before its dependencies are met
@ 2021-08-12 9:21 ` Robert Foss
2021-08-12 10:16 ` Marek Szyprowski
0 siblings, 1 reply; 3+ messages in thread
From: Robert Foss @ 2021-08-12 9:21 UTC (permalink / raw)
To: robert.foss, todor.too, agross, bjorn.andersson, mchehab,
hverkuil-cisco, linux-media, linux-arm-msm, linux-kernel,
Naresh Kamboju, Marek Szyprowski
Cc: Linux Kernel Functional Testing
vfe->ops->hw_version(vfe) is being called before vfe->base has been
assigned, and before the hardware has been powered up.
Fixes: b10b5334528a9 ("media: camss: vfe: Don't read hardware version needlessly")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
---
drivers/media/platform/qcom/camss/camss-vfe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
index 6b2f33fc9be2..71f78b40e7f5 100644
--- a/drivers/media/platform/qcom/camss/camss-vfe.c
+++ b/drivers/media/platform/qcom/camss/camss-vfe.c
@@ -604,6 +604,8 @@ static int vfe_get(struct vfe_device *vfe)
vfe_reset_output_maps(vfe);
vfe_init_outputs(vfe);
+
+ vfe->ops->hw_version(vfe);
} else {
ret = vfe_check_clock_rates(vfe);
if (ret < 0)
@@ -1299,7 +1301,6 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
return -EINVAL;
}
vfe->ops->subdev_init(dev, vfe);
- vfe->ops->hw_version(vfe);
/* Memory */
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] media: camss: vfe: Don't call hw_version() before its dependencies are met
2021-08-12 9:21 ` [PATCH v2] media: camss: vfe: Don't call hw_version() before its dependencies are met Robert Foss
@ 2021-08-12 10:16 ` Marek Szyprowski
2021-08-23 10:10 ` Marek Szyprowski
0 siblings, 1 reply; 3+ messages in thread
From: Marek Szyprowski @ 2021-08-12 10:16 UTC (permalink / raw)
To: Robert Foss, todor.too, agross, bjorn.andersson, mchehab,
hverkuil-cisco, linux-media, linux-arm-msm, linux-kernel,
Naresh Kamboju
Cc: Linux Kernel Functional Testing
On 12.08.2021 11:21, Robert Foss wrote:
> vfe->ops->hw_version(vfe) is being called before vfe->base has been
> assigned, and before the hardware has been powered up.
>
> Fixes: b10b5334528a9 ("media: camss: vfe: Don't read hardware version needlessly")
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Robert Foss <robert.foss@linaro.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/media/platform/qcom/camss/camss-vfe.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
> index 6b2f33fc9be2..71f78b40e7f5 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
> @@ -604,6 +604,8 @@ static int vfe_get(struct vfe_device *vfe)
> vfe_reset_output_maps(vfe);
>
> vfe_init_outputs(vfe);
> +
> + vfe->ops->hw_version(vfe);
> } else {
> ret = vfe_check_clock_rates(vfe);
> if (ret < 0)
> @@ -1299,7 +1301,6 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe,
> return -EINVAL;
> }
> vfe->ops->subdev_init(dev, vfe);
> - vfe->ops->hw_version(vfe);
>
> /* Memory */
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] media: camss: vfe: Don't call hw_version() before its dependencies are met
2021-08-12 10:16 ` Marek Szyprowski
@ 2021-08-23 10:10 ` Marek Szyprowski
0 siblings, 0 replies; 3+ messages in thread
From: Marek Szyprowski @ 2021-08-23 10:10 UTC (permalink / raw)
To: Robert Foss, todor.too, agross, bjorn.andersson, mchehab,
hverkuil-cisco, linux-media, linux-arm-msm, linux-kernel,
Naresh Kamboju
Cc: Linux Kernel Functional Testing
On 12.08.2021 12:16, Marek Szyprowski wrote:
> On 12.08.2021 11:21, Robert Foss wrote:
>> vfe->ops->hw_version(vfe) is being called before vfe->base has been
>> assigned, and before the hardware has been powered up.
>>
>> Fixes: b10b5334528a9 ("media: camss: vfe: Don't read hardware version
>> needlessly")
>>
>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> Signed-off-by: Robert Foss <robert.foss@linaro.org>
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
This restores old, well tested code path.
Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> drivers/media/platform/qcom/camss/camss-vfe.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c
>> b/drivers/media/platform/qcom/camss/camss-vfe.c
>> index 6b2f33fc9be2..71f78b40e7f5 100644
>> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
>> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
>> @@ -604,6 +604,8 @@ static int vfe_get(struct vfe_device *vfe)
>> vfe_reset_output_maps(vfe);
>> vfe_init_outputs(vfe);
>> +
>> + vfe->ops->hw_version(vfe);
>> } else {
>> ret = vfe_check_clock_rates(vfe);
>> if (ret < 0)
>> @@ -1299,7 +1301,6 @@ int msm_vfe_subdev_init(struct camss *camss,
>> struct vfe_device *vfe,
>> return -EINVAL;
>> }
>> vfe->ops->subdev_init(dev, vfe);
>> - vfe->ops->hw_version(vfe);
>> /* Memory */
>
> Best regards
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-23 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210812092201eucas1p1ba2165a230084f99e3a858827788cf54@eucas1p1.samsung.com>
2021-08-12 9:21 ` [PATCH v2] media: camss: vfe: Don't call hw_version() before its dependencies are met Robert Foss
2021-08-12 10:16 ` Marek Szyprowski
2021-08-23 10:10 ` Marek Szyprowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.