Message ID | 20241211140738.3835588-1-quic_depengs@quicinc.com |
---|---|
Headers | show |
Series | media: qcom: camss: Add sm8550 support | expand |
@Depeng. Some of the patches at the top of the stack here - won't apply once Vikram's 7280 patches are applied. Could you please rebase your series with Vikram's patches applied and in v7 send a link in your cover-letter to highlight the dependency. You can get fixed up shared patches from my x1e tree here: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/arm-laptop/wip/x1e80100-6.13-rc1+camss?ref_type=heads --- bod
On 11/12/2024 14:07, Depeng Shao wrote: > There is no CSID TPG in some modern HW, so the v4l2 ctrl in CSID driver "some modern HW" => "on some SoCs" > shouldn't be registered. Checking the supported TPG modes to indicate > if the TPG HW is existing or not, and only register v4l2 ctrl for CSID "TP HW is existing or not, and only register" => "TPG hardware exists or not and oly registering" No need to abbreviate hardware to HW. > only when TPG HW is existing. "when the TPG hardware exists" you could also say "is present" instead of "exists". You have additional whitespace in your log before " only" > > Signed-off-by: Depeng Shao <quic_depengs@quicinc.com> > --- > .../media/platform/qcom/camss/camss-csid.c | 60 +++++++++++-------- > 1 file changed, 35 insertions(+), 25 deletions(-) > > diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c > index 6cf8e434dc05..e26a69a454a7 100644 > --- a/drivers/media/platform/qcom/camss/camss-csid.c > +++ b/drivers/media/platform/qcom/camss/camss-csid.c > @@ -760,11 +760,13 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) > int ret; > > if (enable) { > - ret = v4l2_ctrl_handler_setup(&csid->ctrls); > - if (ret < 0) { > - dev_err(csid->camss->dev, > - "could not sync v4l2 controls: %d\n", ret); > - return ret; > + if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) { > + ret = v4l2_ctrl_handler_setup(&csid->ctrls); > + if (ret < 0) { > + dev_err(csid->camss->dev, > + "could not sync v4l2 controls: %d\n", ret); > + return ret; > + } > } > > if (!csid->testgen.enabled && > @@ -838,7 +840,8 @@ static void csid_try_format(struct csid_device *csid, > break; > > case MSM_CSID_PAD_SRC: > - if (csid->testgen_mode->cur.val == 0) { > + if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED || if (csid->ctrls || feels like a more natural test. Less cumbersome and also less typing. I think that change should be feasible, could you please update your logic from if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED) to if (csid->ctrls) Otherwise looks good but, I'll wait to see your next version before giving an RB. --- bod
On 11/12/2024 15:36, Bryan O'Donoghue wrote: > @Depeng. > > Some of the patches at the top of the stack here - won't apply once > Vikram's 7280 patches are applied. > > Could you please rebase your series with Vikram's patches applied and in > v7 send a link in your cover-letter to highlight the dependency. > > You can get fixed up shared patches from my x1e tree here: > > https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/arm-laptop/wip/ > x1e80100-6.13-rc1+camss?ref_type=heads > > --- > bod > https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/arm-laptop/wip/x1e80100-6.13-rc2+camss?ref_type=heads Same patches on rc2. --- bod
On 11/12/2024 14:07, Depeng Shao wrote: > +static int csid_configure_testgen_pattern(struct csid_device *csid, s32 val) > +{ > + return 0; > +} Could we avoid this empty callback by checking csid->ctrl in csid.c ? If so, please make that change. If not, it's fine. For either case. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Hi Depeng and Bryan. On 12/11/24 16:07, Depeng Shao wrote: > The RUP registers and buf done irq are moved from the IFE to CSID register > block on recent CAMSS implementations. Add callbacks structure to wrapper > the location change with minimum logic disruption. > > Signed-off-by: Depeng Shao <quic_depengs@quicinc.com> > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> It's unexpected to see two your Signed-off-by: tags, either one is invalid or the authorship of the change shall be changed appropriately. > --- > .../media/platform/qcom/camss/camss-csid.h | 9 ++++++++ > drivers/media/platform/qcom/camss/camss.c | 22 +++++++++++++++++++ > drivers/media/platform/qcom/camss/camss.h | 3 +++ > 3 files changed, 34 insertions(+) > > diff --git a/drivers/media/platform/qcom/camss/camss-csid.h b/drivers/media/platform/qcom/camss/camss-csid.h > index f52209b96583..1369e7ea7219 100644 > --- a/drivers/media/platform/qcom/camss/camss-csid.h > +++ b/drivers/media/platform/qcom/camss/camss-csid.h > @@ -152,6 +152,14 @@ struct csid_hw_ops { > * @csid: CSID device > */ > void (*subdev_init)(struct csid_device *csid); > + > + /* > + * reg_update - receive message from other sub device > + * @csid: CSID device > + * @port_id: Port id > + * @is_clear: Indicate if it is clearing reg update or setting reg update > + */ > + void (*reg_update)(struct csid_device *csid, int port_id, bool is_clear); > }; > > struct csid_subdev_resources { > @@ -168,6 +176,7 @@ struct csid_device { > struct media_pad pads[MSM_CSID_PADS_NUM]; > void __iomem *base; > u32 irq; > + u32 reg_update; > char irq_name[30]; > struct camss_clock *clock; > int nclocks; > diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c > index 9fb31f4c18ad..e24084ff88de 100644 > --- a/drivers/media/platform/qcom/camss/camss.c > +++ b/drivers/media/platform/qcom/camss/camss.c > @@ -2087,6 +2087,28 @@ static int camss_link_entities(struct camss *camss) > return 0; > } > > +void camss_reg_update(struct camss *camss, int hw_id, int port_id, bool is_clear) > +{ > + struct csid_device *csid; > + > + if (hw_id < camss->res->csid_num) { > + csid = &camss->csid[hw_id]; > + > + csid->res->hw_ops->reg_update(csid, port_id, is_clear); > + } > +} > + > +void camss_buf_done(struct camss *camss, int hw_id, int port_id) > +{ > + struct vfe_device *vfe; > + > + if (hw_id < camss->res->vfe_num) { > + vfe = &camss->vfe[hw_id]; > + > + vfe->res->hw_ops->vfe_buf_done(vfe, port_id); > + } > +} > + > /* > * camss_register_entities - Register subdev nodes and create links > * @camss: CAMSS device > diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h > index 9da7f48f5dd7..6dceff8ce319 100644 > --- a/drivers/media/platform/qcom/camss/camss.h > +++ b/drivers/media/platform/qcom/camss/camss.h > @@ -161,5 +161,8 @@ void camss_pm_domain_off(struct camss *camss, int id); > int camss_vfe_get(struct camss *camss, int id); > void camss_vfe_put(struct camss *camss, int id); > void camss_delete(struct camss *camss); > +void camss_buf_done(struct camss *camss, int hw_id, int port_id); > +void camss_reg_update(struct camss *camss, int hw_id, > + int port_id, bool is_clear); > > #endif /* QC_MSM_CAMSS_H */ -- Best wishes, Vladimir
On 12/12/2024 01:09, Vladimir Zapolskiy wrote: >> >> Signed-off-by: Depeng Shao <quic_depengs@quicinc.com> >> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > It's unexpected to see two your Signed-off-by: tags, either one is invalid > or the authorship of the change shall be changed appropriately. TBH I thought nothing of this at all. @Depeng for the record you can add Co-developed-by with my SOB. --- bod
On 12/12/24 03:32, Bryan O'Donoghue wrote: > On 12/12/2024 01:09, Vladimir Zapolskiy wrote: >>> >>> Signed-off-by: Depeng Shao <quic_depengs@quicinc.com> >>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> >> >> It's unexpected to see two your Signed-off-by: tags, either one is invalid >> or the authorship of the change shall be changed appropriately. > > TBH I thought nothing of this at all. > > @Depeng for the record you can add Co-developed-by with my SOB. > Thank you, then this will become aligned with Documentation/process/5.Posting.rst -- Best wishes, Vladimir
Hi Vladimir, On 12/12/2024 9:09 AM, Vladimir Zapolskiy wrote: > Hi Depeng and Bryan. > > On 12/11/24 16:07, Depeng Shao wrote: >> The RUP registers and buf done irq are moved from the IFE to CSID >> register >> block on recent CAMSS implementations. Add callbacks structure to wrapper >> the location change with minimum logic disruption. >> >> Signed-off-by: Depeng Shao <quic_depengs@quicinc.com> >> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > It's unexpected to see two your Signed-off-by: tags, either one is invalid > or the authorship of the change shall be changed appropriately. > Thanks for pointing out this, I will update it based on Bryan's suggestion. Thanks, Depeng
Hi Bryan, On 12/12/2024 12:03 AM, Bryan O'Donoghue wrote: > On 11/12/2024 15:36, Bryan O'Donoghue wrote: >> @Depeng. >> >> Some of the patches at the top of the stack here - won't apply once >> Vikram's 7280 patches are applied. >> >> Could you please rebase your series with Vikram's patches applied and >> in v7 send a link in your cover-letter to highlight the dependency. >> >> You can get fixed up shared patches from my x1e tree here: >> >> https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/arm-laptop/ >> wip/ x1e80100-6.13-rc1+camss?ref_type=heads >> >> --- >> bod >> > > https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/arm-laptop/wip/ > x1e80100-6.13-rc2+camss?ref_type=heads > > Same patches on rc2. > Sure, I will rebase the change based on Vikram's patches. Thanks, Depeng
Hi Bryan, On 12/12/2024 5:57 AM, Bryan O'Donoghue wrote: > On 11/12/2024 14:07, Depeng Shao wrote: >> +static int csid_configure_testgen_pattern(struct csid_device *csid, >> s32 val) >> +{ >> + return 0; >> +} > > Could we avoid this empty callback by checking csid->ctrl in csid.c ? > > If so, please make that change. > > If not, it's fine. > > For either case. > > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Vladimir suggested to add a dummy "return 0" function [1] for the unsupported interface. So, I added this empty callback, will keep the empty callback if no other concern. Thanks. [1] https://lore.kernel.org/all/b1e1ff88-5bba-4424-bc85-38caa85b831f@linaro.org/ Thanks, Depeng
On 12/12/2024 11:28, Depeng Shao wrote: >> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > > Vladimir suggested to add a dummy "return 0" function [1] for the > unsupported interface. So, I added this empty callback, will keep the > empty callback if no other concern. Thanks. > > [1] https://lore.kernel.org/all/b1e1ff88-5bba-4424- > bc85-38caa85b831f@linaro.org/ Go ahead. --- bod
Hi Bryan, On 12/11/2024 11:44 PM, Bryan O'Donoghue wrote: > On 11/12/2024 14:07, Depeng Shao wrote: >> There is no CSID TPG in some modern HW, so the v4l2 ctrl in CSID driver > > "some modern HW" => "on some SoCs" > >> shouldn't be registered. Checking the supported TPG modes to indicate >> if the TPG HW is existing or not, and only register v4l2 ctrl for CSID > > "TP HW is existing or not, and only register" => "TPG hardware exists or > not and oly registering" > > No need to abbreviate hardware to HW. > >> only when TPG HW is existing. > > "when the TPG hardware exists" you could also say "is present" instead > of "exists". > > You have additional whitespace in your log before " only" > >> Thanks for the suggestion, will update in new version. >> } >> if (!csid->testgen.enabled && >> @@ -838,7 +840,8 @@ static void csid_try_format(struct csid_device *csid, >> break; >> case MSM_CSID_PAD_SRC: >> - if (csid->testgen_mode->cur.val == 0) { >> + if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED || > > if (csid->ctrls || > > feels like a more natural test. Less cumbersome and also less typing. > > I think that change should be feasible, could you please update your > logic from if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED) to if > (csid->ctrls) > > Otherwise looks good but, I'll wait to see your next version before > giving an RB. > csid->ctrls is not a pointer, so it is always true. Thanks, Depeng