From patchwork Fri Jun 28 13:29:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13716148 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 E5CAF29B0 for ; Fri, 28 Jun 2024 13:30:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581413; cv=none; b=MCpFRfZ8q7GVVAsz8UtZs1h80e7M4inaD7bB2A3VTyfNiw4BWC51KjZ43IrPkCnEVIWZam2mT4eM6992xkctXf77rZpEgky+IQURuwNplXZuECF4Dg/jsk7nftzx9pLlhRNLlJGLnZNmcxLG1O5s5Zif2FwmW4E+4UffimW3x0I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581413; c=relaxed/simple; bh=TXKtOf0KFuRGi3Et4OUwfPMIir819rzB91xU37nxQR4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=niifmMCF+m4RYyxYnNVpzrKdimlpL61kTkFks+SdgKwbo7ey2ag/seZH5qa79H2SBu9b75kjpFfaFzRzlXUUdD5tsMVt13uYTB2AxkSogBM1jDBGiSdGoU47yeJhb/AvX4ba4fPE9lxQTsOOJm1gIkhPurZVqKKk/3NwA9MNJcw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=v3ReSlYG; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="v3ReSlYG" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32EE814AF; Fri, 28 Jun 2024 15:29:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719581378; bh=TXKtOf0KFuRGi3Et4OUwfPMIir819rzB91xU37nxQR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v3ReSlYGqWVgCnBkRjfSJ6NOqveRPlURBMQoBy6tIQvz91etbAs4xyYrAJyX8cVZo o626LIPE5NRlc7iw8t7KK0dQCCWWG3Iu8ycavwQ1mQcp8ZMu45/2JLwP7nUGqkghV7 /GTjnYXCD8FK4fdMwriOXI03o0PfA+GG1Gk5PC/0= From: Jacopo Mondi To: Linux Media Mailing List , Hans Verkuil , Sakari Ailus , Naushir Patuck , David Plowman , Nick Hollinghurst Cc: Jacopo Mondi , Dave Stevenson , Tomi Valkeinen , Laurent Pinchart , Kieran Bingham , Mauro Carvalho Chehab Subject: [PATCH v2 1/5] media: uapi: pisp_be_config: Drop BIT() from uAPI Date: Fri, 28 Jun 2024 15:29:42 +0200 Message-ID: <20240628132948.871568-2-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> References: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The pisp_be_config.h uAPI header file contains a bit-field definition that uses the BIT() helper macro. As the BIT() identifier is not defined in userspace, drop it from the uAPI header. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Reviewed-by: Tomi Valkeinen --- include/uapi/linux/media/raspberrypi/pisp_be_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.45.2 diff --git a/include/uapi/linux/media/raspberrypi/pisp_be_config.h b/include/uapi/linux/media/raspberrypi/pisp_be_config.h index 1684ae068d4f..27d0cc417d6b 100644 --- a/include/uapi/linux/media/raspberrypi/pisp_be_config.h +++ b/include/uapi/linux/media/raspberrypi/pisp_be_config.h @@ -146,7 +146,7 @@ struct pisp_be_dpc_config { */ struct pisp_be_geq_config { __u16 offset; -#define PISP_BE_GEQ_SHARPER BIT(15) +#define PISP_BE_GEQ_SHARPER (1U << 15) #define PISP_BE_GEQ_SLOPE ((1 << 10) - 1) /* top bit is the "sharper" flag, slope value is bottom 10 bits */ __u16 slope_sharper; From patchwork Fri Jun 28 13:29:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13716149 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 8F77829B0 for ; Fri, 28 Jun 2024 13:30:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581416; cv=none; b=hIC+F1azEHy1tpOAjWnj267fQ/j3lH8jVTsETEWcSuVsxGIchs1Us31u2NogHDC5zKp3QyJ8RJatcvk0pfmMqr+cY33cunUznmqzZt+uy7JJtUqBRay2jcZw76WlnfbF0gbFHm8KdNrT/PmrEqUV/l67ikP3eulbZpzUlF2a7xM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581416; c=relaxed/simple; bh=2/TJGAbpZdXIuRAH8d1JX1KZPFgtsSB4eyGYOXRL2XU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y1huF8ZY25OFiRWXfPcXg7BcXKazbG83TOmB5wvAS7aLrvzVFRkX/uKuGTdYArnlUB7A4bgY3Xz5yHsc0upg2OhCyRal+aI7uYQkqDHcVlgils9He8dN74AdrG9zCuNyfDTM6zP+MceX7C8WX8DUERsYZQVZQP3pj+VACz78fbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=YMocfmVx; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YMocfmVx" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 08E9F16B0; Fri, 28 Jun 2024 15:29:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719581379; bh=2/TJGAbpZdXIuRAH8d1JX1KZPFgtsSB4eyGYOXRL2XU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YMocfmVxBliFkiIQ7e+wtymRWhZTipnlMogR88hkuUYl+6WoIvRlkNnLhHM2DtJ4K lEs8nC2WN4sX0ce6WBKNNzNhHh3fMUtsToICdOsoYC1yvmHxYYdammeq2DhtbzqR4I 4GgJmRjBOTGtYuJ6MztPbQw5ieV3BfGtQUyeXyi0= From: Jacopo Mondi To: Linux Media Mailing List , Hans Verkuil , Sakari Ailus , Naushir Patuck , David Plowman , Nick Hollinghurst Cc: Jacopo Mondi , Dave Stevenson , Tomi Valkeinen , Laurent Pinchart , Kieran Bingham , Mauro Carvalho Chehab Subject: [PATCH v2 2/5] media: uapi: pisp_common: Add 32 bpp format test Date: Fri, 28 Jun 2024 15:29:43 +0200 Message-ID: <20240628132948.871568-3-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> References: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add definition and test for 32-bits image formats to the pisp_common.h uAPI header. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Acked-by: David Plowman --- include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.45.2 diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h index b2522e29c976..74d096188233 100644 --- a/include/uapi/linux/media/raspberrypi/pisp_common.h +++ b/include/uapi/linux/media/raspberrypi/pisp_common.h @@ -72,6 +72,8 @@ enum pisp_image_format { PISP_IMAGE_FORMAT_SHIFT_8 = 0x00080000, PISP_IMAGE_FORMAT_SHIFT_MASK = 0x000f0000, + PISP_IMAGE_FORMAT_BPP_32 = 0x00100000, + PISP_IMAGE_FORMAT_UNCOMPRESSED = 0x00000000, PISP_IMAGE_FORMAT_COMPRESSION_MODE_1 = 0x01000000, PISP_IMAGE_FORMAT_COMPRESSION_MODE_2 = 0x02000000, @@ -134,6 +136,7 @@ enum pisp_image_format { PISP_IMAGE_FORMAT_PLANARITY_PLANAR) #define PISP_IMAGE_FORMAT_wallpaper(fmt) \ ((fmt) & PISP_IMAGE_FORMAT_WALLPAPER_ROLL) +#define PISP_IMAGE_FORMAT_bpp_32(fmt) ((fmt) & PISP_IMAGE_FORMAT_BPP_32) #define PISP_IMAGE_FORMAT_HOG(fmt) \ ((fmt) & \ (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED)) From patchwork Fri Jun 28 13:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13716150 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 AE0E61E89A for ; Fri, 28 Jun 2024 13:30:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581416; cv=none; b=U7H5BuKItX1Q/g1T67J6YHG8P18WDJnTTW+mhoTHJZvhR8l0mjH5PaXWf8i0nyTkBYjWUc4hKcPfFlwv7ydDeHEjFHN4SrFOWKeDwQqoWbU5CGXdyrGfXtO4CzYar1orqd1iIN+WksrM+E5bpWPXUJdhQY+Te0gGiDCwnaFX7Ww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581416; c=relaxed/simple; bh=0lNPrP/MnDESw/OyHxx2M6JwQEZQz9GEnrxABjvlAOI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lbSCjcx1icjbwr5pPpr1ngiYfvR4q0YalGCSo9Mc3PsEQUZZfWZlCAi+VR/R7X2QqaN2fV8KjLGk7B0pu7KHA1PSvxHTbgH+rVOqZvMjX5htvurzoSrNvoHRpTlsvTBAPhy+HxVQ0J3wIWTmzfyUfdS1VFrCvTxPEzZjzTLAIyc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Haz3Mff7; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Haz3Mff7" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D87D4191B; Fri, 28 Jun 2024 15:29:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719581380; bh=0lNPrP/MnDESw/OyHxx2M6JwQEZQz9GEnrxABjvlAOI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Haz3Mff74pkdekmbUAhQ5i+fOq1k8gO/SVvNhCFLljclhtqv44NZpn6aCXS49GD7k YGEhxVyyXo2gjD/GCH/qbFmfF4+WyG5XsAfQqzrLZrMmyvcSbTfFv9w5YVlGvScUpP 0Cbn9SrDbxeB9VJp+awIWM376AMiBh/VB80hvqW4= From: Jacopo Mondi To: Linux Media Mailing List , Hans Verkuil , Sakari Ailus , Naushir Patuck , David Plowman , Nick Hollinghurst Cc: Jacopo Mondi , Dave Stevenson , Tomi Valkeinen , Laurent Pinchart , Kieran Bingham , Mauro Carvalho Chehab Subject: [PATCH v2 3/5] media: uapi: pisp_common: Capitalize all macros Date: Fri, 28 Jun 2024 15:29:44 +0200 Message-ID: <20240628132948.871568-4-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> References: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The macro used to inspect an image format characteristic use a mixture of capitalized and non-capitalized letters, which is rather unusual for the Linux kernel style. Capitalize all identifiers. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi --- .../linux/media/raspberrypi/pisp_common.h | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) -- 2.45.2 diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h index 74d096188233..cbdccfed1261 100644 --- a/include/uapi/linux/media/raspberrypi/pisp_common.h +++ b/include/uapi/linux/media/raspberrypi/pisp_common.h @@ -92,51 +92,51 @@ enum pisp_image_format { PISP_IMAGE_FORMAT_THREE_CHANNEL }; -#define PISP_IMAGE_FORMAT_bps_8(fmt) \ +#define PISP_IMAGE_FORMAT_BPS_8(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_8) -#define PISP_IMAGE_FORMAT_bps_10(fmt) \ +#define PISP_IMAGE_FORMAT_BPS_10(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_10) -#define PISP_IMAGE_FORMAT_bps_12(fmt) \ +#define PISP_IMAGE_FORMAT_BPS_12(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_12) -#define PISP_IMAGE_FORMAT_bps_16(fmt) \ +#define PISP_IMAGE_FORMAT_BPS_16(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) == PISP_IMAGE_FORMAT_BPS_16) -#define PISP_IMAGE_FORMAT_bps(fmt) \ +#define PISP_IMAGE_FORMAT_BPS(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) ? \ 8 + (2 << (((fmt) & PISP_IMAGE_FORMAT_BPS_MASK) - 1)) : 8) -#define PISP_IMAGE_FORMAT_shift(fmt) \ +#define PISP_IMAGE_FORMAT_SHIFT(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_SHIFT_MASK) / PISP_IMAGE_FORMAT_SHIFT_1) -#define PISP_IMAGE_FORMAT_three_channel(fmt) \ +#define PISP_IMAGE_FORMAT_THREE_CHANNEL(fmt) \ ((fmt) & PISP_IMAGE_FORMAT_THREE_CHANNEL) -#define PISP_IMAGE_FORMAT_single_channel(fmt) \ +#define PISP_IMAGE_FORMAT_SINGLE_CHANNEL(fmt) \ (!((fmt) & PISP_IMAGE_FORMAT_THREE_CHANNEL)) -#define PISP_IMAGE_FORMAT_compressed(fmt) \ +#define PISP_IMAGE_FORMAT_COMPRESSED(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_COMPRESSION_MASK) != \ PISP_IMAGE_FORMAT_UNCOMPRESSED) -#define PISP_IMAGE_FORMAT_sampling_444(fmt) \ +#define PISP_IMAGE_FORMAT_SAMPLING_444(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == \ PISP_IMAGE_FORMAT_SAMPLING_444) -#define PISP_IMAGE_FORMAT_sampling_422(fmt) \ +#define PISP_IMAGE_FORMAT_SAMPLING_422(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == \ PISP_IMAGE_FORMAT_SAMPLING_422) -#define PISP_IMAGE_FORMAT_sampling_420(fmt) \ +#define PISP_IMAGE_FORMAT_SAMPLING_420(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_SAMPLING_MASK) == \ PISP_IMAGE_FORMAT_SAMPLING_420) -#define PISP_IMAGE_FORMAT_order_normal(fmt) \ +#define PISP_IMAGE_FORMAT_ORDER_NORMAL(fmt) \ (!((fmt) & PISP_IMAGE_FORMAT_ORDER_SWAPPED)) -#define PISP_IMAGE_FORMAT_order_swapped(fmt) \ +#define PISP_IMAGE_FORMAT_ORDER_SWAPPED(fmt) \ ((fmt) & PISP_IMAGE_FORMAT_ORDER_SWAPPED) -#define PISP_IMAGE_FORMAT_interleaved(fmt) \ +#define PISP_IMAGE_FORMAT_INTERLEAVED(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == \ PISP_IMAGE_FORMAT_PLANARITY_INTERLEAVED) -#define PISP_IMAGE_FORMAT_semiplanar(fmt) \ +#define PISP_IMAGE_FORMAT_SEMIPLANAR(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == \ PISP_IMAGE_FORMAT_PLANARITY_SEMI_PLANAR) -#define PISP_IMAGE_FORMAT_planar(fmt) \ +#define PISP_IMAGE_FORMAT_PLANAR(fmt) \ (((fmt) & PISP_IMAGE_FORMAT_PLANARITY_MASK) == \ PISP_IMAGE_FORMAT_PLANARITY_PLANAR) -#define PISP_IMAGE_FORMAT_wallpaper(fmt) \ +#define PISP_IMAGE_FORMAT_WALLPAPER(fmt) \ ((fmt) & PISP_IMAGE_FORMAT_WALLPAPER_ROLL) -#define PISP_IMAGE_FORMAT_bpp_32(fmt) ((fmt) & PISP_IMAGE_FORMAT_BPP_32) +#define PISP_IMAGE_FORMAT_BPP_32(fmt) ((fmt) & PISP_IMAGE_FORMAT_BPP_32) #define PISP_IMAGE_FORMAT_HOG(fmt) \ ((fmt) & \ (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED)) From patchwork Fri Jun 28 13:29:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13716151 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 536551E89A for ; Fri, 28 Jun 2024 13:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581419; cv=none; b=L49jfcsqwacKmq9y0LSsKg+R7XlrcVkd1mrKde1bXz1ITeIwO2EKRBA4x0dXj7CiAWn1K1d4gc5CtWjBOw+SF96QlbgCJn95x5Wm69GMuKNUBjhD02Fgb+kbbziVJZVRMliRP7hQZDMKVTXw0fGLdt9Wcxi5XWp9kF2ik4HY20s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581419; c=relaxed/simple; bh=T3jlOrkkT2yn32h8hI7ffvgpnNYPtTcOtU5jiOj6FyQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q4tnyo6pLyShLBD9dBOY5Ze82ya5gfJR5z0zVXhkm0f2z0vi8kYj2Vabzz2QII1g+kfR56i2SbcMKLxNbL1KVPmVI1PdkeQjl5Me0kkrhNFJrJNV2V/5MFtUUJ+0c3zvGo5kSRmFfqCG/6K6MEk4RuXDSjtsH7tg5UnUtii5srk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=LhXOa8fC; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LhXOa8fC" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ABC0F1929; Fri, 28 Jun 2024 15:29:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719581381; bh=T3jlOrkkT2yn32h8hI7ffvgpnNYPtTcOtU5jiOj6FyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LhXOa8fCPJ7kiF5FQ//0smtavPu3HZPbeD9RfPaEbOKlYES4s6d7jvapNFUW8XME/ zHBpqcvpg66QvvdBDvlYpMAJ+KCoWrwQAZd9u2DgN2pUxTe75Ql1jVBbsDqOgKRUbU ovK14WLy531Goe9MV51d/d93V0EO90MSLs+QtIco= From: Jacopo Mondi To: Linux Media Mailing List , Hans Verkuil , Sakari Ailus , Naushir Patuck , David Plowman , Nick Hollinghurst Cc: Jacopo Mondi , Dave Stevenson , Tomi Valkeinen , Laurent Pinchart , Kieran Bingham , Mauro Carvalho Chehab Subject: [PATCH v2 4/5] media: uapi: pisp_be_config: Re-sort pisp_be_tiles_config Date: Fri, 28 Jun 2024 15:29:45 +0200 Message-ID: <20240628132948.871568-5-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> References: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The order of the members of pisp_be_tiles_config is relevant as the driver logic assumes 'config' to be at offset 0. Re-sort the member to match the driver's expectations. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi Acked-by: Naushir Patuck --- include/uapi/linux/media/raspberrypi/pisp_be_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.45.2 diff --git a/include/uapi/linux/media/raspberrypi/pisp_be_config.h b/include/uapi/linux/media/raspberrypi/pisp_be_config.h index 27d0cc417d6b..f8650ca92bf8 100644 --- a/include/uapi/linux/media/raspberrypi/pisp_be_config.h +++ b/include/uapi/linux/media/raspberrypi/pisp_be_config.h @@ -919,9 +919,9 @@ struct pisp_tile { * @config: PiSP Back End configuration */ struct pisp_be_tiles_config { + struct pisp_be_config config; struct pisp_tile tiles[PISP_BACK_END_NUM_TILES]; __u32 num_tiles; - struct pisp_be_config config; } __attribute__((packed)); #endif /* _UAPI_PISP_BE_CONFIG_H_ */ From patchwork Fri Jun 28 13:29:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13716152 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 AE0341DA23 for ; Fri, 28 Jun 2024 13:30:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581419; cv=none; b=Vp80BPeOpgfY1JsqsSZEtnEtljSKHiCiHtnerBowC/ACgn2R9jB4RKhsEBu+aG0LBpuLij/ZK6+6fh/5ubETwRAZc3+Pb1WV2gi0qgIqxLJOiHp1S57SQw9erzFfO/wttwYWi5I0QSTKP2WefTRtykkKq9j9eZGrvUu0kw2JdG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719581419; c=relaxed/simple; bh=9voITgKdqlQuD9LkGFbPAUVl+3U+UCEC+OrKHEAi1ko=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NmD0LzHUPMtDfjAiaf3wJoKhr0nbuW61mhyLelp65p3mtQgG1AkANAgYtgEsplrvO+6QKYMP3ikENpNFngUcLImWx7aTXH5he2PFcFvLtW/UaqCkbVRsWVOwadt4+AV1ROmFT6q/4CD2sEfAxqxpSrK352FhLlEzXj/FnVXuDSY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=RPHLfvym; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RPHLfvym" Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7EDCA1BB3; Fri, 28 Jun 2024 15:29:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719581382; bh=9voITgKdqlQuD9LkGFbPAUVl+3U+UCEC+OrKHEAi1ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RPHLfvymjQTEU//su1C5E8K26RMKTvkMuf5D+/rp+qJ/rbMwz7L8GLeKElMs9Rk38 aSimK1uolsqgSEH5Ls2hiEetCP/pQaemdM/z1StBOhFb8hsnhjFEVDsqvZwBIM8NY5 FnlFWJxgOdxyVDNdvmKNBSOjLEaUQWnJEzLHS/IQ= From: Jacopo Mondi To: Linux Media Mailing List , Hans Verkuil , Sakari Ailus , Naushir Patuck , David Plowman , Nick Hollinghurst Cc: Jacopo Mondi , Dave Stevenson , Tomi Valkeinen , Laurent Pinchart , Kieran Bingham , Mauro Carvalho Chehab Subject: [PATCH v2 5/5] media: uapi: pisp_be_config: Add extra config fields Date: Fri, 28 Jun 2024 15:29:46 +0200 Message-ID: <20240628132948.871568-6-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> References: <20240628132948.871568-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Complete the pisp_be_config strcture by adding fields that even if not written to the HW are relevant to complete the uAPI and put it in par with the BSP driver. Fixes: c6c49bac8770 ("media: uapi: Add Raspberry Pi PiSP Back End uAPI") Signed-off-by: Jacopo Mondi --- .../linux/media/raspberrypi/pisp_be_config.h | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/include/uapi/linux/media/raspberrypi/pisp_be_config.h b/include/uapi/linux/media/raspberrypi/pisp_be_config.h index f8650ca92bf8..cbeb714f4d61 100644 --- a/include/uapi/linux/media/raspberrypi/pisp_be_config.h +++ b/include/uapi/linux/media/raspberrypi/pisp_be_config.h @@ -716,6 +716,13 @@ struct pisp_be_hog_buffer_config { /** * struct pisp_be_config - RaspberryPi PiSP Back End Processing configuration * + * @input_buffer: Input buffer addresses + * @tdn_input_buffer: TDN input buffer addresses + * @stitch_input_buffer: Stitch input buffer addresses + * @tdn_output_buffer: TDN output buffer addresses + * @stitch_output_buffer: Stitch output buffer addresses + * @output_buffer: Output buffers addresses + * @hog_buffer: HOG buffer addresses * @global: Global PiSP configuration * @input_format: Input image format * @decompress: Decompress configuration @@ -753,8 +760,30 @@ struct pisp_be_hog_buffer_config { * @resample: Resampling configuration * @output_format: Output format configuration * @hog: HOG configuration + * @axi: AXI bus configuration + * @lsc_extra: LSC extra info + * @cac_extra: CAC extra info + * @downscale_extra: Downscaler extra info + * @resample_extra: Resample extra info + * @crop: Crop configuration + * @hog_format: HOG format info + * @dirty_flags_bayer: Bayer enable dirty flags + * (:c:type:`pisp_be_bayer_enable`) + * @dirty_flags_rgb: RGB enable dirty flags + * (:c:type:`pisp_be_rgb_enable`) + * @dirty_flags_extra: Extra dirty flags */ struct pisp_be_config { + /* I/O configuration: */ + struct pisp_be_input_buffer_config input_buffer; + struct pisp_be_tdn_input_buffer_config tdn_input_buffer; + struct pisp_be_stitch_input_buffer_config stitch_input_buffer; + struct pisp_be_tdn_output_buffer_config tdn_output_buffer; + struct pisp_be_stitch_output_buffer_config stitch_output_buffer; + struct pisp_be_output_buffer_config + output_buffer[PISP_BACK_END_NUM_OUTPUTS]; + struct pisp_be_hog_buffer_config hog_buffer; + /* Processing configuration: */ struct pisp_be_global_config global; struct pisp_image_format_config input_format; struct pisp_decompress_config decompress; @@ -793,6 +822,18 @@ struct pisp_be_config { struct pisp_be_output_format_config output_format[PISP_BACK_END_NUM_OUTPUTS]; struct pisp_be_hog_config hog; + struct pisp_be_axi_config axi; + /* Non-register fields: */ + struct pisp_be_lsc_extra lsc_extra; + struct pisp_be_cac_extra cac_extra; + struct pisp_be_downscale_extra + downscale_extra[PISP_BACK_END_NUM_OUTPUTS]; + struct pisp_be_resample_extra resample_extra[PISP_BACK_END_NUM_OUTPUTS]; + struct pisp_be_crop_config crop; + struct pisp_image_format_config hog_format; + __u32 dirty_flags_bayer; /* these use pisp_be_bayer_enable */ + __u32 dirty_flags_rgb; /* use pisp_be_rgb_enable */ + __u32 dirty_flags_extra; /* these use pisp_be_dirty_t */ } __attribute__((packed)); /**