VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Changhuang Liang <changhuang.liang@starfivetech.com> 2023-08-03 10:28:13 +0800 committer: Andy Hu <andy.hu@starfivetech.com> 2023-11-01 15:04:54 +0800 commit: d8b4134033d2c594896bd46bd4bb838eb892c54c parent: 54853480cacddb9b07f8969611b81b8172d36340
Commit Summary:
media: starfive: Add isp sc buffer point
Diffstat:
2 files changed, 4 insertions, 1 deletion
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;
 };