Received: by 10.223.185.116 with SMTP id b49csp320330wrg; Tue, 20 Feb 2018 22:03:15 -0800 (PST) X-Google-Smtp-Source: AH8x227ELUqtPJB04TrAWa+6JppxsWYNL8uXUnh+KYqVInh50oy6lJRYOOQJR4VtdMFm4rgdqoQe X-Received: by 10.101.86.73 with SMTP id m9mr1854044pgs.70.1519192995160; Tue, 20 Feb 2018 22:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519192995; cv=none; d=google.com; s=arc-20160816; b=NhNJlXueViJ89gAqb2WX0vsv+2DtbOxcpOFW5ui5/iy+rzLmG0uzPXaUwZGIqdne/B TUh2MqtV+hKkOMYm6A93jdGh6QR2YnjAj+JGA8ajltJrjehUWGU48xePHahPvVVXmfuz a9S1HUfyid6agQZtkJfI64pbO5qFzgXtYaOHUwgYFRqsj1+UwM71mDpTEPUC4UC/9are vb3E+sEaWF6ysp1y0kenTlPxmI+LngowN3epUJJi3TI6h79sga0epHWoMqfLVdhbvq4N N7EniI/SaSiK4WFOM+LJwMMLPCvOi7gAKFmCIA+nZCMph42Rtejpy1gWtl1sDmpDjwRG KXfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=brN2LRy/CCPHeC9CcfBbY6L8i9vuzosge1rjrpUt5Xw=; b=X1gsatvGIAoBemUr8kiKg8cg8N4+/71jsLQW8cfUEEphuACFXhkR7VJjLnhhe4JRkv Zga5ac2jFGKxPkCrjnGNz57CvlsDXeI6PT0OMueKJqXvI6EVHKg7s6zJt8WV08Ye5GQE qBvDXCbw+fyczq5az8cJrMa7Sdg++P1i6qeZDuLBOELXgflS/HIzTHmb1SxfEMRbUDSL 3hG8kilt8II9b9kLYPNOBimPtXUh1ojTA1iQP0LOS9RuGmAMwjqHe1yxturo+b68kmyj LntE8wuSctSkjLJxVIE6ElVeIFw+DnGaxCC52t3YGpVqpWu/5B6Fq00xCNSNoTY51Wlt c/3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kNm7K0hn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7-v6si1090008plr.770.2018.02.20.22.03.00; Tue, 20 Feb 2018 22:03:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kNm7K0hn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751699AbeBUGCB (ORCPT + 99 others); Wed, 21 Feb 2018 01:02:01 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:55953 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbeBUGB6 (ORCPT ); Wed, 21 Feb 2018 01:01:58 -0500 Received: by mail-it0-f68.google.com with SMTP id n7so936727ita.5 for ; Tue, 20 Feb 2018 22:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=brN2LRy/CCPHeC9CcfBbY6L8i9vuzosge1rjrpUt5Xw=; b=kNm7K0hnogc33lWTj/xaY47lD6w/TcB3+dw/P288dEn1z+ubmPtuOgsQoK7F591pu3 b/cyFE7iyL2OHtEqS794gNqr2hvCCFO2REKz7PQLWf5HZHUPz6WE/LHZCE4sGpDx6zZn txcLCYBD2AiaphpnPVfBtukHwIV/jqboptark= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=brN2LRy/CCPHeC9CcfBbY6L8i9vuzosge1rjrpUt5Xw=; b=Altc9CxUIuZZtNWeOG/6soe/W5jpiK06nT8Z1PBiO4YyBj4oAF5JDXvkozvlrl73dE gIM3MxlQzsBTtrWUNhdbvlwNSYK+gMcDlULtAm7dz9bZfXVX3e+0sWORlp9fSFxfGeeA ZP8WPYLy40PVz9FVm4CVzGiRslkmeSqR/3b3RZ9ovsE8K3oFipU53XsEx/FX8Vd2JxN6 MnV0tZbXoUcwjDaUiM1QotNnuWX2HrGNMMWg1SXSHpPwjH8idQdKvuiaNQnR1m5Sxe2P AwM9Mcx0ZTXUcMllNJJ349kT6wfYGKrJJWVIldEIUgGmTP42cR43TvRf+OZQdhPh6uzz BxOg== X-Gm-Message-State: APf1xPCHaIWlMwpeb92F9oapbrtgB9vR5yT2RDfOCVn0osXRkv+TxmrA ot8nOHXAy59baqLCCLw0w8YOH0ad+kQ= X-Received: by 10.36.111.83 with SMTP id x80mr1723148itb.29.1519192917926; Tue, 20 Feb 2018 22:01:57 -0800 (PST) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com. [209.85.223.177]) by smtp.gmail.com with ESMTPSA id y91sm6303549ita.19.2018.02.20.22.01.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 22:01:57 -0800 (PST) Received: by mail-io0-f177.google.com with SMTP id z6so894994iob.11 for ; Tue, 20 Feb 2018 22:01:57 -0800 (PST) X-Received: by 10.107.142.79 with SMTP id q76mr2755432iod.299.1519192916499; Tue, 20 Feb 2018 22:01:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.105.131 with HTTP; Tue, 20 Feb 2018 22:01:36 -0800 (PST) In-Reply-To: <5b0fcac9-18e1-433f-7977-2a90f3d961f8@xs4all.nl> References: <20180220044425.169493-1-acourbot@chromium.org> <20180220044425.169493-12-acourbot@chromium.org> <5b0fcac9-18e1-433f-7977-2a90f3d961f8@xs4all.nl> From: Alexandre Courbot Date: Wed, 21 Feb 2018 15:01:36 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFCv4 11/21] media: v4l2_fh: add request entity field To: Hans Verkuil Cc: Mauro Carvalho Chehab , Laurent Pinchart , Pawel Osciak , Marek Szyprowski , Tomasz Figa , Sakari Ailus , Gustavo Padovan , Linux Media Mailing List , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 21, 2018 at 12:24 AM, Hans Verkuil wrote: > On 02/20/18 05:44, Alexandre Courbot wrote: >> Allow drivers to assign a request entity to v4l2_fh. This will be useful >> for request-aware ioctls to find out which request entity to use. >> >> Signed-off-by: Alexandre Courbot >> --- >> include/media/v4l2-fh.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h >> index ea73fef8bdc0..f54cb319dd64 100644 >> --- a/include/media/v4l2-fh.h >> +++ b/include/media/v4l2-fh.h >> @@ -28,6 +28,7 @@ >> >> struct video_device; >> struct v4l2_ctrl_handler; >> +struct media_request_entity; >> >> /** >> * struct v4l2_fh - Describes a V4L2 file handler >> @@ -43,6 +44,7 @@ struct v4l2_ctrl_handler; >> * @navailable: number of available events at @available list >> * @sequence: event sequence number >> * @m2m_ctx: pointer to &struct v4l2_m2m_ctx >> + * @entity: the request entity this fh operates on behalf of >> */ >> struct v4l2_fh { >> struct list_head list; >> @@ -60,6 +62,7 @@ struct v4l2_fh { >> #if IS_ENABLED(CONFIG_V4L2_MEM2MEM_DEV) >> struct v4l2_m2m_ctx *m2m_ctx; >> #endif >> + struct media_request_entity *entity; > > The name 'media_request_entity' is very confusing. > > In the media controller API terminology an entity represents a piece > of hardware with inputs and outputs (very rough description), but a > request is not an entity. It may be associated with an entity, though. > > So calling this field 'entity' is also very misleading. Note that this field is not a request though, it is a pointer to a piece of hardware referenced by a request, which is closer to the MC terminology. Or do you mean this should just be renamed "request_entity"? If we go all the way, the media_ prefix is also misleading - it implies a dependency to the media controller framework, while there is none (in this patchset at least). However I thought that 'request' alone (instead of media_request) may name-conflict with something else, and since 'media' is also the umbrella term for anything under drivers/media it sounds fitting on the other hand. Suggestions are welcome though. > > As with previous patches, I'll have to think about this and try and > come up with better, less confusing names. I will gladly take suggestions, have been trying to come with a better name to reply to your comment above but could not find any. :)