[PATCH v2] Revert "media: qcom: camss: Restructure camss_link_entities"

Bryan O'Donoghue posted 1 patch 1 year ago
drivers/media/platform/qcom/camss/camss.c | 155 ++++++++++--------------------
1 file changed, 52 insertions(+), 103 deletions(-)
Re: [PATCH v2] Revert "media: qcom: camss: Restructure camss_link_entities"
Posted by Vladimir Zapolskiy 1 year ago
On 12/15/24 02:33, Bryan O'Donoghue wrote:
> This reverts commit cc1ecabe67d92a2da0b0402f715598e8dbdc3b9e.
> 
> This commit has a basic flaw in that it relies on camss->res->csid_num as a
> control to index the array camss->vfe[i].
> 
> Testing on a platform where csid_num > vfe_num showed this bug up.
> 
> camss->vfe should only be indexed by camss->res->vfe_num. Since this commit
> is meant to make the code be more readable reverting will simply restore
> the previous correct bounds checking.
> 
> We can make another pass at making camss_link_entities look prettier but,
> for now we should zap the bug introduced.
> 
> Fixes: cc1ecabe67d9 ("media: qcom: camss: Restructure camss_link_entities")
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

This change is very welcome.

Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>

--
Best wishes,
Vladimir
Re: [PATCH v2] Revert "media: qcom: camss: Restructure camss_link_entities"
Posted by Bryan O'Donoghue 1 year ago
On 15/12/2024 11:58, Vladimir Zapolskiy wrote:
> On 12/15/24 02:33, Bryan O'Donoghue wrote:
>> This reverts commit cc1ecabe67d92a2da0b0402f715598e8dbdc3b9e.
>>
>> This commit has a basic flaw in that it relies on camss->res->csid_num 
>> as a
>> control to index the array camss->vfe[i].
>>
>> Testing on a platform where csid_num > vfe_num showed this bug up.
>>
>> camss->vfe should only be indexed by camss->res->vfe_num. Since this 
>> commit
>> is meant to make the code be more readable reverting will simply restore
>> the previous correct bounds checking.
>>
>> We can make another pass at making camss_link_entities look prettier but,
>> for now we should zap the bug introduced.
>>
>> Fixes: cc1ecabe67d9 ("media: qcom: camss: Restructure 
>> camss_link_entities")
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> 
> This change is very welcome.
> 
> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> 
> -- 
> Best wishes,
> Vladimir

Mauro.

Hans would normally merge for us in CAMSS but, he's on Xmas holidays.

Could I impose upon you to pick this one up directly ?

---
bod