Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/nouveau: fully define nvfw_hs_load_header_v2

Add the missing fields of the nvfw_hs_load_header_v2 struct, so that the
struct matches the actual contents of the firmware images.

nvfw_hs_load_header_v2 is a struct that defines a header for some firmware
images used by Nouveau. The current structure definition is incomplete;
it omits the last two fields because they are unused.

To maintain consistency between Nouveau, OpenRM, and Nova, and to
make it easier to support possible future images, we should fully define
the struct. Also add a __counted_by tag for the flex array.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patch.msgid.link/20251010223957.1078525-1-ttabi@nvidia.com

authored by

Timur Tabi and committed by
Lyude Paul
de0d6e19 85ce566b

+3 -1
+3 -1
drivers/gpu/drm/nouveau/include/nvfw/hs.h
··· 52 52 struct { 53 53 u32 offset; 54 54 u32 size; 55 - } app[]; 55 + u32 data_offset; 56 + u32 data_size; 57 + } app[] __counted_by(num_apps); 56 58 }; 57 59 58 60 const struct nvfw_hs_load_header_v2 *nvfw_hs_load_header_v2(struct nvkm_subdev *, const void *);