From 7e1e7021149c2cfea092dfd488a30447d189ac61 Mon Sep 17 00:00:00 2001 From: Josuah Demangeon Date: Fri, 10 Jan 2025 22:43:05 +0000 Subject: [PATCH] doc: releases: 4.1: announce switch to video_bits_per_pixel() The previous commit introduces video_bits_per_pixel() and converts all invocation relying on video_pix_fmt_bpp(), 3rd-party users will need to do the same on their code, and this is not a 100% drop-in API, so better document it on the release notes. Signed-off-by: Josuah Demangeon --- doc/releases/migration-guide-4.1.rst | 5 +++++ doc/releases/release-notes-4.1.rst | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/releases/migration-guide-4.1.rst b/doc/releases/migration-guide-4.1.rst index d8a71b189307..45bff3262cad 100644 --- a/doc/releases/migration-guide-4.1.rst +++ b/doc/releases/migration-guide-4.1.rst @@ -331,6 +331,11 @@ Video The new ``video-controls.h`` source now contains description of each control ID to help disambiguating. +* The ``video_pix_fmt_bpp()`` function was returning a byte count. This got replaced by + ``video_bits_per_pixel()`` which returns a bit count. For instance, invocations such as + ``pitch = width * video_pix_fmt_bpp(pixfmt)`` need to be replaced by an equivalent + ``pitch = width * video_bits_per_pixel(pixfmt) / BITS_PER_BYTE``. + Watchdog ======== diff --git a/doc/releases/release-notes-4.1.rst b/doc/releases/release-notes-4.1.rst index f6c179ba0507..b747dd9b6756 100644 --- a/doc/releases/release-notes-4.1.rst +++ b/doc/releases/release-notes-4.1.rst @@ -291,6 +291,9 @@ Drivers and Sensors * Changed :file:`include/zephyr/drivers/video-controls.h` to have control IDs (CIDs) matching those present in the Linux kernel. + * Changed ``video_pix_fmt_bpp()`` returning the byte count and only supports 8-bit depth, + into ``video_bits_per_pixel()`` returning the bit count and supports any color depth. + * Watchdog * Added :kconfig:option:`CONFIG_HAS_WDT_NO_CALLBACKS` which drivers select when they do not support