msm: camera: sync: Restructure sync device structure

Currently sync_device structure size allocated is nearly 424kb
which is leading to more than accepted page size order.
Sync table row which is array of 2048 is accounting
nearly 90% of total size of sync_device. To fix this
sync_table_row is made pointer based and allocated memory.

CRs-Fixed: 3558545
Change-Id: I0c8093c91ac7fec9f52613012b139192b827b8d9
Signed-off-by: Shravya Samala <quic_shravyas@quicinc.com>
This commit is contained in:
Shravya Samala
2023-07-26 16:42:33 -07:00
committed by Camera Software Integration
parent 8a88a07cd0
commit 011cc16eb5
2 changed files with 11 additions and 2 deletions

View File

@@ -345,7 +345,7 @@ struct cam_signalable_info {
*
* @vdev : Video device
* @v4l2_dev : V4L2 device
* @sync_table : Table of all sync objects
* @sync_table : Table of all sync objects allocated when driver initializes
* @row_spinlocks : Spinlock array, one for each row in the table
* @table_lock : Mutex used to lock the table
* @open_cnt : Count of file open calls made on the sync driver
@@ -360,7 +360,7 @@ struct cam_signalable_info {
struct sync_device {
struct video_device *vdev;
struct v4l2_device v4l2_dev;
struct sync_table_row sync_table[CAM_SYNC_MAX_OBJS];
struct sync_table_row *sync_table;
spinlock_t row_spinlocks[CAM_SYNC_MAX_OBJS];
struct mutex table_lock;
int open_cnt;