From: Jeongtae Park Date: Fri, 27 Apr 2018 07:32:03 +0000 (+0900) Subject: [COMMON] fimc-is2: add sub-device channel mode to represent logical VC X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11b4fa1b1125fa77fa2dc329384a54b17f594a9f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: add sub-device channel mode to represent logical VC Change-Id: I3baae756c4495e281664ae51920b9d87d7d23f4d Signed-off-by: Jeongtae Park --- diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c index a63f484ddfe5..dd11ba914d81 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c @@ -1592,26 +1592,26 @@ static int __init fimc_is_sensor_probe(struct platform_device *pdev) /* DMA abstraction */ device->dma_abstract = device->pdata->dma_abstract; - device->ssvc0.dma_ch[0] = device->pdata->dma_ch[0]; - device->ssvc1.dma_ch[0] = device->pdata->dma_ch[1]; - device->ssvc2.dma_ch[0] = device->pdata->dma_ch[2]; - device->ssvc3.dma_ch[0] = device->pdata->dma_ch[3]; + device->ssvc0.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[0]; + device->ssvc1.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[1]; + device->ssvc2.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[2]; + device->ssvc3.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[3]; - device->ssvc0.dma_ch[1] = device->pdata->dma_ch[4]; - device->ssvc1.dma_ch[1] = device->pdata->dma_ch[5]; - device->ssvc2.dma_ch[1] = device->pdata->dma_ch[6]; - device->ssvc3.dma_ch[1] = device->pdata->dma_ch[7]; + device->ssvc0.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[4]; + device->ssvc1.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[5]; + device->ssvc2.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[6]; + device->ssvc3.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[7]; /* VC abstraction */ - device->ssvc0.vc_ch[0] = device->pdata->vc_ch[0]; - device->ssvc1.vc_ch[0] = device->pdata->vc_ch[1]; - device->ssvc2.vc_ch[0] = device->pdata->vc_ch[2]; - device->ssvc3.vc_ch[0] = device->pdata->vc_ch[3]; - - device->ssvc0.vc_ch[1] = device->pdata->vc_ch[4]; - device->ssvc1.vc_ch[1] = device->pdata->vc_ch[5]; - device->ssvc2.vc_ch[1] = device->pdata->vc_ch[6]; - device->ssvc3.vc_ch[1] = device->pdata->vc_ch[7]; + device->ssvc0.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[0]; + device->ssvc1.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[1]; + device->ssvc2.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[2]; + device->ssvc3.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[3]; + + device->ssvc0.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[4]; + device->ssvc1.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[5]; + device->ssvc2.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[6]; + device->ssvc3.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[7]; set_bit(FIMC_IS_SENSOR_PROBE, &device->state); diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-subdev-ctrl.h b/drivers/media/platform/exynos/fimc-is2/fimc-is-subdev-ctrl.h index 137cbd7025ce..eee7734dd193 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-subdev-ctrl.h +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-subdev-ctrl.h @@ -104,6 +104,12 @@ struct fimc_is_subdev_ops { struct camera2_node *node); }; +enum subdev_ch_mode { + SCM_WO_PAF_HW, + SCM_W_PAF_HW, + SCM_MAX, +}; + struct fimc_is_subdev { u32 id; u32 vid; /* video id */ @@ -142,11 +148,11 @@ struct fimc_is_subdev { /* * Parameter for DMA abstraction: * This value is physical DMA & VC. - * [0]: Without PDP (Use this when none PD mode is enabled.) - * [1]: With PDP (Use this when PD mode is enabled.) + * [0]: Bypass PAF HW (Use this when none PD mode is enabled.) + * [1]: Processing PAF HW (Use this when PD mode is enabled.) */ - int dma_ch[2]; - int vc_ch[2]; + int dma_ch[SCM_MAX]; + int vc_ch[SCM_MAX]; }; int fimc_is_sensor_subdev_open(struct fimc_is_device_sensor *device,