summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChanghuang Liang <changhuang.liang@starfivetech.com>2023-08-03 05:28:13 +0300
committerAndy Hu <andy.hu@starfivetech.com>2023-11-01 10:04:54 +0300
commitd8b4134033d2c594896bd46bd4bb838eb892c54c (patch)
tree5acb31e782bba609ec835bbec8b704393ec51736
parent54853480cacddb9b07f8969611b81b8172d36340 (diff)
downloadlinux-d8b4134033d2c594896bd46bd4bb838eb892c54c.tar.xz
media: starfive: Add isp sc buffer point
Add isp sc buffer point. Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
-rw-r--r--drivers/media/platform/starfive/v4l2_driver/stf_video.c4
-rw-r--r--drivers/media/platform/starfive/v4l2_driver/stf_video.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/starfive/v4l2_driver/stf_video.c b/drivers/media/platform/starfive/v4l2_driver/stf_video.c
index 60400120e018..19e949655672 100644
--- a/drivers/media/platform/starfive/v4l2_driver/stf_video.c
+++ b/drivers/media/platform/starfive/v4l2_driver/stf_video.c
@@ -340,8 +340,10 @@ static int video_buf_init(struct vb2_buffer *vb)
}
if (stf_vin_map_isp_pad(video->id, STF_ISP_PAD_SRC)
- == STF_ISP_PAD_SRC_SCD_Y)
+ == STF_ISP_PAD_SRC_SCD_Y) {
buffer->addr[1] = buffer->addr[0] + ISP_YHIST_BUFFER_SIZE;
+ buffer->vaddr_sc = vb2_plane_vaddr(vb, 0);
+ }
return 0;
}
diff --git a/drivers/media/platform/starfive/v4l2_driver/stf_video.h b/drivers/media/platform/starfive/v4l2_driver/stf_video.h
index c7b6fa7a9dcd..cf99be2df8db 100644
--- a/drivers/media/platform/starfive/v4l2_driver/stf_video.h
+++ b/drivers/media/platform/starfive/v4l2_driver/stf_video.h
@@ -28,6 +28,7 @@
struct stfcamss_buffer {
struct vb2_v4l2_buffer vb;
dma_addr_t addr[3];
+ void *vaddr_sc; /* Use for isp sc data */
struct list_head queue;
int sizeimage;
};