[{"id":39438,"web_url":"https://patchwork.libcamera.org/comment/39438/","msgid":"<20260626105016.GD2258794@killaraus.ideasonboard.com>","date":"2026-06-26T10:50:16","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jun 26, 2026 at 11:20:40AM +0100, Kieran Bingham wrote:\n> This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n> updates from Linux 7.1 including an ARM 64k interleaved modifier,\n> panel-type properties, and some interesting ARGB accessor macros.\n\nAs those are of no use for libcamera I wouldn't have listed the detailed\nchanges here.\n\n> libcamera specific local changes are preserved.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/linux/README       |  2 +-\n>  include/linux/drm_fourcc.h | 16 ++++++++\n>  include/linux/drm_mode.h   | 84 ++++++++++++++++++++++++++++++++++++++\n>  3 files changed, 101 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/linux/README b/include/linux/README\n> index b02952bb28ca..9303e0f14ae6 100644\n> --- a/include/linux/README\n> +++ b/include/linux/README\n> @@ -1,4 +1,4 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n> -Files in this directory are imported from v7.0 of the Linux kernel. Do not\n> +Files in this directory are imported from v7.1 of the Linux kernel. Do not\n>  modify them manually.\n> diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> index e8a3d949032b..8e2a6abae62f 100644\n> --- a/include/linux/drm_fourcc.h\n> +++ b/include/linux/drm_fourcc.h\n> @@ -1480,6 +1480,22 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n>  #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \\\n>  \tDRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)\n>  \n> +/*\n> + * ARM 64k interleaved modifier\n> + *\n> + * This is used by ARM Mali v10+ GPUs. With this modifier, the plane is divided\n> + * into 64k byte 1:1 or 2:1 -sided tiles. The 64k tiles are laid out linearly.\n> + * Each 64k tile is divided into blocks of 16x16 texel blocks, which are\n> + * themselves laid out linearly within a 64k tile. Then within each 16x16\n> + * block, texel blocks are laid out according to U order, similar to\n> + * 16X16_BLOCK_U_INTERLEAVED.\n> + *\n> + * Note that unlike 16X16_BLOCK_U_INTERLEAVED, the layout does not change\n> + * depending on whether a format is compressed or not.\n> + */\n> +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \\\n> +\tDRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL)\n> +\n>  /*\n>   * Allwinner tiled modifier\n>   *\n> diff --git a/include/linux/drm_mode.h b/include/linux/drm_mode.h\n> index 8894b7a80732..381a3e857d4e 100644\n> --- a/include/linux/drm_mode.h\n> +++ b/include/linux/drm_mode.h\n> @@ -10,6 +10,9 @@\n>  #ifndef _DRM_MODE_H\n>  #define _DRM_MODE_H\n>  \n> +#include <linux/bits.h>\n> +#include <linux/const.h>\n> +\n>  #include \"drm.h\"\n>  \n>  #if defined(__cplusplus)\n> @@ -149,6 +152,10 @@ extern \"C\" {\n>  #define DRM_MODE_LINK_STATUS_GOOD\t0\n>  #define DRM_MODE_LINK_STATUS_BAD\t1\n>  \n> +/* Panel type property */\n> +#define DRM_MODE_PANEL_TYPE_UNKNOWN\t0\n> +#define DRM_MODE_PANEL_TYPE_OLED\t1\n> +\n>  /*\n>   * DRM_MODE_ROTATE_<degrees>\n>   *\n> @@ -1528,6 +1535,83 @@ struct drm_mode_closefb {\n>  \t__u32 pad;\n>  };\n>  \n> +/*\n> + * Put 16-bit ARGB values into a standard 64-bit representation that can be\n> + * used for ioctl parameters, inter-driver communication, etc.\n> + *\n> + * If the component values being provided contain less than 16 bits of\n> + * precision, use a conversion ratio to get a better color approximation.\n> + * The ratio is computed as (2^16 - 1) / (2^bpc - 1), where bpc and 16 are\n> + * the input and output precision, respectively.\n> + * Also note bpc must be greater than 0.\n> + */\n> +#define __DRM_ARGB64_PREP(c, shift)\t\t\t\t\t\\\n> +\t(((__u64)(c) & __GENMASK(15, 0)) << (shift))\n> +\n> +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)\t\t\t\t\\\n> +({\t\t\t\t\t\t\t\t\t\\\n> +\t__u16 mask = __GENMASK((bpc) - 1, 0);\t\t\t\t\\\n> +\t__u16 conv = __KERNEL_DIV_ROUND_CLOSEST((mask & (c)) *\t\t\\\n> +\t\t\t\t\t\t__GENMASK(15, 0), mask);\\\n> +\t__DRM_ARGB64_PREP(conv, shift);\t\t\t\t\t\\\n> +})\n> +\n> +#define DRM_ARGB64_PREP(alpha, red, green, blue)\t\t\t\\\n> +(\t\t\t\t\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(alpha, 48) |\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(red,   32) |\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(green, 16) |\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(blue,   0)\t\t\t\t\t\\\n> +)\n> +\n> +#define DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc)\t\t\\\n> +({\t\t\t\t\t\t\t\t\t\\\n> +\t__typeof__(bpc) __bpc = bpc;\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(alpha, 48, __bpc) |\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(red,   32, __bpc) |\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(green, 16, __bpc) |\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(blue,   0, __bpc);\t\t\t\\\n> +})\n> +\n> +/*\n> + * Extract the specified color component from a standard 64-bit ARGB value.\n> + *\n> + * If the requested precision is less than 16 bits, make use of a conversion\n> + * ratio calculated as (2^bpc - 1) / (2^16 - 1), where bpc and 16 are the\n> + * output and input precision, respectively.\n> + *\n> + * If speed is more important than accuracy, use DRM_ARGB64_GET*_BPCS()\n> + * instead of DRM_ARGB64_GET*_BPC() in order to replace the expensive\n> + * division with a simple bit right-shift operation.\n> + */\n> +#define __DRM_ARGB64_GET(c, shift)\t\t\t\t\t\\\n> +\t((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0)))\n> +\n> +#define __DRM_ARGB64_GET_BPC(c, shift, bpc)\t\t\t\t\\\n> +({\t\t\t\t\t\t\t\t\t\\\n> +\t__u16 comp = __DRM_ARGB64_GET(c, shift);\t\t\t\\\n> +\t__KERNEL_DIV_ROUND_CLOSEST(comp * __GENMASK((bpc) - 1, 0),\t\\\n> +\t\t\t\t   __GENMASK(15, 0));\t\t\t\\\n> +})\n> +\n> +#define __DRM_ARGB64_GET_BPCS(c, shift, bpc)\t\t\t\t\\\n> +\t(__DRM_ARGB64_GET(c, shift) >> (16 - (bpc)))\n> +\n> +#define DRM_ARGB64_GETA(c)\t\t__DRM_ARGB64_GET(c, 48)\n> +#define DRM_ARGB64_GETR(c)\t\t__DRM_ARGB64_GET(c, 32)\n> +#define DRM_ARGB64_GETG(c)\t\t__DRM_ARGB64_GET(c, 16)\n> +#define DRM_ARGB64_GETB(c)\t\t__DRM_ARGB64_GET(c, 0)\n> +\n> +#define DRM_ARGB64_GETA_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 48, bpc)\n> +#define DRM_ARGB64_GETR_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 32, bpc)\n> +#define DRM_ARGB64_GETG_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 16, bpc)\n> +#define DRM_ARGB64_GETB_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 0, bpc)\n> +\n> +#define DRM_ARGB64_GETA_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 48, bpc)\n> +#define DRM_ARGB64_GETR_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 32, bpc)\n> +#define DRM_ARGB64_GETG_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 16, bpc)\n> +#define DRM_ARGB64_GETB_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 0, bpc)\n> +\n>  #if defined(__cplusplus)\n>  }\n>  #endif","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 49B1ABF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 10:50:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 93543658ED;\n\tFri, 26 Jun 2026 12:50:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 38C6E65878\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 12:50:18 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 28F8F174;\n\tFri, 26 Jun 2026 12:49:37 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IIp+oK5k\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782470977;\n\tbh=e10RbEnQ4GBW4eEMN7ERZyd0wACgx5i19TFygLTmyVI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IIp+oK5kRcUJzsLIiQ5cb3NqWp4syPXL9C5Dd90VojD0LGXfEmsmyWMuuU6TlVa8K\n\t6+paTr6Kl8FNr7ZxJwAiFAr2e1dJQTSLGwEPiv9rR3o//oLKnk1Cts612czocjwDaP\n\tgBN4d8UlHtu14Q3KOd17rzsWTvx4RzZ4VW2mYu0s=","Date":"Fri, 26 Jun 2026 13:50:16 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","Message-ID":"<20260626105016.GD2258794@killaraus.ideasonboard.com>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39439,"web_url":"https://patchwork.libcamera.org/comment/39439/","msgid":"<06ce8750-83e8-4752-a5a6-eb36b39b99cb@ideasonboard.com>","date":"2026-06-26T10:51:14","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 06. 26. 12:20 keltezéssel, Kieran Bingham írta:\n> This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n\nDoes this mean other files have changed that are not updated?\n\n\n> updates from Linux 7.1 including an ARM 64k interleaved modifier,\n> panel-type properties, and some interesting ARGB accessor macros.\n> \n> libcamera specific local changes are preserved.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>   include/linux/README       |  2 +-\n>   include/linux/drm_fourcc.h | 16 ++++++++\n>   include/linux/drm_mode.h   | 84 ++++++++++++++++++++++++++++++++++++++\n>   3 files changed, 101 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/linux/README b/include/linux/README\n> index b02952bb28ca..9303e0f14ae6 100644\n> --- a/include/linux/README\n> +++ b/include/linux/README\n> @@ -1,4 +1,4 @@\n>   # SPDX-License-Identifier: CC0-1.0\n>   \n> -Files in this directory are imported from v7.0 of the Linux kernel. Do not\n> +Files in this directory are imported from v7.1 of the Linux kernel. Do not\n>   modify them manually.\n> diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> index e8a3d949032b..8e2a6abae62f 100644\n> --- a/include/linux/drm_fourcc.h\n> +++ b/include/linux/drm_fourcc.h\n> @@ -1480,6 +1480,22 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n>   #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \\\n>   \tDRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)\n>   \n> +/*\n> + * ARM 64k interleaved modifier\n> + *\n> + * This is used by ARM Mali v10+ GPUs. With this modifier, the plane is divided\n> + * into 64k byte 1:1 or 2:1 -sided tiles. The 64k tiles are laid out linearly.\n> + * Each 64k tile is divided into blocks of 16x16 texel blocks, which are\n> + * themselves laid out linearly within a 64k tile. Then within each 16x16\n> + * block, texel blocks are laid out according to U order, similar to\n> + * 16X16_BLOCK_U_INTERLEAVED.\n> + *\n> + * Note that unlike 16X16_BLOCK_U_INTERLEAVED, the layout does not change\n> + * depending on whether a format is compressed or not.\n> + */\n> +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \\\n> +\tDRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL)\n> +\n>   /*\n>    * Allwinner tiled modifier\n>    *\n> diff --git a/include/linux/drm_mode.h b/include/linux/drm_mode.h\n> index 8894b7a80732..381a3e857d4e 100644\n> --- a/include/linux/drm_mode.h\n> +++ b/include/linux/drm_mode.h\n> @@ -10,6 +10,9 @@\n>   #ifndef _DRM_MODE_H\n>   #define _DRM_MODE_H\n>   \n> +#include <linux/bits.h>\n> +#include <linux/const.h>\n> +\n>   #include \"drm.h\"\n>   \n>   #if defined(__cplusplus)\n> @@ -149,6 +152,10 @@ extern \"C\" {\n>   #define DRM_MODE_LINK_STATUS_GOOD\t0\n>   #define DRM_MODE_LINK_STATUS_BAD\t1\n>   \n> +/* Panel type property */\n> +#define DRM_MODE_PANEL_TYPE_UNKNOWN\t0\n> +#define DRM_MODE_PANEL_TYPE_OLED\t1\n> +\n>   /*\n>    * DRM_MODE_ROTATE_<degrees>\n>    *\n> @@ -1528,6 +1535,83 @@ struct drm_mode_closefb {\n>   \t__u32 pad;\n>   };\n>   \n> +/*\n> + * Put 16-bit ARGB values into a standard 64-bit representation that can be\n> + * used for ioctl parameters, inter-driver communication, etc.\n> + *\n> + * If the component values being provided contain less than 16 bits of\n> + * precision, use a conversion ratio to get a better color approximation.\n> + * The ratio is computed as (2^16 - 1) / (2^bpc - 1), where bpc and 16 are\n> + * the input and output precision, respectively.\n> + * Also note bpc must be greater than 0.\n> + */\n> +#define __DRM_ARGB64_PREP(c, shift)\t\t\t\t\t\\\n> +\t(((__u64)(c) & __GENMASK(15, 0)) << (shift))\n> +\n> +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)\t\t\t\t\\\n> +({\t\t\t\t\t\t\t\t\t\\\n> +\t__u16 mask = __GENMASK((bpc) - 1, 0);\t\t\t\t\\\n> +\t__u16 conv = __KERNEL_DIV_ROUND_CLOSEST((mask & (c)) *\t\t\\\n> +\t\t\t\t\t\t__GENMASK(15, 0), mask);\\\n> +\t__DRM_ARGB64_PREP(conv, shift);\t\t\t\t\t\\\n> +})\n> +\n> +#define DRM_ARGB64_PREP(alpha, red, green, blue)\t\t\t\\\n> +(\t\t\t\t\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(alpha, 48) |\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(red,   32) |\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(green, 16) |\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP(blue,   0)\t\t\t\t\t\\\n> +)\n> +\n> +#define DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc)\t\t\\\n> +({\t\t\t\t\t\t\t\t\t\\\n> +\t__typeof__(bpc) __bpc = bpc;\t\t\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(alpha, 48, __bpc) |\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(red,   32, __bpc) |\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(green, 16, __bpc) |\t\t\t\\\n> +\t__DRM_ARGB64_PREP_BPC(blue,   0, __bpc);\t\t\t\\\n> +})\n> +\n> +/*\n> + * Extract the specified color component from a standard 64-bit ARGB value.\n> + *\n> + * If the requested precision is less than 16 bits, make use of a conversion\n> + * ratio calculated as (2^bpc - 1) / (2^16 - 1), where bpc and 16 are the\n> + * output and input precision, respectively.\n> + *\n> + * If speed is more important than accuracy, use DRM_ARGB64_GET*_BPCS()\n> + * instead of DRM_ARGB64_GET*_BPC() in order to replace the expensive\n> + * division with a simple bit right-shift operation.\n> + */\n> +#define __DRM_ARGB64_GET(c, shift)\t\t\t\t\t\\\n> +\t((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0)))\n> +\n> +#define __DRM_ARGB64_GET_BPC(c, shift, bpc)\t\t\t\t\\\n> +({\t\t\t\t\t\t\t\t\t\\\n> +\t__u16 comp = __DRM_ARGB64_GET(c, shift);\t\t\t\\\n> +\t__KERNEL_DIV_ROUND_CLOSEST(comp * __GENMASK((bpc) - 1, 0),\t\\\n> +\t\t\t\t   __GENMASK(15, 0));\t\t\t\\\n> +})\n> +\n> +#define __DRM_ARGB64_GET_BPCS(c, shift, bpc)\t\t\t\t\\\n> +\t(__DRM_ARGB64_GET(c, shift) >> (16 - (bpc)))\n> +\n> +#define DRM_ARGB64_GETA(c)\t\t__DRM_ARGB64_GET(c, 48)\n> +#define DRM_ARGB64_GETR(c)\t\t__DRM_ARGB64_GET(c, 32)\n> +#define DRM_ARGB64_GETG(c)\t\t__DRM_ARGB64_GET(c, 16)\n> +#define DRM_ARGB64_GETB(c)\t\t__DRM_ARGB64_GET(c, 0)\n> +\n> +#define DRM_ARGB64_GETA_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 48, bpc)\n> +#define DRM_ARGB64_GETR_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 32, bpc)\n> +#define DRM_ARGB64_GETG_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 16, bpc)\n> +#define DRM_ARGB64_GETB_BPC(c, bpc)\t__DRM_ARGB64_GET_BPC(c, 0, bpc)\n> +\n> +#define DRM_ARGB64_GETA_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 48, bpc)\n> +#define DRM_ARGB64_GETR_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 32, bpc)\n> +#define DRM_ARGB64_GETG_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 16, bpc)\n> +#define DRM_ARGB64_GETB_BPCS(c, bpc)\t__DRM_ARGB64_GET_BPCS(c, 0, bpc)\n> +\n>   #if defined(__cplusplus)\n>   }\n>   #endif","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9EE89BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 10:51:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FAB8658E9;\n\tFri, 26 Jun 2026 12:51:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B4483658E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 12:51:17 +0200 (CEST)","from [192.168.33.48] (185.221.143.75.nat.pool.zt.hu\n\t[185.221.143.75])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EFC20174;\n\tFri, 26 Jun 2026 12:50:36 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ooiGtrKv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782471037;\n\tbh=UpCgOgZBJ0TiHVBh4s7uOaJbRP+dUjE+QQ8Z/jZD09c=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=ooiGtrKvh5iIN5Cli4p+M6cku13GJS+bFKISo7u+9+rYylr1pQYwGv2G5B6UrBlu/\n\tNC/8dG0FWNo6r4xMOymj4Pq+h+mkGC9VOoWiS+JWPD8S6wDRIbPF4hzmHejXPNmnu9\n\tAw4vsx5+a6ffLdlRL8iGj83FlF8+OwBOOlmQFhmw=","Message-ID":"<06ce8750-83e8-4752-a5a6-eb36b39b99cb@ideasonboard.com>","Date":"Fri, 26 Jun 2026 12:51:14 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39442,"web_url":"https://patchwork.libcamera.org/comment/39442/","msgid":"<178247147274.36676.10784738333926755337@ping.linuxembedded.co.uk>","date":"2026-06-26T10:57:52","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Barnabás Pőcze (2026-06-26 11:51:14)\n> 2026. 06. 26. 12:20 keltezéssel, Kieran Bingham írta:\n> > This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n> \n> Does this mean other files have changed that are not updated?\n\nThe other differences were only removing (undoing) changes we've made\nlocally.\n\n--\nKieran\n\n\n\n> \n> \n> > updates from Linux 7.1 including an ARM 64k interleaved modifier,\n> > panel-type properties, and some interesting ARGB accessor macros.\n> > \n> > libcamera specific local changes are preserved.\n> > \n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >   include/linux/README       |  2 +-\n> >   include/linux/drm_fourcc.h | 16 ++++++++\n> >   include/linux/drm_mode.h   | 84 ++++++++++++++++++++++++++++++++++++++\n> >   3 files changed, 101 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/include/linux/README b/include/linux/README\n> > index b02952bb28ca..9303e0f14ae6 100644\n> > --- a/include/linux/README\n> > +++ b/include/linux/README\n> > @@ -1,4 +1,4 @@\n> >   # SPDX-License-Identifier: CC0-1.0\n> >   \n> > -Files in this directory are imported from v7.0 of the Linux kernel. Do not\n> > +Files in this directory are imported from v7.1 of the Linux kernel. Do not\n> >   modify them manually.\n> > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > index e8a3d949032b..8e2a6abae62f 100644\n> > --- a/include/linux/drm_fourcc.h\n> > +++ b/include/linux/drm_fourcc.h\n> > @@ -1480,6 +1480,22 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> >   #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \\\n> >       DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)\n> >   \n> > +/*\n> > + * ARM 64k interleaved modifier\n> > + *\n> > + * This is used by ARM Mali v10+ GPUs. With this modifier, the plane is divided\n> > + * into 64k byte 1:1 or 2:1 -sided tiles. The 64k tiles are laid out linearly.\n> > + * Each 64k tile is divided into blocks of 16x16 texel blocks, which are\n> > + * themselves laid out linearly within a 64k tile. Then within each 16x16\n> > + * block, texel blocks are laid out according to U order, similar to\n> > + * 16X16_BLOCK_U_INTERLEAVED.\n> > + *\n> > + * Note that unlike 16X16_BLOCK_U_INTERLEAVED, the layout does not change\n> > + * depending on whether a format is compressed or not.\n> > + */\n> > +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \\\n> > +     DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL)\n> > +\n> >   /*\n> >    * Allwinner tiled modifier\n> >    *\n> > diff --git a/include/linux/drm_mode.h b/include/linux/drm_mode.h\n> > index 8894b7a80732..381a3e857d4e 100644\n> > --- a/include/linux/drm_mode.h\n> > +++ b/include/linux/drm_mode.h\n> > @@ -10,6 +10,9 @@\n> >   #ifndef _DRM_MODE_H\n> >   #define _DRM_MODE_H\n> >   \n> > +#include <linux/bits.h>\n> > +#include <linux/const.h>\n> > +\n> >   #include \"drm.h\"\n> >   \n> >   #if defined(__cplusplus)\n> > @@ -149,6 +152,10 @@ extern \"C\" {\n> >   #define DRM_MODE_LINK_STATUS_GOOD   0\n> >   #define DRM_MODE_LINK_STATUS_BAD    1\n> >   \n> > +/* Panel type property */\n> > +#define DRM_MODE_PANEL_TYPE_UNKNOWN  0\n> > +#define DRM_MODE_PANEL_TYPE_OLED     1\n> > +\n> >   /*\n> >    * DRM_MODE_ROTATE_<degrees>\n> >    *\n> > @@ -1528,6 +1535,83 @@ struct drm_mode_closefb {\n> >       __u32 pad;\n> >   };\n> >   \n> > +/*\n> > + * Put 16-bit ARGB values into a standard 64-bit representation that can be\n> > + * used for ioctl parameters, inter-driver communication, etc.\n> > + *\n> > + * If the component values being provided contain less than 16 bits of\n> > + * precision, use a conversion ratio to get a better color approximation.\n> > + * The ratio is computed as (2^16 - 1) / (2^bpc - 1), where bpc and 16 are\n> > + * the input and output precision, respectively.\n> > + * Also note bpc must be greater than 0.\n> > + */\n> > +#define __DRM_ARGB64_PREP(c, shift)                                  \\\n> > +     (((__u64)(c) & __GENMASK(15, 0)) << (shift))\n> > +\n> > +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)                         \\\n> > +({                                                                   \\\n> > +     __u16 mask = __GENMASK((bpc) - 1, 0);                           \\\n> > +     __u16 conv = __KERNEL_DIV_ROUND_CLOSEST((mask & (c)) *          \\\n> > +                                             __GENMASK(15, 0), mask);\\\n> > +     __DRM_ARGB64_PREP(conv, shift);                                 \\\n> > +})\n> > +\n> > +#define DRM_ARGB64_PREP(alpha, red, green, blue)                     \\\n> > +(                                                                    \\\n> > +     __DRM_ARGB64_PREP(alpha, 48) |                                  \\\n> > +     __DRM_ARGB64_PREP(red,   32) |                                  \\\n> > +     __DRM_ARGB64_PREP(green, 16) |                                  \\\n> > +     __DRM_ARGB64_PREP(blue,   0)                                    \\\n> > +)\n> > +\n> > +#define DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc)            \\\n> > +({                                                                   \\\n> > +     __typeof__(bpc) __bpc = bpc;                                    \\\n> > +     __DRM_ARGB64_PREP_BPC(alpha, 48, __bpc) |                       \\\n> > +     __DRM_ARGB64_PREP_BPC(red,   32, __bpc) |                       \\\n> > +     __DRM_ARGB64_PREP_BPC(green, 16, __bpc) |                       \\\n> > +     __DRM_ARGB64_PREP_BPC(blue,   0, __bpc);                        \\\n> > +})\n> > +\n> > +/*\n> > + * Extract the specified color component from a standard 64-bit ARGB value.\n> > + *\n> > + * If the requested precision is less than 16 bits, make use of a conversion\n> > + * ratio calculated as (2^bpc - 1) / (2^16 - 1), where bpc and 16 are the\n> > + * output and input precision, respectively.\n> > + *\n> > + * If speed is more important than accuracy, use DRM_ARGB64_GET*_BPCS()\n> > + * instead of DRM_ARGB64_GET*_BPC() in order to replace the expensive\n> > + * division with a simple bit right-shift operation.\n> > + */\n> > +#define __DRM_ARGB64_GET(c, shift)                                   \\\n> > +     ((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0)))\n> > +\n> > +#define __DRM_ARGB64_GET_BPC(c, shift, bpc)                          \\\n> > +({                                                                   \\\n> > +     __u16 comp = __DRM_ARGB64_GET(c, shift);                        \\\n> > +     __KERNEL_DIV_ROUND_CLOSEST(comp * __GENMASK((bpc) - 1, 0),      \\\n> > +                                __GENMASK(15, 0));                   \\\n> > +})\n> > +\n> > +#define __DRM_ARGB64_GET_BPCS(c, shift, bpc)                         \\\n> > +     (__DRM_ARGB64_GET(c, shift) >> (16 - (bpc)))\n> > +\n> > +#define DRM_ARGB64_GETA(c)           __DRM_ARGB64_GET(c, 48)\n> > +#define DRM_ARGB64_GETR(c)           __DRM_ARGB64_GET(c, 32)\n> > +#define DRM_ARGB64_GETG(c)           __DRM_ARGB64_GET(c, 16)\n> > +#define DRM_ARGB64_GETB(c)           __DRM_ARGB64_GET(c, 0)\n> > +\n> > +#define DRM_ARGB64_GETA_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 48, bpc)\n> > +#define DRM_ARGB64_GETR_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 32, bpc)\n> > +#define DRM_ARGB64_GETG_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 16, bpc)\n> > +#define DRM_ARGB64_GETB_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 0, bpc)\n> > +\n> > +#define DRM_ARGB64_GETA_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 48, bpc)\n> > +#define DRM_ARGB64_GETR_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 32, bpc)\n> > +#define DRM_ARGB64_GETG_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 16, bpc)\n> > +#define DRM_ARGB64_GETB_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 0, bpc)\n> > +\n> >   #if defined(__cplusplus)\n> >   }\n> >   #endif\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 87EB2C3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 10:57:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12E4C658F6;\n\tFri, 26 Jun 2026 12:57:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A62BF658EA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 12:57:54 +0200 (CEST)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DFA54174;\n\tFri, 26 Jun 2026 12:57:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ma2lG6Gu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782471434;\n\tbh=VxLrTYMVGvP4QtqfECKiOJpnLOg5R/8JVPWipf6Oq5U=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=ma2lG6GusTlykeN9ufgLBYFXr2bPbMaomoU5KwaOCi/ICFq+hKDsPiw1uNDAq4yGg\n\tbO98aYfsyfEWxoHSpXK7vPj9YD7u732+3JNgb7wmYIEYd2kJM/PsMkD4DlBr8RRnID\n\tLKSfWYP/VKWM8VGaGeq40xynlqCEqca5uH50Pj/M=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<06ce8750-83e8-4752-a5a6-eb36b39b99cb@ideasonboard.com>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>\n\t<06ce8750-83e8-4752-a5a6-eb36b39b99cb@ideasonboard.com>","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Fri, 26 Jun 2026 11:57:52 +0100","Message-ID":"<178247147274.36676.10784738333926755337@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39443,"web_url":"https://patchwork.libcamera.org/comment/39443/","msgid":"<178247154221.36676.12079406468384372431@ping.linuxembedded.co.uk>","date":"2026-06-26T10:59:02","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2026-06-26 11:50:16)\n> On Fri, Jun 26, 2026 at 11:20:40AM +0100, Kieran Bingham wrote:\n> > This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n> > updates from Linux 7.1 including an ARM 64k interleaved modifier,\n> > panel-type properties, and some interesting ARGB accessor macros.\n> \n> As those are of no use for libcamera I wouldn't have listed the detailed\n> changes here.\n\nWould you be happier with the following ?:\n\n\ninclude: linux: Update to Linux 7.1\n\nRefresh the kernel headers we import to bring in new changes from the\nlatest release, without undoing local libcamera specific modifications.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> \n> > libcamera specific local changes are preserved.\n> > \n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> > ---\n> >  include/linux/README       |  2 +-\n> >  include/linux/drm_fourcc.h | 16 ++++++++\n> >  include/linux/drm_mode.h   | 84 ++++++++++++++++++++++++++++++++++++++\n> >  3 files changed, 101 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/include/linux/README b/include/linux/README\n> > index b02952bb28ca..9303e0f14ae6 100644\n> > --- a/include/linux/README\n> > +++ b/include/linux/README\n> > @@ -1,4 +1,4 @@\n> >  # SPDX-License-Identifier: CC0-1.0\n> >  \n> > -Files in this directory are imported from v7.0 of the Linux kernel. Do not\n> > +Files in this directory are imported from v7.1 of the Linux kernel. Do not\n> >  modify them manually.\n> > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > index e8a3d949032b..8e2a6abae62f 100644\n> > --- a/include/linux/drm_fourcc.h\n> > +++ b/include/linux/drm_fourcc.h\n> > @@ -1480,6 +1480,22 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> >  #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \\\n> >       DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)\n> >  \n> > +/*\n> > + * ARM 64k interleaved modifier\n> > + *\n> > + * This is used by ARM Mali v10+ GPUs. With this modifier, the plane is divided\n> > + * into 64k byte 1:1 or 2:1 -sided tiles. The 64k tiles are laid out linearly.\n> > + * Each 64k tile is divided into blocks of 16x16 texel blocks, which are\n> > + * themselves laid out linearly within a 64k tile. Then within each 16x16\n> > + * block, texel blocks are laid out according to U order, similar to\n> > + * 16X16_BLOCK_U_INTERLEAVED.\n> > + *\n> > + * Note that unlike 16X16_BLOCK_U_INTERLEAVED, the layout does not change\n> > + * depending on whether a format is compressed or not.\n> > + */\n> > +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \\\n> > +     DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL)\n> > +\n> >  /*\n> >   * Allwinner tiled modifier\n> >   *\n> > diff --git a/include/linux/drm_mode.h b/include/linux/drm_mode.h\n> > index 8894b7a80732..381a3e857d4e 100644\n> > --- a/include/linux/drm_mode.h\n> > +++ b/include/linux/drm_mode.h\n> > @@ -10,6 +10,9 @@\n> >  #ifndef _DRM_MODE_H\n> >  #define _DRM_MODE_H\n> >  \n> > +#include <linux/bits.h>\n> > +#include <linux/const.h>\n> > +\n> >  #include \"drm.h\"\n> >  \n> >  #if defined(__cplusplus)\n> > @@ -149,6 +152,10 @@ extern \"C\" {\n> >  #define DRM_MODE_LINK_STATUS_GOOD    0\n> >  #define DRM_MODE_LINK_STATUS_BAD     1\n> >  \n> > +/* Panel type property */\n> > +#define DRM_MODE_PANEL_TYPE_UNKNOWN  0\n> > +#define DRM_MODE_PANEL_TYPE_OLED     1\n> > +\n> >  /*\n> >   * DRM_MODE_ROTATE_<degrees>\n> >   *\n> > @@ -1528,6 +1535,83 @@ struct drm_mode_closefb {\n> >       __u32 pad;\n> >  };\n> >  \n> > +/*\n> > + * Put 16-bit ARGB values into a standard 64-bit representation that can be\n> > + * used for ioctl parameters, inter-driver communication, etc.\n> > + *\n> > + * If the component values being provided contain less than 16 bits of\n> > + * precision, use a conversion ratio to get a better color approximation.\n> > + * The ratio is computed as (2^16 - 1) / (2^bpc - 1), where bpc and 16 are\n> > + * the input and output precision, respectively.\n> > + * Also note bpc must be greater than 0.\n> > + */\n> > +#define __DRM_ARGB64_PREP(c, shift)                                  \\\n> > +     (((__u64)(c) & __GENMASK(15, 0)) << (shift))\n> > +\n> > +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)                         \\\n> > +({                                                                   \\\n> > +     __u16 mask = __GENMASK((bpc) - 1, 0);                           \\\n> > +     __u16 conv = __KERNEL_DIV_ROUND_CLOSEST((mask & (c)) *          \\\n> > +                                             __GENMASK(15, 0), mask);\\\n> > +     __DRM_ARGB64_PREP(conv, shift);                                 \\\n> > +})\n> > +\n> > +#define DRM_ARGB64_PREP(alpha, red, green, blue)                     \\\n> > +(                                                                    \\\n> > +     __DRM_ARGB64_PREP(alpha, 48) |                                  \\\n> > +     __DRM_ARGB64_PREP(red,   32) |                                  \\\n> > +     __DRM_ARGB64_PREP(green, 16) |                                  \\\n> > +     __DRM_ARGB64_PREP(blue,   0)                                    \\\n> > +)\n> > +\n> > +#define DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc)            \\\n> > +({                                                                   \\\n> > +     __typeof__(bpc) __bpc = bpc;                                    \\\n> > +     __DRM_ARGB64_PREP_BPC(alpha, 48, __bpc) |                       \\\n> > +     __DRM_ARGB64_PREP_BPC(red,   32, __bpc) |                       \\\n> > +     __DRM_ARGB64_PREP_BPC(green, 16, __bpc) |                       \\\n> > +     __DRM_ARGB64_PREP_BPC(blue,   0, __bpc);                        \\\n> > +})\n> > +\n> > +/*\n> > + * Extract the specified color component from a standard 64-bit ARGB value.\n> > + *\n> > + * If the requested precision is less than 16 bits, make use of a conversion\n> > + * ratio calculated as (2^bpc - 1) / (2^16 - 1), where bpc and 16 are the\n> > + * output and input precision, respectively.\n> > + *\n> > + * If speed is more important than accuracy, use DRM_ARGB64_GET*_BPCS()\n> > + * instead of DRM_ARGB64_GET*_BPC() in order to replace the expensive\n> > + * division with a simple bit right-shift operation.\n> > + */\n> > +#define __DRM_ARGB64_GET(c, shift)                                   \\\n> > +     ((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0)))\n> > +\n> > +#define __DRM_ARGB64_GET_BPC(c, shift, bpc)                          \\\n> > +({                                                                   \\\n> > +     __u16 comp = __DRM_ARGB64_GET(c, shift);                        \\\n> > +     __KERNEL_DIV_ROUND_CLOSEST(comp * __GENMASK((bpc) - 1, 0),      \\\n> > +                                __GENMASK(15, 0));                   \\\n> > +})\n> > +\n> > +#define __DRM_ARGB64_GET_BPCS(c, shift, bpc)                         \\\n> > +     (__DRM_ARGB64_GET(c, shift) >> (16 - (bpc)))\n> > +\n> > +#define DRM_ARGB64_GETA(c)           __DRM_ARGB64_GET(c, 48)\n> > +#define DRM_ARGB64_GETR(c)           __DRM_ARGB64_GET(c, 32)\n> > +#define DRM_ARGB64_GETG(c)           __DRM_ARGB64_GET(c, 16)\n> > +#define DRM_ARGB64_GETB(c)           __DRM_ARGB64_GET(c, 0)\n> > +\n> > +#define DRM_ARGB64_GETA_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 48, bpc)\n> > +#define DRM_ARGB64_GETR_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 32, bpc)\n> > +#define DRM_ARGB64_GETG_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 16, bpc)\n> > +#define DRM_ARGB64_GETB_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 0, bpc)\n> > +\n> > +#define DRM_ARGB64_GETA_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 48, bpc)\n> > +#define DRM_ARGB64_GETR_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 32, bpc)\n> > +#define DRM_ARGB64_GETG_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 16, bpc)\n> > +#define DRM_ARGB64_GETB_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 0, bpc)\n> > +\n> >  #if defined(__cplusplus)\n> >  }\n> >  #endif\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0F0ECC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 10:59:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0B98658EE;\n\tFri, 26 Jun 2026 12:59:05 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 180FC658E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 12:59:05 +0200 (CEST)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4C918174;\n\tFri, 26 Jun 2026 12:58:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"CaaxBFbb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782471504;\n\tbh=1nNWXKmjpwn8uB6uojlFNz2qV21UOqOCTMyHqpmcD7w=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=CaaxBFbbIs1YLLVuB3e4JZu7tPl7K8G35pOfGLOFA3sdUSmZ06aSEggseINWBolYA\n\tvMaqLhoeaTrHzi+4skFUrFwxFYtZJYyt4zubN8Huyqy06E0gThJStd7w1e27EVIO5l\n\tjsS+5IrUUgfShC0W+I2jHjpqisQECara77QF/HFQ=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260626105016.GD2258794@killaraus.ideasonboard.com>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>\n\t<20260626105016.GD2258794@killaraus.ideasonboard.com>","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Fri, 26 Jun 2026 11:59:02 +0100","Message-ID":"<178247154221.36676.12079406468384372431@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39446,"web_url":"https://patchwork.libcamera.org/comment/39446/","msgid":"<20260626110605.GF2258794@killaraus.ideasonboard.com>","date":"2026-06-26T11:06:05","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jun 26, 2026 at 11:57:52AM +0100, Kieran Bingham wrote:\n> Quoting Barnabás Pőcze (2026-06-26 11:51:14)\n> > 2026. 06. 26. 12:20 keltezéssel, Kieran Bingham írta:\n> > > This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n> > \n> > Does this mean other files have changed that are not updated?\n> \n> The other differences were only removing (undoing) changes we've made\n> locally.\n\nSounds like it would be useful for the update-kernel-headers.sh to\npropose a standardized commit message, to streamline reviews of future\nupdates.\n\n> > > updates from Linux 7.1 including an ARM 64k interleaved modifier,\n> > > panel-type properties, and some interesting ARGB accessor macros.\n> > > \n> > > libcamera specific local changes are preserved.\n> > > \n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > ---\n> > >   include/linux/README       |  2 +-\n> > >   include/linux/drm_fourcc.h | 16 ++++++++\n> > >   include/linux/drm_mode.h   | 84 ++++++++++++++++++++++++++++++++++++++\n> > >   3 files changed, 101 insertions(+), 1 deletion(-)\n> > > \n> > > diff --git a/include/linux/README b/include/linux/README\n> > > index b02952bb28ca..9303e0f14ae6 100644\n> > > --- a/include/linux/README\n> > > +++ b/include/linux/README\n> > > @@ -1,4 +1,4 @@\n> > >   # SPDX-License-Identifier: CC0-1.0\n> > >   \n> > > -Files in this directory are imported from v7.0 of the Linux kernel. Do not\n> > > +Files in this directory are imported from v7.1 of the Linux kernel. Do not\n> > >   modify them manually.\n> > > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > > index e8a3d949032b..8e2a6abae62f 100644\n> > > --- a/include/linux/drm_fourcc.h\n> > > +++ b/include/linux/drm_fourcc.h\n> > > @@ -1480,6 +1480,22 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > >   #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \\\n> > >       DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)\n> > >   \n> > > +/*\n> > > + * ARM 64k interleaved modifier\n> > > + *\n> > > + * This is used by ARM Mali v10+ GPUs. With this modifier, the plane is divided\n> > > + * into 64k byte 1:1 or 2:1 -sided tiles. The 64k tiles are laid out linearly.\n> > > + * Each 64k tile is divided into blocks of 16x16 texel blocks, which are\n> > > + * themselves laid out linearly within a 64k tile. Then within each 16x16\n> > > + * block, texel blocks are laid out according to U order, similar to\n> > > + * 16X16_BLOCK_U_INTERLEAVED.\n> > > + *\n> > > + * Note that unlike 16X16_BLOCK_U_INTERLEAVED, the layout does not change\n> > > + * depending on whether a format is compressed or not.\n> > > + */\n> > > +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \\\n> > > +     DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL)\n> > > +\n> > >   /*\n> > >    * Allwinner tiled modifier\n> > >    *\n> > > diff --git a/include/linux/drm_mode.h b/include/linux/drm_mode.h\n> > > index 8894b7a80732..381a3e857d4e 100644\n> > > --- a/include/linux/drm_mode.h\n> > > +++ b/include/linux/drm_mode.h\n> > > @@ -10,6 +10,9 @@\n> > >   #ifndef _DRM_MODE_H\n> > >   #define _DRM_MODE_H\n> > >   \n> > > +#include <linux/bits.h>\n> > > +#include <linux/const.h>\n> > > +\n> > >   #include \"drm.h\"\n> > >   \n> > >   #if defined(__cplusplus)\n> > > @@ -149,6 +152,10 @@ extern \"C\" {\n> > >   #define DRM_MODE_LINK_STATUS_GOOD   0\n> > >   #define DRM_MODE_LINK_STATUS_BAD    1\n> > >   \n> > > +/* Panel type property */\n> > > +#define DRM_MODE_PANEL_TYPE_UNKNOWN  0\n> > > +#define DRM_MODE_PANEL_TYPE_OLED     1\n> > > +\n> > >   /*\n> > >    * DRM_MODE_ROTATE_<degrees>\n> > >    *\n> > > @@ -1528,6 +1535,83 @@ struct drm_mode_closefb {\n> > >       __u32 pad;\n> > >   };\n> > >   \n> > > +/*\n> > > + * Put 16-bit ARGB values into a standard 64-bit representation that can be\n> > > + * used for ioctl parameters, inter-driver communication, etc.\n> > > + *\n> > > + * If the component values being provided contain less than 16 bits of\n> > > + * precision, use a conversion ratio to get a better color approximation.\n> > > + * The ratio is computed as (2^16 - 1) / (2^bpc - 1), where bpc and 16 are\n> > > + * the input and output precision, respectively.\n> > > + * Also note bpc must be greater than 0.\n> > > + */\n> > > +#define __DRM_ARGB64_PREP(c, shift)                                  \\\n> > > +     (((__u64)(c) & __GENMASK(15, 0)) << (shift))\n> > > +\n> > > +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)                         \\\n> > > +({                                                                   \\\n> > > +     __u16 mask = __GENMASK((bpc) - 1, 0);                           \\\n> > > +     __u16 conv = __KERNEL_DIV_ROUND_CLOSEST((mask & (c)) *          \\\n> > > +                                             __GENMASK(15, 0), mask);\\\n> > > +     __DRM_ARGB64_PREP(conv, shift);                                 \\\n> > > +})\n> > > +\n> > > +#define DRM_ARGB64_PREP(alpha, red, green, blue)                     \\\n> > > +(                                                                    \\\n> > > +     __DRM_ARGB64_PREP(alpha, 48) |                                  \\\n> > > +     __DRM_ARGB64_PREP(red,   32) |                                  \\\n> > > +     __DRM_ARGB64_PREP(green, 16) |                                  \\\n> > > +     __DRM_ARGB64_PREP(blue,   0)                                    \\\n> > > +)\n> > > +\n> > > +#define DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc)            \\\n> > > +({                                                                   \\\n> > > +     __typeof__(bpc) __bpc = bpc;                                    \\\n> > > +     __DRM_ARGB64_PREP_BPC(alpha, 48, __bpc) |                       \\\n> > > +     __DRM_ARGB64_PREP_BPC(red,   32, __bpc) |                       \\\n> > > +     __DRM_ARGB64_PREP_BPC(green, 16, __bpc) |                       \\\n> > > +     __DRM_ARGB64_PREP_BPC(blue,   0, __bpc);                        \\\n> > > +})\n> > > +\n> > > +/*\n> > > + * Extract the specified color component from a standard 64-bit ARGB value.\n> > > + *\n> > > + * If the requested precision is less than 16 bits, make use of a conversion\n> > > + * ratio calculated as (2^bpc - 1) / (2^16 - 1), where bpc and 16 are the\n> > > + * output and input precision, respectively.\n> > > + *\n> > > + * If speed is more important than accuracy, use DRM_ARGB64_GET*_BPCS()\n> > > + * instead of DRM_ARGB64_GET*_BPC() in order to replace the expensive\n> > > + * division with a simple bit right-shift operation.\n> > > + */\n> > > +#define __DRM_ARGB64_GET(c, shift)                                   \\\n> > > +     ((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0)))\n> > > +\n> > > +#define __DRM_ARGB64_GET_BPC(c, shift, bpc)                          \\\n> > > +({                                                                   \\\n> > > +     __u16 comp = __DRM_ARGB64_GET(c, shift);                        \\\n> > > +     __KERNEL_DIV_ROUND_CLOSEST(comp * __GENMASK((bpc) - 1, 0),      \\\n> > > +                                __GENMASK(15, 0));                   \\\n> > > +})\n> > > +\n> > > +#define __DRM_ARGB64_GET_BPCS(c, shift, bpc)                         \\\n> > > +     (__DRM_ARGB64_GET(c, shift) >> (16 - (bpc)))\n> > > +\n> > > +#define DRM_ARGB64_GETA(c)           __DRM_ARGB64_GET(c, 48)\n> > > +#define DRM_ARGB64_GETR(c)           __DRM_ARGB64_GET(c, 32)\n> > > +#define DRM_ARGB64_GETG(c)           __DRM_ARGB64_GET(c, 16)\n> > > +#define DRM_ARGB64_GETB(c)           __DRM_ARGB64_GET(c, 0)\n> > > +\n> > > +#define DRM_ARGB64_GETA_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 48, bpc)\n> > > +#define DRM_ARGB64_GETR_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 32, bpc)\n> > > +#define DRM_ARGB64_GETG_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 16, bpc)\n> > > +#define DRM_ARGB64_GETB_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 0, bpc)\n> > > +\n> > > +#define DRM_ARGB64_GETA_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 48, bpc)\n> > > +#define DRM_ARGB64_GETR_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 32, bpc)\n> > > +#define DRM_ARGB64_GETG_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 16, bpc)\n> > > +#define DRM_ARGB64_GETB_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 0, bpc)\n> > > +\n> > >   #if defined(__cplusplus)\n> > >   }\n> > >   #endif","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 8C45EC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 11:06:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76A17658F8;\n\tFri, 26 Jun 2026 13:06:08 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CFEF3658ED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 13:06:06 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AB4491E6;\n\tFri, 26 Jun 2026 13:05:25 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tymQj05n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782471925;\n\tbh=ZjgnmmTtru4DPWPncsruyP1ROPK8HCFBRjcEiSiCZtw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tymQj05nsSU2r/kO3eM34gixO9LiVRwBFhqLwNj1wM5qKoXL/Cy0v1RK4tlQ3sY/y\n\tOkBceAeeCCYg3ydoOCPmrv8AR4WhLWypLaHe4zQrQrl4A+xZ24oZHUzBIOkvIJ/2Ue\n\tkXrXEMS8MEBwPgMMQTkCjvRMdXoaum0OoWQ26DWA=","Date":"Fri, 26 Jun 2026 14:06:05 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","Message-ID":"<20260626110605.GF2258794@killaraus.ideasonboard.com>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>\n\t<06ce8750-83e8-4752-a5a6-eb36b39b99cb@ideasonboard.com>\n\t<178247147274.36676.10784738333926755337@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<178247147274.36676.10784738333926755337@ping.linuxembedded.co.uk>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39449,"web_url":"https://patchwork.libcamera.org/comment/39449/","msgid":"<178247248017.175457.7348945240721364222@ping.linuxembedded.co.uk>","date":"2026-06-26T11:14:40","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2026-06-26 12:06:05)\n> On Fri, Jun 26, 2026 at 11:57:52AM +0100, Kieran Bingham wrote:\n> > Quoting Barnabás Pőcze (2026-06-26 11:51:14)\n> > > 2026. 06. 26. 12:20 keltezéssel, Kieran Bingham írta:\n> > > > This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n> > > \n> > > Does this mean other files have changed that are not updated?\n> > \n> > The other differences were only removing (undoing) changes we've made\n> > locally.\n> \n> Sounds like it would be useful for the update-kernel-headers.sh to\n> propose a standardized commit message, to streamline reviews of future\n> updates.\n\nIs my proposal on my reply to you generic enough ?\n\n--\nKieran","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C366BC3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 11:14:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 85E48658F5;\n\tFri, 26 Jun 2026 13:14:45 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B5EA265878\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 13:14:43 +0200 (CEST)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BB0F91E7;\n\tFri, 26 Jun 2026 13:14:02 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aCz1f54e\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782472442;\n\tbh=t+H1tll5e6f661zPmvypPO4+eIJ7HW+c4ATGxfIKRMc=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=aCz1f54eVWbo0m/qL3iYdnOq49LaYv/cqLtBJO/eSLBushVb2SNHnxAepnfP5e6ES\n\tbC265dVQ83Zlbw9KFgoj28/ALcKGU/Dt8tLgaE017etLQC5NAMAML6uBJDWI1iJudH\n\tqLw9xCR8/FItd3emzwvwjXsozpobpEDpM1kdQsjY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260626110605.GF2258794@killaraus.ideasonboard.com>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>\n\t<06ce8750-83e8-4752-a5a6-eb36b39b99cb@ideasonboard.com>\n\t<178247147274.36676.10784738333926755337@ping.linuxembedded.co.uk>\n\t<20260626110605.GF2258794@killaraus.ideasonboard.com>","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Fri, 26 Jun 2026 12:14:40 +0100","Message-ID":"<178247248017.175457.7348945240721364222@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":39453,"web_url":"https://patchwork.libcamera.org/comment/39453/","msgid":"<20260626115127.GH2258794@killaraus.ideasonboard.com>","date":"2026-06-26T11:51:27","subject":"Re: [PATCH] include: linux: Update to Linux 7.1","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jun 26, 2026 at 11:59:02AM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2026-06-26 11:50:16)\n> > On Fri, Jun 26, 2026 at 11:20:40AM +0100, Kieran Bingham wrote:\n> > > This updates only linux/drm_fourcc.h and linux/drm_mode.h to bring in\n> > > updates from Linux 7.1 including an ARM 64k interleaved modifier,\n> > > panel-type properties, and some interesting ARGB accessor macros.\n> > \n> > As those are of no use for libcamera I wouldn't have listed the detailed\n> > changes here.\n> \n> Would you be happier with the following ?:\n> \n> \n> include: linux: Update to Linux 7.1\n\ns/7.1/v7.1/\n\n> Refresh the kernel headers we import to bring in new changes from the\n> latest release, without undoing local libcamera specific modifications.\n\nLet's also record that update-kernel-headers.sh was used, I think that's\nimportant information. Copying a previous commit message for a similar\nupdate, you could write\n\nUpdate the kernel headers to v7.1 using utils/update-kernel-headers.sh.\nPreserve the libcamera local modifications manually.\n\nor something like that.\n\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > > libcamera specific local changes are preserved.\n> > > \n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > \n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > \n> > > ---\n> > >  include/linux/README       |  2 +-\n> > >  include/linux/drm_fourcc.h | 16 ++++++++\n> > >  include/linux/drm_mode.h   | 84 ++++++++++++++++++++++++++++++++++++++\n> > >  3 files changed, 101 insertions(+), 1 deletion(-)\n> > > \n> > > diff --git a/include/linux/README b/include/linux/README\n> > > index b02952bb28ca..9303e0f14ae6 100644\n> > > --- a/include/linux/README\n> > > +++ b/include/linux/README\n> > > @@ -1,4 +1,4 @@\n> > >  # SPDX-License-Identifier: CC0-1.0\n> > >  \n> > > -Files in this directory are imported from v7.0 of the Linux kernel. Do not\n> > > +Files in this directory are imported from v7.1 of the Linux kernel. Do not\n> > >  modify them manually.\n> > > diff --git a/include/linux/drm_fourcc.h b/include/linux/drm_fourcc.h\n> > > index e8a3d949032b..8e2a6abae62f 100644\n> > > --- a/include/linux/drm_fourcc.h\n> > > +++ b/include/linux/drm_fourcc.h\n> > > @@ -1480,6 +1480,22 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)\n> > >  #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \\\n> > >       DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)\n> > >  \n> > > +/*\n> > > + * ARM 64k interleaved modifier\n> > > + *\n> > > + * This is used by ARM Mali v10+ GPUs. With this modifier, the plane is divided\n> > > + * into 64k byte 1:1 or 2:1 -sided tiles. The 64k tiles are laid out linearly.\n> > > + * Each 64k tile is divided into blocks of 16x16 texel blocks, which are\n> > > + * themselves laid out linearly within a 64k tile. Then within each 16x16\n> > > + * block, texel blocks are laid out according to U order, similar to\n> > > + * 16X16_BLOCK_U_INTERLEAVED.\n> > > + *\n> > > + * Note that unlike 16X16_BLOCK_U_INTERLEAVED, the layout does not change\n> > > + * depending on whether a format is compressed or not.\n> > > + */\n> > > +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \\\n> > > +     DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL)\n> > > +\n> > >  /*\n> > >   * Allwinner tiled modifier\n> > >   *\n> > > diff --git a/include/linux/drm_mode.h b/include/linux/drm_mode.h\n> > > index 8894b7a80732..381a3e857d4e 100644\n> > > --- a/include/linux/drm_mode.h\n> > > +++ b/include/linux/drm_mode.h\n> > > @@ -10,6 +10,9 @@\n> > >  #ifndef _DRM_MODE_H\n> > >  #define _DRM_MODE_H\n> > >  \n> > > +#include <linux/bits.h>\n> > > +#include <linux/const.h>\n> > > +\n> > >  #include \"drm.h\"\n> > >  \n> > >  #if defined(__cplusplus)\n> > > @@ -149,6 +152,10 @@ extern \"C\" {\n> > >  #define DRM_MODE_LINK_STATUS_GOOD    0\n> > >  #define DRM_MODE_LINK_STATUS_BAD     1\n> > >  \n> > > +/* Panel type property */\n> > > +#define DRM_MODE_PANEL_TYPE_UNKNOWN  0\n> > > +#define DRM_MODE_PANEL_TYPE_OLED     1\n> > > +\n> > >  /*\n> > >   * DRM_MODE_ROTATE_<degrees>\n> > >   *\n> > > @@ -1528,6 +1535,83 @@ struct drm_mode_closefb {\n> > >       __u32 pad;\n> > >  };\n> > >  \n> > > +/*\n> > > + * Put 16-bit ARGB values into a standard 64-bit representation that can be\n> > > + * used for ioctl parameters, inter-driver communication, etc.\n> > > + *\n> > > + * If the component values being provided contain less than 16 bits of\n> > > + * precision, use a conversion ratio to get a better color approximation.\n> > > + * The ratio is computed as (2^16 - 1) / (2^bpc - 1), where bpc and 16 are\n> > > + * the input and output precision, respectively.\n> > > + * Also note bpc must be greater than 0.\n> > > + */\n> > > +#define __DRM_ARGB64_PREP(c, shift)                                  \\\n> > > +     (((__u64)(c) & __GENMASK(15, 0)) << (shift))\n> > > +\n> > > +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)                         \\\n> > > +({                                                                   \\\n> > > +     __u16 mask = __GENMASK((bpc) - 1, 0);                           \\\n> > > +     __u16 conv = __KERNEL_DIV_ROUND_CLOSEST((mask & (c)) *          \\\n> > > +                                             __GENMASK(15, 0), mask);\\\n> > > +     __DRM_ARGB64_PREP(conv, shift);                                 \\\n> > > +})\n> > > +\n> > > +#define DRM_ARGB64_PREP(alpha, red, green, blue)                     \\\n> > > +(                                                                    \\\n> > > +     __DRM_ARGB64_PREP(alpha, 48) |                                  \\\n> > > +     __DRM_ARGB64_PREP(red,   32) |                                  \\\n> > > +     __DRM_ARGB64_PREP(green, 16) |                                  \\\n> > > +     __DRM_ARGB64_PREP(blue,   0)                                    \\\n> > > +)\n> > > +\n> > > +#define DRM_ARGB64_PREP_BPC(alpha, red, green, blue, bpc)            \\\n> > > +({                                                                   \\\n> > > +     __typeof__(bpc) __bpc = bpc;                                    \\\n> > > +     __DRM_ARGB64_PREP_BPC(alpha, 48, __bpc) |                       \\\n> > > +     __DRM_ARGB64_PREP_BPC(red,   32, __bpc) |                       \\\n> > > +     __DRM_ARGB64_PREP_BPC(green, 16, __bpc) |                       \\\n> > > +     __DRM_ARGB64_PREP_BPC(blue,   0, __bpc);                        \\\n> > > +})\n> > > +\n> > > +/*\n> > > + * Extract the specified color component from a standard 64-bit ARGB value.\n> > > + *\n> > > + * If the requested precision is less than 16 bits, make use of a conversion\n> > > + * ratio calculated as (2^bpc - 1) / (2^16 - 1), where bpc and 16 are the\n> > > + * output and input precision, respectively.\n> > > + *\n> > > + * If speed is more important than accuracy, use DRM_ARGB64_GET*_BPCS()\n> > > + * instead of DRM_ARGB64_GET*_BPC() in order to replace the expensive\n> > > + * division with a simple bit right-shift operation.\n> > > + */\n> > > +#define __DRM_ARGB64_GET(c, shift)                                   \\\n> > > +     ((__u16)(((__u64)(c) >> (shift)) & __GENMASK(15, 0)))\n> > > +\n> > > +#define __DRM_ARGB64_GET_BPC(c, shift, bpc)                          \\\n> > > +({                                                                   \\\n> > > +     __u16 comp = __DRM_ARGB64_GET(c, shift);                        \\\n> > > +     __KERNEL_DIV_ROUND_CLOSEST(comp * __GENMASK((bpc) - 1, 0),      \\\n> > > +                                __GENMASK(15, 0));                   \\\n> > > +})\n> > > +\n> > > +#define __DRM_ARGB64_GET_BPCS(c, shift, bpc)                         \\\n> > > +     (__DRM_ARGB64_GET(c, shift) >> (16 - (bpc)))\n> > > +\n> > > +#define DRM_ARGB64_GETA(c)           __DRM_ARGB64_GET(c, 48)\n> > > +#define DRM_ARGB64_GETR(c)           __DRM_ARGB64_GET(c, 32)\n> > > +#define DRM_ARGB64_GETG(c)           __DRM_ARGB64_GET(c, 16)\n> > > +#define DRM_ARGB64_GETB(c)           __DRM_ARGB64_GET(c, 0)\n> > > +\n> > > +#define DRM_ARGB64_GETA_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 48, bpc)\n> > > +#define DRM_ARGB64_GETR_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 32, bpc)\n> > > +#define DRM_ARGB64_GETG_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 16, bpc)\n> > > +#define DRM_ARGB64_GETB_BPC(c, bpc)  __DRM_ARGB64_GET_BPC(c, 0, bpc)\n> > > +\n> > > +#define DRM_ARGB64_GETA_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 48, bpc)\n> > > +#define DRM_ARGB64_GETR_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 32, bpc)\n> > > +#define DRM_ARGB64_GETG_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 16, bpc)\n> > > +#define DRM_ARGB64_GETB_BPCS(c, bpc) __DRM_ARGB64_GET_BPCS(c, 0, bpc)\n> > > +\n> > >  #if defined(__cplusplus)\n> > >  }\n> > >  #endif","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 92988C3264\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jun 2026 11:51:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5296E658F7;\n\tFri, 26 Jun 2026 13:51:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4C2565878\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jun 2026 13:51:28 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9BEBB1E6;\n\tFri, 26 Jun 2026 13:50:47 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mkbMieaB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782474647;\n\tbh=PwsfxrDNFb8M/JQD6uaimbNVjm2Oj/6lwpsxfLzm/oY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mkbMieaBxwRruqAPsIz6ExSVPTO7l2cLcf/pKv2TgGul262QJs/sjVDKASkZvvauy\n\t5I3cOGB6PyeJawgaP4xa6Im3uWIo7M/ZewDipnpiWo7fd05O5eMV38rcgf08RtF/ll\n\tgqs0qJZiQkutJZ/4MbbMTp3fP5Kljx3cyLoiqvec=","Date":"Fri, 26 Jun 2026 14:51:27 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"Re: [PATCH] include: linux: Update to Linux 7.1","Message-ID":"<20260626115127.GH2258794@killaraus.ideasonboard.com>","References":"<20260626102040.260324-1-kieran.bingham@ideasonboard.com>\n\t<20260626105016.GD2258794@killaraus.ideasonboard.com>\n\t<178247154221.36676.12079406468384372431@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<178247154221.36676.12079406468384372431@ping.linuxembedded.co.uk>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]