mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
media: rockchip: isp/ispp output yuv format memory with 16 align
for rockchip encoder use dma buffer directly Change-Id: I6be016ce1beb774848131c1629d63c03a3293f66 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -1879,7 +1879,13 @@ static int rkisp_queue_setup(struct vb2_queue *queue,
|
||||
const struct v4l2_plane_pix_format *plane_fmt;
|
||||
|
||||
plane_fmt = &pixm->plane_fmt[i];
|
||||
sizes[i] = plane_fmt->sizeimage;
|
||||
/* height to align with 16 when allocating memory
|
||||
* so that Rockchip encoder can use DMA buffer directly
|
||||
*/
|
||||
sizes[i] = (isp_fmt->fmt_type == FMT_YUV) ?
|
||||
plane_fmt->sizeimage / pixm->height *
|
||||
ALIGN(pixm->height, 16) :
|
||||
plane_fmt->sizeimage;
|
||||
}
|
||||
|
||||
v4l2_dbg(1, rkisp_debug, &dev->v4l2_dev, "%s count %d, size %d\n",
|
||||
|
||||
@@ -465,8 +465,9 @@ int rkisp_csi_trigger_event(struct rkisp_csi_device *csi, void *arg)
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&csi->rdbk_lock, lock_flags);
|
||||
if (csi->is_first ||
|
||||
(trigger && csi->is_isp_end && kfifo_is_empty(fifo))) {
|
||||
if (trigger &&
|
||||
(csi->is_first ||
|
||||
(csi->is_isp_end && kfifo_is_empty(fifo)))) {
|
||||
/* isp idle and no event in queue
|
||||
* start read back direct
|
||||
*/
|
||||
@@ -484,8 +485,7 @@ int rkisp_csi_trigger_event(struct rkisp_csi_device *csi, void *arg)
|
||||
}
|
||||
if (trigger)
|
||||
kfifo_in(fifo, trigger, sizeof(*trigger));
|
||||
if (csi->is_isp_end)
|
||||
csi->is_isp_end = false;
|
||||
csi->is_isp_end = false;
|
||||
} else if (!csi->is_isp_end && trigger) {
|
||||
/* isp on idle, new event in fifo */
|
||||
if (!kfifo_is_full(fifo))
|
||||
|
||||
@@ -1057,7 +1057,14 @@ static int rkispp_queue_setup(struct vb2_queue *queue,
|
||||
const struct v4l2_plane_pix_format *plane_fmt;
|
||||
|
||||
plane_fmt = &pixm->plane_fmt[i];
|
||||
sizes[i] = plane_fmt->sizeimage;
|
||||
/* height to align with 16 when allocating memory
|
||||
* so that Rockchip encoder can use DMA buffer directly
|
||||
*/
|
||||
sizes[i] = (stream->type == STREAM_OUTPUT &&
|
||||
cap_fmt->wr_fmt != FMT_FBC) ?
|
||||
plane_fmt->sizeimage / pixm->height *
|
||||
ALIGN(pixm->height, 16) :
|
||||
plane_fmt->sizeimage;
|
||||
}
|
||||
|
||||
v4l2_dbg(1, rkispp_debug, &dev->v4l2_dev,
|
||||
|
||||
Reference in New Issue
Block a user