Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp379622lqt; Thu, 6 Jun 2024 06:32:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvcssSDDUIMiw86gXRVPbCV2CcOPnHboo2p4rjFvKvC+qE+nhRcZq/8vpDILtWoSKl9qFfT/hKu8zxYS3MnTDDhApS0ff+DPzxw5fqhA== X-Google-Smtp-Source: AGHT+IHQbR5vANKZI3Vll5lbfiKOKNKmp4PebXkXtA5+f5o6amkvB5dJMZ1cbE0/6ykErI81KkEh X-Received: by 2002:a17:906:341b:b0:a6a:6179:6df6 with SMTP id a640c23a62f3a-a6a61797d00mr270551566b.6.1717680739153; Thu, 06 Jun 2024 06:32:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717680739; cv=pass; d=google.com; s=arc-20160816; b=Be0fswuaSJmuoWJBmwpxt/7qC6C2LjEzGcHG1767MrAiplusJV8NPylgjSDj1WJoMG xx29kpYxgrqE7PME1mB1cfrfu6Z9a/GVk/waHQMGE5tdj1C3e1VtbO2hbw1pxb52iOjj 2Unv2seTC1kAQLT3xZGv7rLUGIHEULROeqQqIbT/x0jv1Lm8wefamcHTHPLwyCrULGiK ChncagvUjYEfh5/MgB/RALC3Pbfx0rAS/WpKSWPadU9Z9v54HRzfbWPNYZNY5x/ac/yX jzQ1u1CZZy6GkYCsouyYEGQyx/8Qvf1P+83m20neSfBkzt52lXJji3YzPK4i58goo6wO YGLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Kx5MbrOxEtUYpPljTcPyApoVWRxhbFbQe/9s37OMmCI=; fh=0b6e2l5xJnIPs9lZl691zld0N8/QdXFGjmwyMnp2qis=; b=FvbOrAApJS9nxeKchf+fPMl6d129R+pidiaCTxxyecH5fH/cZ8HRkiKuR6VYC7522I /UdfaHefOQ3kWOdlpFGTpkT/OF9AZTYecwCZkD2Scd2jwXhch5A8m2o/3z772miwal0h ztMOqY+39TesIzl8NIsdQKpFqWXWLzC6VXd3RQZTbRlKJNGPawZO6OZdlK3QvEwY3xo8 GU66VIVvhMfkoHcugTqVcNrRDALQ6u0MLHh11QGmTAw3rBcERv27eGDZv8DPAGo4wNzn Hvroowr5o5J8FJm4FXvbCuXEgpUoWY78S+GCoEmdyx3kjPVysAYvI/KbH+xHFVhZiRew AaGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IIauxGLV; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-204372-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c80708ea3si69672666b.691.2024.06.06.06.32.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 06:32:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204372-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IIauxGLV; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-204372-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D3ED21F25B47 for ; Thu, 6 Jun 2024 13:32:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55BEA195FDF; Thu, 6 Jun 2024 13:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="IIauxGLV" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB27C19597D; Thu, 6 Jun 2024 13:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717680727; cv=none; b=duxbZ8YUa3JMnbaXqYFsTe0sXjWNAJF94rHcujtqT0FF/YQ0AsAHrfS5UCq5ADqgh+GGWOwXnOrkkgqjx4nMZCPqJ6Lr0S01llkCh8osbN9+2hBNapI/3iA/pAk7CgJCqUyFD6nrqhbNOLa1s4ALEd8l7JZrzODjToM5ZE9y9OY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717680727; c=relaxed/simple; bh=53K5bVAU63enbPKQhnSpr1fiYKwTeDxOkN3UofZdK8E=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=UiuSq2rYGaysH/469nNZMb24xko5ytDcnaXn5lVg0H3al7SmhkNV8/ByXsNzNUWERS4wN5ZH62T8i5NCuYOsh2PTnaKH+ueYeN8Lpcl6M5iZXc2M6pPgilsYkbAkVndiLvFwCQ/rc0PlEAdTtBgG4OkS7yOP5Ryc8WY5+06SMFU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=IIauxGLV; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 456DVYEY112323; Thu, 6 Jun 2024 08:31:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717680694; bh=Kx5MbrOxEtUYpPljTcPyApoVWRxhbFbQe/9s37OMmCI=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=IIauxGLVgHg8W+1s6ZuXkpglyYHoGyj6IbB/vdCltxFUk5OMs1jzDWba6/9RH6VpF QKfehPzFWYMiIyAaEIvkBHLd3TT4sGc6gsO3SVtPFOC2idQy+mHWEVuU1qsr6fdiPQ B2udbUq6G6Zenk8payCeoJ4yekMhmgRwPh2jnUts= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 456DVYU6025743 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2024 08:31:34 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 6 Jun 2024 08:31:34 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 6 Jun 2024 08:31:34 -0500 Received: from [172.24.227.193] (devarsht.dhcp.ti.com [172.24.227.193] (may be forged)) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 456DVQmd125266; Thu, 6 Jun 2024 08:31:27 -0500 Message-ID: <7e4a0071-18a0-b892-5cd3-c8eb70617090@ti.com> Date: Thu, 6 Jun 2024 19:01:26 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v12 12/13] media: imagination: Round to closest multiple for cropping region Content-Language: en-US To: Sebastian Fricke CC: , , , , , , , , , , , , , , , , , , , , , , , , , References: <20240604104001.2235082-1-devarsht@ti.com> <20240604105335.2257629-1-devarsht@ti.com> <20240606114459.x73yebdu7kg7re52@basti-XPS-13-9310> From: Devarsh Thakkar In-Reply-To: <20240606114459.x73yebdu7kg7re52@basti-XPS-13-9310> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Hi Sebastian Thanks for the update. On 06/06/24 17:14, Sebastian Fricke wrote: > Hey, > > On 04.06.2024 16:23, Devarsh Thakkar wrote: >> If neither of the flags to round down (V4L2_SEL_FLAG_LE) or round up >> (V4L2_SEL_FLAG_GE) are specified by the user, then round to nearest >> multiple of requested value while updating the crop rectangle coordinates. >> >> Use the rounding macro which gives preference to rounding down in case two >> nearest values (high and low) are possible to raise the probability of >> cropping rectangle falling inside the bound region. >> >> This complies with the VIDIOC_G_SELECTION, VIDIOC_S_SELECTION ioctl >> description as documented in v4l uapi [1] which specifies that driver >> should choose crop rectangle as close as possible if no flags are passed by >> user-space, as quoted below : >> >> "``0`` - The driver can adjust the rectangle size freely and shall choose a >> crop/compose rectangle as close as possible to the requested >> one." >> >> Link: >> https://www.kernel.org/doc/Documentation/userspace-api/media/v4l/vidioc-g-selection.rst [1] >> Signed-off-by: Devarsh Thakkar > > Acked-by: Sebastian Fricke > > Can, whoever picks up the math changes, pick up this change as well? > I will send 1-6 via the media subsystem. > For [PATCH 1/13] to [PATCH 6/13] patches from the series, I see few warnings reported to me offline for some of the patches which were caught from using smatch/sparse related automation scripts which were somehow missed by my equivalent test script. The fixes should be trivial though and I will be rolling out a v13 soon to fix them up. The rest of the patches (PATCH 7/13 to PATCH 13/13) no smatch/sparse related warnings were caught for these though, and are good to go in. Although, I can still include them in V13 too just to avoid any confusion. Regards Devarsh