Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drivers/media/pci/intel/ipu7/ipu7-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ void *ipu7_dma_alloc(struct ipu7_bus_device *sys, size_t size,
}
}

mmu->tlb_invalidate(mmu);

info->vaddr = vmap(pages, count, VM_USERMAP, PAGE_KERNEL);
if (!info->vaddr)
goto out_unmap;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/pci/intel/ipu7/ipu7-isys-csi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static int csi2_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
case V4L2_EVENT_FRAME_SYNC:
return v4l2_event_subscribe(fh, sub, 10, NULL);
case V4L2_EVENT_CTRL:
return v4l2_ctrl_subscribe_event(fh, sub);
return v4l2_ctrl_subdev_subscribe_event(sd, fh, sub);
default:
return -EINVAL;
}
Expand Down
19 changes: 17 additions & 2 deletions drivers/media/pci/intel/ipu7/ipu7-isys-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ static int ipu7_isys_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
static int ipu7_isys_buf_prepare(struct vb2_buffer *vb)
{
struct ipu7_isys_queue *aq = vb2_queue_to_isys_queue(vb->vb2_queue);
struct ipu7_isys *isys = vb2_get_drv_priv(vb->vb2_queue);
struct ipu7_isys_video *av = ipu7_isys_queue_to_video(aq);
struct sg_table *sg = vb2_dma_sg_plane_desc(vb, 0);
struct device *dev = &av->isys->adev->auxdev.dev;
u32 bytesperline = av->pix_fmt.bytesperline;
u32 height = av->pix_fmt.height;
Expand All @@ -107,6 +109,9 @@ static int ipu7_isys_buf_prepare(struct vb2_buffer *vb)
av->vdev.name, bytesperline, height);
vb2_set_plane_payload(vb, 0, bytesperline * height);

/* assume IPU is not DMA coherent */
ipu7_dma_sync_sgtable(isys->adev, sg);

return 0;
}

Expand Down Expand Up @@ -756,7 +761,17 @@ static int reset_start_streaming(struct ipu7_isys_video *av)
goto out;

bl = &__bl;
ret = buffer_list_get(stream, bl);
int retry = 5;
while (retry--) {
ret = buffer_list_get(stream, bl);
if (ret < 0) {
dev_dbg(dev, "wait for incoming buffer, retry %d\n", retry);
usleep_range(100000, 110000);
continue;
}
break;
}

/*
* In reset start streaming and no buffer available,
* it is considered that gstreamer has been closed,
Expand Down Expand Up @@ -898,7 +913,7 @@ static void stop_streaming(struct vb2_queue *q)
mutex_lock(&av->isys->reset_mutex);
while (av->isys->state) {
mutex_unlock(&av->isys->reset_mutex);
dev_dbg(dev, "stop: %s: wait for rest or stop, isys->state = %d\n",
dev_dbg(dev, "stop: %s: wait for reset or stop, isys->state = %d\n",
av->vdev.name, av->isys->state);
usleep_range(10000, 11000);
mutex_lock(&av->isys->reset_mutex);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/pci/intel/ipu7/ipu7-isys-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,13 +1193,13 @@ int ipu7_isys_video_init(struct ipu7_isys_video *av)

__ipu_isys_vidioc_try_fmt_vid_cap(av, &format);
av->pix_fmt = format.fmt.pix;

#ifdef CONFIG_VIDEO_INTEL_IPU7_ISYS_RESET
av->reset = false;
av->skipframe = 0;
av->start_streaming = 0;
#endif

set_bit(V4L2_FL_USES_V4L2_FH, &av->vdev.flags);
video_set_drvdata(&av->vdev, av);

ret = video_register_device(&av->vdev, VFL_TYPE_VIDEO, -1);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/pci/intel/ipu7/ipu7-isys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ static int isys_probe(struct auxiliary_device *auxdev,
#endif

cpu_latency_qos_add_request(&isys->pm_qos, PM_QOS_DEFAULT_VALUE);
ret = alloc_fw_msg_bufs(isys, 40);
ret = alloc_fw_msg_bufs(isys, 20);
if (ret < 0)
goto out_cleanup_isys;

Expand Down
1 change: 0 additions & 1 deletion drivers/media/pci/intel/ipu7/ipu7.c
Original file line number Diff line number Diff line change
Expand Up @@ -2750,7 +2750,6 @@ static void ipu7_pci_remove(struct pci_dev *pdev)
ipu_buttress_exit(isp);

release_firmware(isp->cpd_fw);

}

static void ipu7_pci_reset_prepare(struct pci_dev *pdev)
Expand Down