From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 A374B21C9E0 for ; Mon, 10 Feb 2025 13:53:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739195604; cv=none; b=odh9CBS5xQJrypNGpamnPPF4vLvFD0xTC8wtIDkkEHwc/WLcAq96D+mFYS/hJ3cPW6qD1Ji9wFbwz9epWNKlnFgjkrDOzIM8AZRI/0xiL9/LcY01/5fzdLBNj/r0wZyqYzlcA7KC39OEblUGNmVGuRI8LGb4XSDi/BXOAIu1izQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739195604; c=relaxed/simple; bh=JVugNEdDeQh0Li0CEdEkQ8AsNl9L9z1peGFx9yJ0MrQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oRa/ZTgiwCr1M8HIpkI7wvXGXzHJKTLfBUthIPsQs+u/m6rFAQzvSSVx+nErFXRz3yLCxfpsnuq3mNZ4prfy8YsfwyOOQlnB+81Q23roSL+/YHsUiRp8hEW7DU50VOkAZcmlcbW8LJuZXOkBJVzR0BTJgfZ3RxGCUsD/de8bbII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=nW/Bmgun; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nW/Bmgun" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739195602; x=1770731602; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=JVugNEdDeQh0Li0CEdEkQ8AsNl9L9z1peGFx9yJ0MrQ=; b=nW/Bmgun9NQa+K1soD94aAvBMVBqonwP1zQRz2ykPqlVd/F3Tr1+5g1E D4hNmZbppGPI5q6us0NN/h1b8Qh5OtIxyWEuTkwm7B2XYKgN0tTxyN4Vn xoiTsWB48D5cpSwqNB0VFucXeY+xaYshb3jsTpvfNyRAg65LiHEiWbrjw tlia7b7Qvl4FCvdTQUfEld6bVvMzo71klGtsegkS4cQoS+GRPv3D39vva ZNfk/t3A2zI1dom2AgA3gHcnVVEHxvb3Zxzb8Nc0CwIgcVf6o9bTqggqf j0mdMZuik4Zgwtad7oAzA0NV2YpybKediEzf3lK/U6YctQYhEjF56R/gC Q==; X-CSE-ConnectionGUID: 2pYaX3DpSVqajdmxaPWggw== X-CSE-MsgGUID: RZdSWq7oRwqeQLLuGXJ7RQ== X-IronPort-AV: E=McAfee;i="6700,10204,11341"; a="50415198" X-IronPort-AV: E=Sophos;i="6.13,274,1732608000"; d="scan'208";a="50415198" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2025 05:53:21 -0800 X-CSE-ConnectionGUID: dqVhxefkRJ6K+fylaMAbNw== X-CSE-MsgGUID: 4s30Jf60T/6PfehgfqZtJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,274,1732608000"; d="scan'208";a="112723160" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2025 05:53:16 -0800 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 1D9EF11F8D9; Mon, 10 Feb 2025 15:53:13 +0200 (EET) Date: Mon, 10 Feb 2025 13:53:13 +0000 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo From: Sakari Ailus To: Mirela Rabulea Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, Prabhakar , Kate Hsuan , Alexander Shiyan , Mikhail Rudenko , Dave Stevenson , Tommaso Merciai , Umang Jain , Benjamin Mugnier , Sylvain Petinot , Christophe JAILLET , Julien Massot , Naushir Patuck , "Yan, Dongcheng" , "Cao, Bingbu" , "Qiu, Tian Shu" , "Wang, Hongju" , Stefan Klug , =?iso-8859-1?Q?Andr=E9?= Apitzsch , Heimir Thor Sverrisson , Kieran Bingham , Stanislaw Gruszka , Mehdi Djait , Ricardo Ribalda Delgado , Hans de Goede Subject: Re: [RFC v5 10/15] media: v4l: uapi: Add a control for colour pattern flipping effect Message-ID: References: <20250203085853.1361401-1-sakari.ailus@linux.intel.com> <20250203085853.1361401-11-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Mirela, On Sun, Feb 09, 2025 at 07:23:10PM +0200, Mirela Rabulea wrote: > Hi Sakari, > > On 03.02.2025 10:58, Sakari Ailus wrote: > > Add a bitmask control (V4L2_CID_COLOUR_PATTERN_FLIP) to tell whether > > flipping results in a change in the sensor's colour pattern, separately > > horizontally and vertically. The information is essential for raw formats > > when using generic raw mbus codes. > > Is this control really necessary? Are there cases when V4L2_CID_HFLIP or/and > V4L2_CID_VFLIP is enabled and the CFA pattern does not change? Some sensors have some tricks in firmware to avoid changing the pattern (I suppose in reality they crop one line / column) but this may not be controllable by the driver, so this possibility should be taken into account. > > Could a raw sensor driver be capable of reporting the > V4L2_CID_COLOUR_PATTERN based on current values of the HFLIP/VFLIP? I'm not > sure I understood all the aspects of patch #7 (V4L2_CID_COLOUR_PATTERN). In principle it could. The two were originally made independent also because there was an inconvenient dependency between mbus codes and controls. If the pattern control does not specify the native pattern but an active pattern (whatever has an effect on it), the userspace also must check that configuration to determine the native pattern. My understanding is the preference on that side is the native pattern. -- Regards, Sakari Ailus