Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp852272ybh; Wed, 11 Mar 2020 12:07:36 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuzgCkWiLWfLVhdGS7khI9vHfl5/BxWOdCm01mxBcmFledWzWD09Xhjed/cw4HRvSckZSvK X-Received: by 2002:aca:ecd7:: with SMTP id k206mr106449oih.113.1583953656554; Wed, 11 Mar 2020 12:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583953656; cv=none; d=google.com; s=arc-20160816; b=f5vPlVmmDfrUJOx8gpNLrRJapskXLIByO2cI8zjQdkttUh+GScZpoKUC/i/nhowxZi jQmF8xWyeT4L5obrD4ou3xEJoCcn7B9u+pdaDps1ID8wpkdplfjx7dS0XLzR00kRWxYj gqYmERZRkg9je443v9PIkgRcmcKIeELOG6LU224Wom+aRv0xWy2UoYFFMU/7i28OazeV E1EZ1BExUv4jg5/AcOEt10e5kOMJ0sRjSUzb3vSBdeMXhLpHKWmg2zd5xMwLLromQLIw mE8I2Vn4nEa83TlDAdOByv2273V+Ra0BtytrEn260e5UIUnYHz76BSY362cqr9KfykIE DxsA== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=b3Cgy29Dqf3TWGwP4FeGEObg2LE3ugs0svlpIKXT5us=; b=cYWcsKIlp6HgOsYMcIIIPAjO323Qo+ikIb9l6/aLpkI3dMrUDGh6xjn6m6XgwcTNS7 Wv4oIL+4dvBrgcTk/xFLGbZk57+8P0T8iZcvpsyuIIqILOOatkSyjzQByWTV9pf1+6gv lapEFGmBcjkCf3z9ZrLKTbF8kbpERnMsHTgwmt4hzjxtEnxbwThRsJ6GZ7uChP/6Jvea v30rXMB0QeTsvsjHEvT3xCQkyhPcTv3K3aCZb0rdP4/rwP9mLiVoIJHl8i95sbjRE7QD eXZDiOVFgl07uzB2QSwu8OrIocYK+Cd0vgZV7PWg2ojOF/no/KSIc4iLB0TT8eH0btv+ oiTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=evlE+ihy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5si1603617otn.216.2020.03.11.12.06.42; Wed, 11 Mar 2020 12:07:36 -0700 (PDT) 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=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=evlE+ihy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730988AbgCKTFv (ORCPT + 99 others); Wed, 11 Mar 2020 15:05:51 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:43935 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730762AbgCKTFu (ORCPT ); Wed, 11 Mar 2020 15:05:50 -0400 Received: by mail-qk1-f194.google.com with SMTP id q18so3174870qki.10 for ; Wed, 11 Mar 2020 12:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=b3Cgy29Dqf3TWGwP4FeGEObg2LE3ugs0svlpIKXT5us=; b=evlE+ihydYjvf1CAzYyc/cSmxxZTJf+v9vTFOJSzv2Aj22RAqC1XIPri4QkoIaA7Rg YWH1rx5+g5h3hW45C5qCh7qB3r9L9xrZaF8yAiO3IOF3z/p0aQBYEjgAjUuLkxmUPbWb T6oh7sa0WwsHJtffQYyRQpDoHyQaWIITdaprkiJOUURxo0SN9dT7/GF75CDPOm9tlfvx VghETFrGNVya0yqpgHHJCvYDHbnCHDali4+2/V/y2SCL9qWqxoLruOjJr8+fVh/yV30p JDfOphA9lXyQf/VOGOG7LyJFGDfl66AAM7JE1gWyliuSIDI6zR3Obh+y4dMGTwGkcXvC 5s/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=b3Cgy29Dqf3TWGwP4FeGEObg2LE3ugs0svlpIKXT5us=; b=bVBM+ysuHivYdYHV9Oj2csIrgFGaLOtzWIwN9YQDyZ4oJwctpDxkWJMc5yknt5Kmkb +0CJ6gkLt3G8VFgXdU+WpiPM20mcglPyrr5sQYJkFni50hGAkVwb2qbgJelQekSgbTzv 2pdXZS1VETwfbjoUgkrYOy4J9i8dqNW1bpvjCYdTP+1ge8+ayEwVl368N9t2kjoWT6FV 81+9eMnujYsMpbZNPunIFSQLdlgyyCJ4jlPNXY1OtU7o34CxWN7BVwFKMJoZm7yBNq3G jngXmoT/M/pQCVzzNVsAqkcjBiEY16/lDSLNeT+h9CcgtoKsmEtMa6JSXUN3bMhk4oku DJBg== X-Gm-Message-State: ANhLgQ1PAbwsQPE31u6blJS6DLHduHcC4kbGSKrUhi6zHqfyBmlWBwH2 s78QFGjVZ3u3c/6UGYgj1ZrQ2A== X-Received: by 2002:a37:d96:: with SMTP id 144mr3785883qkn.324.1583953549721; Wed, 11 Mar 2020 12:05:49 -0700 (PDT) Received: from nicolas-tpx395.localdomain ([2610:98:8005::527]) by smtp.gmail.com with ESMTPSA id f13sm6334201qka.83.2020.03.11.12.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 12:05:47 -0700 (PDT) Message-ID: Subject: Re: [PATCH 6/6] hantro: Refactor for V4L2 API spec compliancy From: Nicolas Dufresne To: Ezequiel Garcia , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , kernel@collabora.com, Jonas Karlman , Heiko Stuebner , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke Date: Wed, 11 Mar 2020 15:05:46 -0400 In-Reply-To: <02c89cb555c10ae61a365a2f54eb72bc4aee3c78.camel@collabora.com> References: <20200311174300.19407-1-ezequiel@collabora.com> <20200311174300.19407-7-ezequiel@collabora.com> <02c89cb555c10ae61a365a2f54eb72bc4aee3c78.camel@collabora.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mercredi 11 mars 2020 à 16:01 -0300, Ezequiel Garcia a écrit : > On Wed, 2020-03-11 at 14:43 -0300, Ezequiel Garcia wrote: > > Refactor how S_FMT and TRY_FMT are handled, and also make sure > > internal initial format and format reset are done properly. > > > > The latter is achieved by making sure the same hantro_{set,try}_fmt > > helpers are called on all paths that set the format (which is > > part of the driver state). > > > > This commit removes the following v4l2-compliance warnings: > > > > test VIDIOC_G_FMT: OK > > fail: v4l2-test-formats.cpp(711): Video Capture Multiplanar: TRY_FMT(G_FMT) != G_FMT > > test VIDIOC_TRY_FMT: FAIL > > fail: v4l2-test-formats.cpp(1116): Video Capture Multiplanar: S_FMT(G_FMT) != G_FMT > > test VIDIOC_S_FMT: FAIL > > > > Reported-by: Nicolas Dufresne > > Signed-off-by: Ezequiel Garcia > > --- > [..] > > @@ -227,12 +232,12 @@ static int vidioc_g_fmt_cap_mplane(struct file *file, void *priv, > > return 0; > > } > > > > -static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f, > > - bool capture) > > +static int hantro_try_fmt(const struct hantro_ctx *ctx, > > Oops, it seems there's a warning due to ctx being const-qualified. Indeed: drivers/staging/media/hantro/hantro_v4l2.c: In function ‘hantro_try_fmt’: drivers/staging/media/hantro/hantro_v4l2.c:282:30: warning: passing argument 1 of ‘hantro_needs_postproc’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 282 | !hantro_needs_postproc(ctx, fmt)) | ^~~ In file included from drivers/staging/media/hantro/hantro_v4l2.c:29: drivers/staging/media/hantro/hantro.h:420:42: note: expected ‘struct hantro_ctx *’ but argument is of type ‘const struct hantro_ctx *’ 420 | hantro_needs_postproc(struct hantro_ctx *ctx, const struct hantro_fmt *fmt) | ~~~~~~~~~~~~~~~~~~~^~~ > > That should be fixed of course. > > Regards, > Ezequiel > >