Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1993916pxb; Fri, 24 Sep 2021 17:22:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY+8MdjVeUnDP4Iblei8rj6KZbS4t7Tzn9qQUrPeDeUxUOBg6CxjpwZJfIotnzx6laSPbh X-Received: by 2002:a17:906:1289:: with SMTP id k9mr14674863ejb.2.1632529335096; Fri, 24 Sep 2021 17:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632529335; cv=none; d=google.com; s=arc-20160816; b=w5B6r3vkHLFSG3JhB2FUxSzjUz3Tk3ULSrNA8/3WGtn0VlYCiTiQIwYFP7gWj/oU0D fFxk3h+wOL/U3VtjJ3RPc5EEBcA3CVmPPV0xf9oNMI2nik/gHcWCfduVDuEuJCc8gXy0 Iwk4wih0OBvy/2Chtxik4ax9cnBmf26UTlQ5lqiM0FJ3YFcipX1hSOoTDzQTZNH9am9y NjFFMOgCftlDo9k8JrxwX3MptV1QoCny34jsuK0MopK7tn4xlRS6kHExJdHCw77Ej9Th gMLVSph+5unsZKjilQMNMfZZOkvaPg2R7OQBvwgCxoFDLu+28kdw6vRt33Xkx+OJ9VjZ 8r0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OTJRT+uzM0lAz165RqeTd1Tx4KIJ3Eki8evDEIFClkc=; b=c/RNtSaPvcv/LZDkhm8m7+9kK6NsNzcjL8CFgc2zcYK3/zyCa0lFC5l/mPnCc9U0VP OntmTzHiYrv0buofCMCENQfh+bx+ADX7gBDw+iljPIwzCWcFAgM4rklbyQvX318s2zvJ 0TNghb3aezHwdlvOkxj9HL8PesZYXa9MySIliz7i43leey/ndCEYP510sm8+PIbvWjJn YsnEpAQy0lBZC8TRF3U8+9KrYY/bOE4oj7Ws0eS3/THTRjeTqXbTdIUKf+bCbgDjaZ7A ZKzyHvsFjGqcgqzw3Q5Kd9EoEsTu49RfestWVi3zRnjF2gXUBgNJcGp1LJ5c2jOIRcao Q9Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20210112.gappssmtp.com header.s=20210112 header.b=jozqt8pu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n27si1566162ejl.747.2021.09.24.17.21.50; Fri, 24 Sep 2021 17:22:15 -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; dkim=pass header.i=@cogentembedded-com.20210112.gappssmtp.com header.s=20210112 header.b=jozqt8pu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346309AbhIXNxs (ORCPT + 99 others); Fri, 24 Sep 2021 09:53:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345930AbhIXNxq (ORCPT ); Fri, 24 Sep 2021 09:53:46 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37FC3C0614ED for ; Fri, 24 Sep 2021 06:52:12 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id e15so40709138lfr.10 for ; Fri, 24 Sep 2021 06:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OTJRT+uzM0lAz165RqeTd1Tx4KIJ3Eki8evDEIFClkc=; b=jozqt8pupd8eRYq2mgkuTKUGaUkT9MKLgTv1jddpEfLiIVzs9Hoket0uZiVA0Og3/w Ztru2V8mUx4x2/kLUzudFglpVO1URBuD+Wewe3SF44w4JmnieXP0uvPWIWdrN04fineg DlxlbDjPOyehZeIKRMuF2NQt377JuWhAGrD/7vVs5Pmezu8IE+HtgurwSvN/lcpzNIHo slYQpKTSN2jhxkXrPFyi3aEHB+tmIsUmlgNmST2rUEcobGlGcQAscFoKGUy1GGewZP8n C71mbtm7rkkmFK5ciZtrbeIN0xJzi/qDfRGmI/2dw6DNoWwLDAxl6DFMfLTtM1sVwJMx UkTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OTJRT+uzM0lAz165RqeTd1Tx4KIJ3Eki8evDEIFClkc=; b=YWatPraxWQs811gAkXNhnH24Kw0K0Lg5eBLwDdqrTiFRicWVw142AxMoiArmR3Tznz XYHn2Ybtoss1EjbYkUuy1oUFGfs3iderRB8CkkwCN/GkzvsTGnzTyMmJronVt54VtPHm a/a6H5D47Zl03opsdD5XOzGD+4M+ExYNDkZYdgjhswG4FwdxYXNtlyzGIT5N5+6s8e6W UchlyrxfU1v2Dj8x7w/SBR7Y5VRfeVW4dYuFN2F6HPlTZeQtBOGGMN/y0ebLzD2v92cx 2OsQpiTcV0QaIvySiN5VonCXuvZp0HAx2jekecWNj7OJkRKWQQ0Ev+nwJwk75227BstZ tETw== X-Gm-Message-State: AOAM531AWgZ5gVpRtLja5aelkno6ABfK1gGKRxcpyGHkk0SZtghi+1pB IKZHoXSOAT+Cca2UEGoEaB+L4g== X-Received: by 2002:a2e:814d:: with SMTP id t13mr11696803ljg.237.1632491530606; Fri, 24 Sep 2021 06:52:10 -0700 (PDT) Received: from cobook.home (nikaet.starlink.ru. [94.141.168.29]) by smtp.gmail.com with ESMTPSA id v27sm761214lfd.127.2021.09.24.06.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 06:52:10 -0700 (PDT) From: Nikita Yushchenko To: =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Barinov , Nikita Yushchenko Subject: [PATCH v2] media: rcar-vin: add G/S_PARM ioctls Date: Fri, 24 Sep 2021 16:51:38 +0300 Message-Id: <20210924135138.29950-1-nikita.yoush@cogentembedded.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Barinov This adds g/s_parm ioctls for parallel interface. Signed-off-by: Vladimir Barinov Signed-off-by: Nikita Yushchenko --- Changes from v1: - use &vin->vdev to access vin's struct video_device drivers/media/platform/rcar-vin/rcar-v4l2.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index bdeff51bf768..a5bfa76fdac6 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -527,6 +527,24 @@ static int rvin_s_selection(struct file *file, void *fh, return 0; } +static int rvin_g_parm(struct file *file, void *priv, + struct v4l2_streamparm *parm) +{ + struct rvin_dev *vin = video_drvdata(file); + struct v4l2_subdev *sd = vin_to_source(vin); + + return v4l2_g_parm_cap(&vin->vdev, sd, parm); +} + +static int rvin_s_parm(struct file *file, void *priv, + struct v4l2_streamparm *parm) +{ + struct rvin_dev *vin = video_drvdata(file); + struct v4l2_subdev *sd = vin_to_source(vin); + + return v4l2_s_parm_cap(&vin->vdev, sd, parm); +} + static int rvin_g_pixelaspect(struct file *file, void *priv, int type, struct v4l2_fract *f) { @@ -743,6 +761,9 @@ static const struct v4l2_ioctl_ops rvin_ioctl_ops = { .vidioc_g_selection = rvin_g_selection, .vidioc_s_selection = rvin_s_selection, + .vidioc_g_parm = rvin_g_parm, + .vidioc_s_parm = rvin_s_parm, + .vidioc_g_pixelaspect = rvin_g_pixelaspect, .vidioc_enum_input = rvin_enum_input, -- 2.30.2