media: atomisp: Add ia_css_frame_pad_width() helper function
authorHans de Goede <hdegoede@redhat.com>
Mon, 29 May 2023 10:37:33 +0000 (11:37 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 14:29:30 +0000 (15:29 +0100)
commiteec8787bfb5558999ac97ac3363acc7fc8c4fdf8
tree113ac4efc258d2a8f78c28a6b31fe94cd998b5bb
parent9f221053342ab943c4bac8d5cf10ca256793a878
media: atomisp: Add ia_css_frame_pad_width() helper function

Factor the code to go from width to a properly aligned pitch out of
ia_css_frame_info_set_width().

This is a preparation patch to fix try_fmt() calls returning a bogus
bytesperline value.

Link: https://lore.kernel.org/r/20230529103741.11904-14-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/runtime/frame/interface/ia_css_frame.h
drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c