Skip to content

Commit de0d6e1

Browse files
ttabiLyude
authored andcommitted
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
1 parent 85ce566 commit de0d6e1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/gpu/drm/nouveau/include/nvfw

drivers/gpu/drm/nouveau/include/nvfw/hs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ struct nvfw_hs_load_header_v2 {
5252
struct {
5353
u32 offset;
5454
u32 size;
55-
} app[];
55+
u32 data_offset;
56+
u32 data_size;
57+
} app[] __counted_by(num_apps);
5658
};
5759

5860
const struct nvfw_hs_load_header_v2 *nvfw_hs_load_header_v2(struct nvkm_subdev *, const void *);

0 commit comments

Comments
 (0)