Message ID | 20240627143059.300796-3-jacopo.mondi@ideasonboard.com (mailing list archive) |
---|---|
State | Superseded |
Headers |
Received: from sy.mirrors.kernel.org ([147.75.48.161]) by linuxtv.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <linux-media+bounces-14261-patchwork=linuxtv.org@vger.kernel.org>) id 1sMq9s-0001Fd-2G for patchwork@linuxtv.org; Thu, 27 Jun 2024 14:31:34 +0000 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B3249B24818 for <patchwork@linuxtv.org>; Thu, 27 Jun 2024 14:31:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C05FD195FEC; Thu, 27 Jun 2024 14:31:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cgi83A3K" X-Original-To: linux-media@vger.kernel.org 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 168DE1442FE for <linux-media@vger.kernel.org>; Thu, 27 Jun 2024 14:31:21 +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=1719498683; cv=none; b=G5IuRIRBF6f3tIgdnlsLDuvqwzLjjLeVkGZj8iTX9I0eF8wlqN5bE/dMotj7vJiX14YriP8CxXLE7kt6XZGw9vgqZ6NUjqJ3ewD5rwIJTEw3JAg0j9hwiuHGzr0Q5xFc4hviNED4aeMoiLWwMiGTaB9/8zt2m/O3EpO8hv5/T7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719498683; c=relaxed/simple; bh=1dw9a1wZdGIU0VNx1xpi71yvY1zWp0wWFTQ+Fd/CQj0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ItcwcJZTJtEUPwQ05cGsCZp6YqYPSYS+Lk/qLJFVurSwdJtltHlqHFcyPh1Gsrq5DFalE2mOzNitTDMLSscVcRUBOAn90N/FcH6v2kOqEy2rJNxScts9/qATHL5yUrXP+qnWgSJfaeTfiDIOI0irE/NuQptO5tN5OgNpzkgoZKM= 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=cgi83A3K; 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 Received: from localhost.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9FDC2E22; Thu, 27 Jun 2024 16:30:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719498654; bh=1dw9a1wZdGIU0VNx1xpi71yvY1zWp0wWFTQ+Fd/CQj0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cgi83A3K0L014fFsZzXr+XIGLkoxIr5SCfP+8+Ap1QF67bwZMaSYklZTHVbJU/GZM n913aITQzOqKP3s5817QNbIedLm5uaj3jHZT9hvS88bMjILFhVPPffbRRetehHFO8H l9OiituKWcJ/BqOsvMbKqjzjxttPCAa1TnlRZXIg= From: Jacopo Mondi <jacopo.mondi@ideasonboard.com> To: Linux Media Mailing List <linux-media@vger.kernel.org>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Sakari Ailus <sakari.ailus@iki.fi>, Naushir Patuck <naush@raspberrypi.com>, David Plowman <david.plowman@raspberrypi.com>, Nick Hollinghurst <nick.hollinghurst@raspberrypi.org> Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Dave Stevenson <dave.stevenson@raspberrypi.com>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org> Subject: [PATCH 2/2] media: uapi: pisp_common: Add 32 bpp format test Date: Thu, 27 Jun 2024 16:30:57 +0200 Message-ID: <20240627143059.300796-3-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240627143059.300796-1-jacopo.mondi@ideasonboard.com> References: <20240627143059.300796-1-jacopo.mondi@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: <linux-media.vger.kernel.org> List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=ARC_SIGNED=0.001,ARC_VALID=-0.1,BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DMARC_MISSING=0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,SPF_HELO_NONE=0.001,SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no |
Series |
media: uapi: pisp_be: Two late fixes
|
|
Commit Message
Jacopo Mondi
June 27, 2024, 2:30 p.m. UTC
Add definition and test for 32-bits image formats to the pisp_common.h
uAPI header.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
RPi: I found not traces of this in your BSP pisp_types.h header but
these identifiers are used by libpisp and are part of the pisp_types.h
header shipped with the library.
https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/backend/backend_prepare.cpp#L374
https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/common/pisp_types.h#L137
in mainline, pisp_types.h has been absorbed by pisp_common.h so I'm
adding it here (only PISP_IMAGE_FORMAT_bpp_32, as it's the only one used
by libpisp).
Could you ack/nack this patch please ?
---
---
include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++
1 file changed, 3 insertions(+)
--
2.45.2
Comments
Hi Jacopo Yes, that looks right. The 32bpp format was a slightly later addition, and so might have slipped through the net previously. On Thu, 27 Jun 2024 at 15:31, Jacopo Mondi <jacopo.mondi@ideasonboard.com> wrote: > > Add definition and test for 32-bits image formats to the pisp_common.h > uAPI header. > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Acked-by: David Plowman <david.plowman@raspberrypi.com> Thanks! David > > --- > RPi: I found not traces of this in your BSP pisp_types.h header but > these identifiers are used by libpisp and are part of the pisp_types.h > header shipped with the library. > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/backend/backend_prepare.cpp#L374 > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/common/pisp_types.h#L137 > > in mainline, pisp_types.h has been absorbed by pisp_common.h so I'm > adding it here (only PISP_IMAGE_FORMAT_bpp_32, as it's the only one used > by libpisp). > > Could you ack/nack this patch please ? > --- > --- > include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h > index b2522e29c976..031fdaa4da69 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)) > -- > 2.45.2 >
Hi Jacopo, On Thu, Jun 27, 2024 at 04:30:57PM +0200, Jacopo Mondi wrote: > Add definition and test for 32-bits image formats to the pisp_common.h > uAPI header. > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > --- > RPi: I found not traces of this in your BSP pisp_types.h header but > these identifiers are used by libpisp and are part of the pisp_types.h > header shipped with the library. > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/backend/backend_prepare.cpp#L374 > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/common/pisp_types.h#L137 > > in mainline, pisp_types.h has been absorbed by pisp_common.h so I'm > adding it here (only PISP_IMAGE_FORMAT_bpp_32, as it's the only one used > by libpisp). > > Could you ack/nack this patch please ? > --- > --- > include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h > index b2522e29c976..031fdaa4da69 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) Why lower case "bpp"? As this isn't a definition of a value as such, I'd call it differently, e.g. PISP_IMAGE_FORMAT_BPP_IS_32. > #define PISP_IMAGE_FORMAT_HOG(fmt) \ > ((fmt) & \ > (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED))
Hi Sakari On Thu, Jun 27, 2024 at 04:59:35PM GMT, Sakari Ailus wrote: > Hi Jacopo, > > On Thu, Jun 27, 2024 at 04:30:57PM +0200, Jacopo Mondi wrote: > > Add definition and test for 32-bits image formats to the pisp_common.h > > uAPI header. > > > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > > > --- > > RPi: I found not traces of this in your BSP pisp_types.h header but > > these identifiers are used by libpisp and are part of the pisp_types.h > > header shipped with the library. > > > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/backend/backend_prepare.cpp#L374 > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/common/pisp_types.h#L137 > > > > in mainline, pisp_types.h has been absorbed by pisp_common.h so I'm > > adding it here (only PISP_IMAGE_FORMAT_bpp_32, as it's the only one used > > by libpisp). > > > > Could you ack/nack this patch please ? > > --- > > --- > > include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h > > index b2522e29c976..031fdaa4da69 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) > > Why lower case "bpp"? No idea, I don't like it but the existing PISP_IMAGE_FORMAT_bps_8 PISP_IMAGE_FORMAT_bps_10 PISP_IMAGE_FORMAT_bps_12 PISP_IMAGE_FORMAT_bps_16 PISP_IMAGE_FORMAT_three_channel PISP_IMAGE_FORMAT_single_channel etc etc are all lowecase. Also it is not clear to me why this is _bpp_ the other _bps_. If I had to upstream this code from scratch I would use uppercase. > > As this isn't a definition of a value as such, I'd call it differently, > e.g. PISP_IMAGE_FORMAT_BPP_IS_32. > > > #define PISP_IMAGE_FORMAT_HOG(fmt) \ > > ((fmt) & \ > > (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED)) > > -- > Regards, > > Sakari Ailus
Hi again On Fri, Jun 28, 2024 at 09:09:10AM GMT, Jacopo Mondi wrote: > Hi Sakari > > On Thu, Jun 27, 2024 at 04:59:35PM GMT, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Thu, Jun 27, 2024 at 04:30:57PM +0200, Jacopo Mondi wrote: > > > Add definition and test for 32-bits image formats to the pisp_common.h > > > uAPI header. > > > > > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > > > > > --- > > > RPi: I found not traces of this in your BSP pisp_types.h header but > > > these identifiers are used by libpisp and are part of the pisp_types.h > > > header shipped with the library. > > > > > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/backend/backend_prepare.cpp#L374 > > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/common/pisp_types.h#L137 > > > > > > in mainline, pisp_types.h has been absorbed by pisp_common.h so I'm > > > adding it here (only PISP_IMAGE_FORMAT_bpp_32, as it's the only one used > > > by libpisp). > > > > > > Could you ack/nack this patch please ? > > > --- > > > --- > > > include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h > > > index b2522e29c976..031fdaa4da69 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) > > > > Why lower case "bpp"? > > No idea, I don't like it but the existing > > PISP_IMAGE_FORMAT_bps_8 > PISP_IMAGE_FORMAT_bps_10 > PISP_IMAGE_FORMAT_bps_12 > PISP_IMAGE_FORMAT_bps_16 > PISP_IMAGE_FORMAT_three_channel > PISP_IMAGE_FORMAT_single_channel > > etc etc > > are all lowecase. > > Also it is not clear to me why this is _bpp_ the other _bps_. Ah, https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf at page 10 provides a description. The _bps_ identify the bits-per-sample while the _bpp_32 describe RGB formats where a single pixel is packed in 32 bits. As the datasheet uses _bps_ and _bpp_ I would keep using them here. Also, I can use uppercase for all macros here if preferred (I'll send a patch for libpisp in case) > > If I had to upstream this code from scratch I would use uppercase. > > > > > As this isn't a definition of a value as such, I'd call it differently, > > e.g. PISP_IMAGE_FORMAT_BPP_IS_32. > > > > > #define PISP_IMAGE_FORMAT_HOG(fmt) \ > > > ((fmt) & \ > > > (PISP_IMAGE_FORMAT_HOG_SIGNED | PISP_IMAGE_FORMAT_HOG_UNSIGNED)) > > > > -- > > Regards, > > > > Sakari Ailus
On Fri, Jun 28, 2024 at 09:09:10AM +0200, Jacopo Mondi wrote: > Hi Sakari > > On Thu, Jun 27, 2024 at 04:59:35PM GMT, Sakari Ailus wrote: > > Hi Jacopo, > > > > On Thu, Jun 27, 2024 at 04:30:57PM +0200, Jacopo Mondi wrote: > > > Add definition and test for 32-bits image formats to the pisp_common.h > > > uAPI header. > > > > > > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > > > > > > --- > > > RPi: I found not traces of this in your BSP pisp_types.h header but > > > these identifiers are used by libpisp and are part of the pisp_types.h > > > header shipped with the library. > > > > > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/backend/backend_prepare.cpp#L374 > > > https://github.com/raspberrypi/libpisp/blob/main/src/libpisp/common/pisp_types.h#L137 > > > > > > in mainline, pisp_types.h has been absorbed by pisp_common.h so I'm > > > adding it here (only PISP_IMAGE_FORMAT_bpp_32, as it's the only one used > > > by libpisp). > > > > > > Could you ack/nack this patch please ? > > > --- > > > --- > > > include/uapi/linux/media/raspberrypi/pisp_common.h | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h > > > index b2522e29c976..031fdaa4da69 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) > > > > Why lower case "bpp"? > > No idea, I don't like it but the existing > > PISP_IMAGE_FORMAT_bps_8 > PISP_IMAGE_FORMAT_bps_10 > PISP_IMAGE_FORMAT_bps_12 > PISP_IMAGE_FORMAT_bps_16 > PISP_IMAGE_FORMAT_three_channel > PISP_IMAGE_FORMAT_single_channel > > etc etc > > are all lowecase. > > Also it is not clear to me why this is _bpp_ the other _bps_. > > If I had to upstream this code from scratch I would use uppercase. Ack, fine for me then. It's a driver specific header anyway and the all-important somehow reasonable prefix is there so ok.
diff --git a/include/uapi/linux/media/raspberrypi/pisp_common.h b/include/uapi/linux/media/raspberrypi/pisp_common.h index b2522e29c976..031fdaa4da69 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))