Skip to content

Commit

Permalink
drivers: media: pisp_be: Remove extras field from pisp_be_config
Browse files Browse the repository at this point in the history
Remove the various extras fields from struct pisp_be_config. These
fields are not used by the driver nor the hardware, so do not belong
in this structure.

Also put the tiles array at the top of struct pisp_be_tiles_config to
ensure any size change to struct pisp_be_config does not move the
tiles struct out of alignment.

This is a userland breaking change, and libpisp must be updated
accordingly.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
  • Loading branch information
naushir committed May 1, 2024
1 parent 7c517e7 commit 8cc394f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static void hw_queue_job(struct pispbe_dev *pispbe,
*/
begin = offsetof(struct pisp_be_config, global.bayer_order) /
sizeof(u32);
end = offsetof(struct pisp_be_config, axi) / sizeof(u32);
end = sizeof(struct pisp_be_config) / sizeof(u32);
for (u = begin; u < end; u++) {
unsigned int val = ((u32 *)config)[u];

Expand Down
14 changes: 1 addition & 13 deletions drivers/media/platform/raspberrypi/pisp_be/pisp_be_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,18 +446,6 @@ struct pisp_be_config {
struct pisp_be_output_format_config
output_format[PISP_BACK_END_NUM_OUTPUTS];
struct pisp_be_hog_config hog;
struct pisp_be_axi_config axi;
/* Non-register fields: */
struct pisp_be_lsc_extra lsc_extra;
struct pisp_be_cac_extra cac_extra;
struct pisp_be_downscale_extra
downscale_extra[PISP_BACK_END_NUM_OUTPUTS];
struct pisp_be_resample_extra resample_extra[PISP_BACK_END_NUM_OUTPUTS];
struct pisp_be_crop_config crop;
struct pisp_image_format_config hog_format;
u32 dirty_flags_bayer; /* these use pisp_be_bayer_enable */
u32 dirty_flags_rgb; /* use pisp_be_rgb_enable */
u32 dirty_flags_extra; /* these use pisp_be_dirty_t */
};

/*
Expand Down Expand Up @@ -525,9 +513,9 @@ struct pisp_tile {
static_assert(sizeof(struct pisp_tile) == 160);

struct pisp_be_tiles_config {
struct pisp_be_config config;
struct pisp_tile tiles[PISP_BACK_END_NUM_TILES];
int num_tiles;
struct pisp_be_config config;
};

#endif /* _PISP_BE_CONFIG_H_ */

0 comments on commit 8cc394f

Please sign in to comment.