media: qcom: camss: Split VFE 690 and VFE 780/880
Subsystems (4)
Bryan O'Donoghue
maintainercover media: qcom: camss: Split VFE 690 and VFE 780/880
Looking at the write-master indexes for VFE690 and VFE780/880 its clear 780 and 880 share the same indexes but 690 is significantly different.
That's enough of a difference to separate out the logic of both. Two patches in this series do that. One patch to reverse the rename another patch to disjunct the logic into two separate files.
---
Bryan O'Donoghue (2):
media: qcom: camss: vfe: Rename gen3 back to vfe780
media: qcom: camss: vfe: Separate VFE 690 from VFE 780/880
drivers/media/platform/qcom/camss/Makefile | 3 +-
.../camss/{camss-vfe-gen3.c => camss-vfe-690.c} | 49 ++-----
drivers/media/platform/qcom/camss/camss-vfe-780.c | 160 +++++++++++++++++++++
drivers/media/platform/qcom/camss/camss-vfe.h | 3 +-
drivers/media/platform/qcom/camss/camss.c | 34 ++---
5 files changed, 193 insertions(+), 56 deletions(-)---
base-commit: 89a3d2a2237e017cdbefcb036db71ce74e67faf5
change-id: 20261002-vfe690-780-split-c40a89bd22a5
Best regards,
Signature · 1 line
Bryan O'Donoghue <[email protected]>
Bryan O'Donoghue
maintainerPATCH 1/2 media: qcom: camss: vfe: Rename gen3 back to vfe780
Conjoining 690 and 780/880 class VFEs doesn't make sense when you consider he write-master indexes are different. Clearly these are not the same generation of silicon and the code to support them that way is cumbersome.
As a first step to fixing that, rename vfe gen3 back to 780.
---
drivers/media/platform/qcom/camss/Makefile | 2 +-
.../camss/{camss-vfe-gen3.c => camss-vfe-780.c} | 2 +-
drivers/media/platform/qcom/camss/camss-vfe.h | 2 +-
drivers/media/platform/qcom/camss/camss.c | 34 +++++++++++-----------
4 files changed, 20 insertions(+), 20 deletions(-)drivers/media/platform/qcom/camss/Makefile +1 -1
@@ -25,8 +25,8 @@ qcom-camss-objs += \ camss-vfe-340.o \ camss-vfe-480.o \ camss-vfe-680.o \ + camss-vfe-780.o \ camss-vfe-gen1.o \ - camss-vfe-gen3.o \ camss-vfe-vbif.o \ camss-video.o
drivers/media/platform/qcom/camss/camss-vfe-780.c renamed from drivers/media/platform/qcom/camss/camss-vfe-gen3.c +1 -1
@@ -174,7 +174,7 @@ static int vfe_halt(struct vfe_device *vfe)return 0 ; } -const struct vfe_hw_ops vfe_ops_gen3 = { +const struct vfe_hw_ops vfe_ops_780 = { .global_reset = vfe_global_reset, .hw_version = vfe_hw_version, .isr = vfe_isr,
drivers/media/platform/qcom/camss/camss-vfe.h +1 -1
@@ -248,7 +248,7 @@ extern const struct vfe_hw_ops vfe_ops_170;extern const struct vfe_hw_ops vfe_ops_340;extern const struct vfe_hw_ops vfe_ops_480;extern const struct vfe_hw_ops vfe_ops_680; -extern const struct vfe_hw_ops vfe_ops_gen3; +extern const struct vfe_hw_ops vfe_ops_780;int vfe_get (struct vfe_device *vfe);void vfe_put (struct vfe_device *vfe);
drivers/media/platform/qcom/camss/camss.c +17 -17
@@ -3208,7 +3208,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = { .is_lite = false, .has_pd = true, .pd_name = "ife0", - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3232,7 +3232,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = { .is_lite = false, .has_pd = true, .pd_name = "ife1", - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3256,7 +3256,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = { .is_lite = false, .has_pd = true, .pd_name = "ife2", - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3277,7 +3277,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3298,7 +3298,7 @@ static const struct camss_subdev_resources vfe_res_8550[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3523,7 +3523,7 @@ static const struct camss_subdev_resources vfe_res_sm8650[] = { .line_num = 3, .has_pd = true, .pd_name = "ife0", - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 },
@@ -3550,7 +3550,7 @@ static const struct camss_subdev_resources vfe_res_sm8650[] = { .line_num = 3, .has_pd = true, .pd_name = "ife1", - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 },
@@ -3577,7 +3577,7 @@ static const struct camss_subdev_resources vfe_res_sm8650[] = { .line_num = 3, .has_pd = true, .pd_name = "ife2", - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 },
@@ -3602,7 +3602,7 @@ static const struct camss_subdev_resources vfe_res_sm8650[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 },
@@ -3627,7 +3627,7 @@ static const struct camss_subdev_resources vfe_res_sm8650[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 },
@@ -3925,7 +3925,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .is_lite = false, .has_pd = false, .pd_name = NULL, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3953,7 +3953,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .is_lite = false, .has_pd = false, .pd_name = NULL, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3979,7 +3979,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4005,7 +4005,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4031,7 +4031,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4057,7 +4057,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4083,7 +4083,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_gen3, + .hw_ops = &vfe_ops_780, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
Signature · 1 line
2.54.0
Bryan O'Donoghue
maintainerPATCH 2/2 media: qcom: camss: vfe: Separate VFE 690 from VFE 780/880
In reply to Bryan O'DonoghueLooking at the write-master index for VFE 690 and VFE 780/880 we can see a discontinuity between 690 and 780/880. Extending out the functionality in these files will result in spaghettification of the code for no good purpose.
The WM index difference is indication enough that the silicon should live in separate files.
Disjoin now.
--- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-vfe-690.c | 168 ++++++++++++++++++++++ drivers/media/platform/qcom/camss/camss-vfe-780.c | 53 ++----- drivers/media/platform/qcom/camss/camss-vfe.h | 1 + drivers/media/platform/qcom/camss/camss.c | 14 +- 5 files changed, 187 insertions(+), 50 deletions(-)
drivers/media/platform/qcom/camss/Makefile +1 -0
@@ -25,6 +25,7 @@ qcom-camss-objs += \ camss-vfe-340.o \ camss-vfe-480.o \ camss-vfe-680.o \ + camss-vfe-690.o \ camss-vfe-780.o \ camss-vfe-gen1.o \ camss-vfe-vbif.o \
drivers/media/platform/qcom/camss/camss-vfe-690.c new file +168 -0
168 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe-780.c +10 -43
103 lines not on this page · raw message
drivers/media/platform/qcom/camss/camss-vfe.h +1 -0
@@ -248,6 +248,7 @@ extern const struct vfe_hw_ops vfe_ops_170;extern const struct vfe_hw_ops vfe_ops_340;extern const struct vfe_hw_ops vfe_ops_480;extern const struct vfe_hw_ops vfe_ops_680; +extern const struct vfe_hw_ops vfe_ops_690;extern const struct vfe_hw_ops vfe_ops_780;int vfe_get (struct vfe_device *vfe);
drivers/media/platform/qcom/camss/camss.c +7 -7
@@ -3925,7 +3925,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .is_lite = false, .has_pd = false, .pd_name = NULL, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3953,7 +3953,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .is_lite = false, .has_pd = false, .pd_name = NULL, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -3979,7 +3979,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4005,7 +4005,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4031,7 +4031,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4057,7 +4057,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
@@ -4083,7 +4083,7 @@ static const struct camss_subdev_resources vfe_res_8775p[] = { .vfe = { .line_num = 4, .is_lite = true, - .hw_ops = &vfe_ops_780, + .hw_ops = &vfe_ops_690, .formats_rdi = &vfe_formats_rdi_845, .formats_pix = &vfe_formats_pix_845 }
Signature · 1 line
2.54.0