]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: qcom: camss: Attach formats to VFE resources
authorRadoslav Tsvetkov <quic_rtsvetko@quicinc.com>
Wed, 22 May 2024 15:46:53 +0000 (18:46 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 29 Jun 2024 10:20:04 +0000 (12:20 +0200)
commit6c46cb0d0aa0a9339d317d55fd3895caa0e655d4
tree3855dc35a2b768245869fcf869c86cc703e03ac3
parentae44829a4a97a34486a89dbafc2653e9cbf896dd
media: qcom: camss: Attach formats to VFE resources

Video node formats have direct dependency by the sub-device pad formats.
Remove dependency for SoC version and move format definitions in device
which creates video node.

This commit attaches a struct to the VFE resources that holds format
description, so it is much easier to assign them to the video node.
No need to use a switch-case.

NOTE: The mbus_bpp is used to calculate the clock rates and is different
from bpp which is the bits per pixel written to memory. We need to keep
both values to not break the calcualtions.

Signed-off-by: Radoslav Tsvetkov <quic_rtsvetko@quicinc.com>
Signed-off-by: Gjorgji Rosikopulos <quic_grosikop@quicinc.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/qcom/camss/camss-format.h [new file with mode: 0644]
drivers/media/platform/qcom/camss/camss-vfe.c
drivers/media/platform/qcom/camss/camss-vfe.h
drivers/media/platform/qcom/camss/camss-video.c
drivers/media/platform/qcom/camss/camss-video.h
drivers/media/platform/qcom/camss/camss.c
drivers/media/platform/qcom/camss/camss.h