Re: [PATCH] media: intel/ipu6: Set V4L2_CAP_IO_MC flag for isys /dev/video# nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/9/23 4:08 PM, Sakari Ailus wrote:
> Hi Hans,
> 
> On Mon, Oct 02, 2023 at 07:23:06PM +0200, Hans de Goede wrote:
>> The IPU6 isys is a media-controller centric device which needs
>> the pipeline to be configured using the media controller API before use.
>>
>> Set the V4L2_CAP_IO_MC flag to reflect this.
>>
>> This also allows dropping of the enum_input() g_input() and s_input()
>> implementations, with V4L2_CAP_IO_MC set the v4l2-core will take care
>> of those.
>>
>> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> 
> Thanks.
> 
> Cc'd Bingbu. (Also bounced the patch to him.)

Applied, thanks. :)
> 
>> ---
>>  .../media/pci/intel/ipu6/ipu6-isys-video.c    | 29 ++-----------------
>>  1 file changed, 2 insertions(+), 27 deletions(-)
>>
>> diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
>> index ad74a19527b7..e6fc32603c3f 100644
>> --- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
>> +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
>> @@ -262,29 +262,6 @@ static int vidioc_try_fmt_vid_cap_mplane(struct file *file, void *fh,
>>  	return 0;
>>  }
>>  
>> -static int vidioc_enum_input(struct file *file, void *fh,
>> -			     struct v4l2_input *input)
>> -{
>> -	if (input->index > 0)
>> -		return -EINVAL;
>> -	strscpy(input->name, "camera", sizeof(input->name));
>> -	input->type = V4L2_INPUT_TYPE_CAMERA;
>> -
>> -	return 0;
>> -}
>> -
>> -static int vidioc_g_input(struct file *file, void *fh, unsigned int *input)
>> -{
>> -	*input = 0;
>> -
>> -	return 0;
>> -}
>> -
>> -static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
>> -{
>> -	return input == 0 ? 0 : -EINVAL;
>> -}
>> -
>>  static int link_validate(struct media_link *link)
>>  {
>>  	struct ipu6_isys_video *av =
>> @@ -1017,9 +994,6 @@ static const struct v4l2_ioctl_ops ioctl_ops_mplane = {
>>  	.vidioc_streamon = vb2_ioctl_streamon,
>>  	.vidioc_streamoff = vb2_ioctl_streamoff,
>>  	.vidioc_expbuf = vb2_ioctl_expbuf,
>> -	.vidioc_enum_input = vidioc_enum_input,
>> -	.vidioc_g_input = vidioc_g_input,
>> -	.vidioc_s_input = vidioc_s_input,
>>  };
>>  
>>  static const struct media_entity_operations entity_ops = {
>> @@ -1217,7 +1191,8 @@ int ipu6_isys_video_init(struct ipu6_isys_video *av)
>>  
>>  	mutex_init(&av->mutex);
>>  	av->vdev.device_caps = V4L2_CAP_STREAMING |
>> -			       V4L2_CAP_VIDEO_CAPTURE_MPLANE;
>> +			       V4L2_CAP_VIDEO_CAPTURE_MPLANE |
>> +			       V4L2_CAP_IO_MC;
>>  	av->vdev.vfl_dir = VFL_DIR_RX;
>>  
>>  	ret = ipu6_isys_queue_init(&av->aq);
>> -- 
>> 2.41.0
>>
> 

-- 
Best regards,
Bingbu Cao



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux