Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp743088ybh; Tue, 21 Jul 2020 06:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKuWIc7XFdLbc+QtMwfm2p6t4gKPtMKt8jfJ+Iaqpdsqu1mp9F54k9HJeriV0P6EpSbDlj X-Received: by 2002:a17:906:3c46:: with SMTP id i6mr22913176ejg.66.1595339913611; Tue, 21 Jul 2020 06:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595339913; cv=none; d=google.com; s=arc-20160816; b=Yw3gq2dztUwWqv2l52Cr1QsuXgKtr2W0PUENt8k7c6v99B9zWjOvL5G6A3XAWJVlWe Dn0U3gUYx5gnUjuAvLVYqDwVOk7s08RtFwW5H68INDayGy1urFOFMs4Uxhqje4fQ2dD7 X8JezMt1Bu5wKwecRdIpf0s4K/6tUKDj9zeqnRFcG3m4mqHkzoa90ScMjp1+a+9q3vVp kokHG2IkrhtqptBCohhNK1BFx6XMdT6HIJQrhGX3t0+nRnYwi8sLXw1usOhWHQGMJnsq yeuFjkSDba5HbiuLzlh5NiT8LW8qP6lAQBkTbtmwWjwTQJh10SSl0c028DsL+/F72OaC +8JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=8DzFUCL6FlDUyLVJTUU6BXPc2hxZeyTaaZ1bJHYnACM=; b=mCE+ov0OlIFkUhnAypr1KbnfCFV6+UISlhrytkLbEe7n+2jli0i/S0H+fYfqOdwiLg FtZtplAOMzDtKqX6zhFTqGvag082cQjl8zoUkFfK/wNGvGOv5z+n0feFTcXLcc+vCKfA ANncrPB5uq3avalfFSsGcUJYWTCmeTK/u91tzn3BlEYdUWR6Fyu4TJHBKg4Te1VPl7Dx +CNx7QSe/npDqmtjVcQ4O3U/7WQ0whyAS0wihPHc1+3InOEtn8g3q0LrqON52dsCyT6a f1Mua+BFxQUbRNrzj6gBMwsmvhLjhhJrN9NtTKSuif3mJfIyEuVSSAfXRsGjZFRNiQqb Odbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si11759499ejd.290.2020.07.21.06.58.08; Tue, 21 Jul 2020 06:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbgGUN4f (ORCPT + 99 others); Tue, 21 Jul 2020 09:56:35 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44400 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbgGUN4f (ORCPT ); Tue, 21 Jul 2020 09:56:35 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id C0EFB297385 Subject: Re: [PATCH v4 0/6] media: v4l2: Add extended fmt and buffer ioctls To: Boris Brezillon , Brian.Starkey@arm.com Cc: mchehab@kernel.org, hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi, linux-media@vger.kernel.org, tfiga@chromium.org, hiroh@chromium.org, nicolas@ndufresne.ca, kernel@collabora.com, narmstrong@baylibre.com, linux-kernel@vger.kernel.org, frkoenig@chromium.org, mjourdan@baylibre.com, stanimir.varbanov@linaro.org References: <20200717115435.2632623-1-helen.koike@collabora.com> <20200721131537.6ff83c71@collabora.com> From: Helen Koike Message-ID: <6bbcc4e3-aaaa-624e-94bf-a950dd77421b@collabora.com> Date: Tue, 21 Jul 2020 10:56:25 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200721131537.6ff83c71@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, On 7/21/20 8:15 AM, Boris Brezillon wrote: > Hello Helen, > > Just a few drive-by comments. > > On Fri, 17 Jul 2020 08:54:29 -0300 > Helen Koike wrote: > >> Hi, >> >> I'm sorry for taking too long to submit v4. >> >> It is not perfect, not all v4l2-compliance tests passes, but I'd like a review, >> specially on the API and potential problems, so I can focus on improving implementation >> and maybe drop the RFC tag for next version. >> >> Follow below what changed in v4 and some items I'd like to discuss: >> >> >> * Ioctl to replace v4l2_pix_format >> --------------------------------------------------------------------------------- >> During last media summit, we agreed to create ioctls that replace the v4l2_pix_format >> struct and leave the other structs in the v4l2_format union alone. >> Thus I refactored the code to receive struct v4l2_ext_pix_format, and I renamed the >> ioctls, so now we have: >> >> int ioctl(int fd, VIDIOC_G_EXT_FMT, struct v4l2_ext_pix_format *argp); > > Maybe use the EXT_PIX_FMT suffix here since the struct is really only > about pixel formats. Sorry, this is a copy&paste error, I'm already using this suffix in the code, except for the ioctls that handle buffers (since they get v4l2_ext_buffer struct). Regards, Helen > >> int ioctl(int fd, VIDIOC_S_EXT_FMT, struct v4l2_ext_pix_format *argp); >> int ioctl(int fd, VIDIOC_TRY_EXT_FMT, struct v4l2_ext_pix_format *argp); >> >> The only valid types are V4L2_BUF_TYPE_VIDEO_CAPTURE and V4L2_BUF_TYPE_VIDEO_OUTPUT, >> all the other types are invalid with this API. >> > > [...] > >> >> >> Boris Brezillon (5): >> media: v4l2: Extend pixel formats to unify single/multi-planar >> handling (and more) >> media: videobuf2: Expose helpers to implement the _ext_fmt and >> _ext_buf hooks >> media: mediabus: Add helpers to convert a ext_pix format to/from a >> mbus_fmt >> media: vivid: Convert the capture and output drivers to >> EXT_FMT/EXT_BUF >> media: vimc: Implement the ext_fmt and ext_buf hooks > > I think you should take ownership of these patches. The end result is > likely to be completely different from what I initially posted, and > you're the one doing the hard work here. > >> >> Hans Verkuil (1): >> media: v4l2: Add extended buffer operations >> >> .../media/common/videobuf2/videobuf2-core.c | 2 + >> .../media/common/videobuf2/videobuf2-v4l2.c | 549 +++++----- >> .../media/test-drivers/vimc/vimc-capture.c | 61 +- >> drivers/media/test-drivers/vimc/vimc-common.c | 6 +- >> drivers/media/test-drivers/vimc/vimc-common.h | 2 +- >> drivers/media/test-drivers/vivid/vivid-core.c | 70 +- >> .../test-drivers/vivid/vivid-touch-cap.c | 26 +- >> .../test-drivers/vivid/vivid-touch-cap.h | 3 +- >> .../media/test-drivers/vivid/vivid-vid-cap.c | 169 +--- >> .../media/test-drivers/vivid/vivid-vid-cap.h | 15 +- >> .../media/test-drivers/vivid/vivid-vid-out.c | 193 ++-- >> .../media/test-drivers/vivid/vivid-vid-out.h | 15 +- >> drivers/media/v4l2-core/v4l2-dev.c | 50 +- >> drivers/media/v4l2-core/v4l2-ioctl.c | 934 ++++++++++++++++-- >> include/media/v4l2-ioctl.h | 60 ++ >> include/media/v4l2-mediabus.h | 42 + >> include/media/videobuf2-core.h | 6 +- >> include/media/videobuf2-v4l2.h | 21 +- >> include/uapi/linux/videodev2.h | 144 +++ >> 19 files changed, 1650 insertions(+), 718 deletions(-) >> >