mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
media: renesas: vsp1: Make HSI and HST modules optional
Not all VSP instance incorporate the HSI and HST modules. Add a VSP1_HAS_HSIT feature flag, and create the modules only on VSP instances that implement them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com> Link: https://lore.kernel.org/r/20250429232904.26413-3-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
57024cd279
commit
a4b25ae7b2
|
|
@ -58,6 +58,7 @@ struct vsp1_uif;
|
|||
#define VSP1_HAS_EXT_DL BIT(10)
|
||||
#define VSP1_HAS_NON_ZERO_LBA BIT(11)
|
||||
#define VSP1_HAS_IIF BIT(12)
|
||||
#define VSP1_HAS_HSIT BIT(13)
|
||||
|
||||
struct vsp1_device_info {
|
||||
u32 version;
|
||||
|
|
|
|||
|
|
@ -303,22 +303,6 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
|
|||
list_add_tail(&vsp1->clu->entity.list_dev, &vsp1->entities);
|
||||
}
|
||||
|
||||
vsp1->hsi = vsp1_hsit_create(vsp1, true);
|
||||
if (IS_ERR(vsp1->hsi)) {
|
||||
ret = PTR_ERR(vsp1->hsi);
|
||||
goto done;
|
||||
}
|
||||
|
||||
list_add_tail(&vsp1->hsi->entity.list_dev, &vsp1->entities);
|
||||
|
||||
vsp1->hst = vsp1_hsit_create(vsp1, false);
|
||||
if (IS_ERR(vsp1->hst)) {
|
||||
ret = PTR_ERR(vsp1->hst);
|
||||
goto done;
|
||||
}
|
||||
|
||||
list_add_tail(&vsp1->hst->entity.list_dev, &vsp1->entities);
|
||||
|
||||
if (vsp1_feature(vsp1, VSP1_HAS_HGO) && vsp1->info->uapi) {
|
||||
vsp1->hgo = vsp1_hgo_create(vsp1);
|
||||
if (IS_ERR(vsp1->hgo)) {
|
||||
|
|
@ -351,6 +335,24 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
|
|||
list_add_tail(&vsp1->iif->entity.list_dev, &vsp1->entities);
|
||||
}
|
||||
|
||||
if (vsp1_feature(vsp1, VSP1_HAS_HSIT)) {
|
||||
vsp1->hsi = vsp1_hsit_create(vsp1, true);
|
||||
if (IS_ERR(vsp1->hsi)) {
|
||||
ret = PTR_ERR(vsp1->hsi);
|
||||
goto done;
|
||||
}
|
||||
|
||||
list_add_tail(&vsp1->hsi->entity.list_dev, &vsp1->entities);
|
||||
|
||||
vsp1->hst = vsp1_hsit_create(vsp1, false);
|
||||
if (IS_ERR(vsp1->hst)) {
|
||||
ret = PTR_ERR(vsp1->hst);
|
||||
goto done;
|
||||
}
|
||||
|
||||
list_add_tail(&vsp1->hst->entity.list_dev, &vsp1->entities);
|
||||
}
|
||||
|
||||
/*
|
||||
* The LIFs are only supported when used in conjunction with the DU, in
|
||||
* which case the userspace API is disabled. If the userspace API is
|
||||
|
|
@ -694,8 +696,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.model = "VSP1-S",
|
||||
.gen = 2,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_CLU | VSP1_HAS_HGO
|
||||
| VSP1_HAS_HGT | VSP1_HAS_LUT | VSP1_HAS_SRU
|
||||
| VSP1_HAS_WPF_VFLIP,
|
||||
| VSP1_HAS_HGT | VSP1_HAS_HSIT | VSP1_HAS_LUT
|
||||
| VSP1_HAS_SRU | VSP1_HAS_WPF_VFLIP,
|
||||
.rpf_count = 5,
|
||||
.uds_count = 3,
|
||||
.wpf_count = 4,
|
||||
|
|
@ -705,7 +707,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.version = VI6_IP_VERSION_MODEL_VSPR_H2,
|
||||
.model = "VSP1-R",
|
||||
.gen = 2,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_SRU | VSP1_HAS_WPF_VFLIP,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_HSIT | VSP1_HAS_SRU
|
||||
| VSP1_HAS_WPF_VFLIP,
|
||||
.rpf_count = 5,
|
||||
.uds_count = 3,
|
||||
.wpf_count = 4,
|
||||
|
|
@ -715,7 +718,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.version = VI6_IP_VERSION_MODEL_VSPD_GEN2,
|
||||
.model = "VSP1-D",
|
||||
.gen = 2,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_HGO | VSP1_HAS_LUT,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_HGO | VSP1_HAS_HSIT
|
||||
| VSP1_HAS_LUT,
|
||||
.lif_count = 1,
|
||||
.rpf_count = 4,
|
||||
.uds_count = 1,
|
||||
|
|
@ -727,8 +731,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.model = "VSP1-S",
|
||||
.gen = 2,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_CLU | VSP1_HAS_HGO
|
||||
| VSP1_HAS_HGT | VSP1_HAS_LUT | VSP1_HAS_SRU
|
||||
| VSP1_HAS_WPF_VFLIP,
|
||||
| VSP1_HAS_HGT | VSP1_HAS_HSIT | VSP1_HAS_LUT
|
||||
| VSP1_HAS_SRU | VSP1_HAS_WPF_VFLIP,
|
||||
.rpf_count = 5,
|
||||
.uds_count = 1,
|
||||
.wpf_count = 4,
|
||||
|
|
@ -738,8 +742,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.version = VI6_IP_VERSION_MODEL_VSPS_V2H,
|
||||
.model = "VSP1V-S",
|
||||
.gen = 2,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_CLU | VSP1_HAS_LUT
|
||||
| VSP1_HAS_SRU | VSP1_HAS_WPF_VFLIP,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_CLU | VSP1_HAS_HSIT
|
||||
| VSP1_HAS_LUT | VSP1_HAS_SRU | VSP1_HAS_WPF_VFLIP,
|
||||
.rpf_count = 4,
|
||||
.uds_count = 1,
|
||||
.wpf_count = 4,
|
||||
|
|
@ -749,7 +753,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.version = VI6_IP_VERSION_MODEL_VSPD_V2H,
|
||||
.model = "VSP1V-D",
|
||||
.gen = 2,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_CLU | VSP1_HAS_LUT,
|
||||
.features = VSP1_HAS_BRU | VSP1_HAS_CLU | VSP1_HAS_HSIT
|
||||
| VSP1_HAS_LUT,
|
||||
.lif_count = 1,
|
||||
.rpf_count = 4,
|
||||
.uds_count = 1,
|
||||
|
|
@ -761,8 +766,8 @@ static const struct vsp1_device_info vsp1_device_infos[] = {
|
|||
.model = "VSP2-I",
|
||||
.gen = 3,
|
||||
.features = VSP1_HAS_CLU | VSP1_HAS_HGO | VSP1_HAS_HGT
|
||||
| VSP1_HAS_LUT | VSP1_HAS_SRU | VSP1_HAS_WPF_HFLIP
|
||||
| VSP1_HAS_WPF_VFLIP,
|
||||
| VSP1_HAS_HSIT | VSP1_HAS_LUT | VSP1_HAS_SRU
|
||||
| VSP1_HAS_WPF_HFLIP | VSP1_HAS_WPF_VFLIP,
|
||||
.rpf_count = 1,
|
||||
.uds_count = 1,
|
||||
.wpf_count = 1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user