diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2021-06-14 14:23:27 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-07-12 14:04:12 +0300 |
commit | 4cb3a0f3896d9ad1d19efb25fd00a58ae6667a95 (patch) | |
tree | 5228dc94b6b602931b84b3ab1b9410a52b20e1cd /drivers/media/platform/ti-vpe/cal.h | |
parent | 38f7435f13049fb9f721fbed30d2ca3c3ddfbd6a (diff) | |
download | linux-4cb3a0f3896d9ad1d19efb25fd00a58ae6667a95.tar.xz |
media: ti-vpe: cal: allocate pix proc dynamically
CAL has 4 pixel processing units but the units are not needed e.g. for
metadata. As we could be capturing 4 pixel streams and 4 metadata
streams, i.e. using 8 DMA contexts, we cannot assign a pixel processing
unit to every DMA context. Instead we need to reserve a pixel processing
unit only when needed.
Add functions to reserve and release a pix proc unit, and use them in
cal_ctx_prepare/unprepare. Note that for the time being we still always
reserve a pix proc unit.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/ti-vpe/cal.h')
-rw-r--r-- | drivers/media/platform/ti-vpe/cal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.h b/drivers/media/platform/ti-vpe/cal.h index e4db2a905f68..5d8b3193be7d 100644 --- a/drivers/media/platform/ti-vpe/cal.h +++ b/drivers/media/platform/ti-vpe/cal.h @@ -188,6 +188,8 @@ struct cal_dev { struct media_device mdev; struct v4l2_device v4l2_dev; struct v4l2_async_notifier notifier; + + unsigned long reserved_pix_proc_mask; }; /* |