diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2024-08-08 22:40:57 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-08-12 13:36:35 +0300 |
commit | 092e276db9d979ed8ac63ae7ffb6b4da48d19dc1 (patch) | |
tree | 5e15ed582c1f7cb67c0a894ce1f0ab86542bd883 /tools/perf/scripts/python/task-analyzer.py | |
parent | 3bdae13a75de84722aa6a3b9b99524b26b859148 (diff) |
media: rkisp1: Copy the parameters buffer
The ISP parameters buffers are queued by userspace to the params video
device and appended by the driver to the list of available buffers for
later consumption.
As the parameters buffer is mapped in the userspace process memory,
applications have access to the buffer content after the buffer has
been queued.
To prevent userspace from modifying the contents of the parameters buffer
after it has been queued to the video device, add to 'struct
rkisp1_params_buffer' a scratch buffer where to copy the parameters.
Allocate the scratch buffer in the vb2 buf_init() operation and copy the
buffer content in the buf_prepare() operation. Free the scratch
buffer in the newly introduced buf_cleanup() operation handler.
Modify the ISP configuration function to access the ISP configuration
from the cached copy of the parameters buffer instead of using the
userspace-mapped one.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions