From: Eunyoung Lee Date: Tue, 15 May 2018 10:00:51 +0000 (+0900) Subject: [9610] fimc-is2: modified 3ap per-frame size for dzoom X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3a9ac7d22c62900de5b8430ba18ac8214bb62fd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [9610] fimc-is2: modified 3ap per-frame size for dzoom Change-Id: If3be1a9572311c8ad71aed3952c1c52e633c6df7 Signed-off-by: Eunyoung Lee --- diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-param.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-param.h index 04491301bf4f..c1509ad96382 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-param.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-param.h @@ -157,8 +157,8 @@ enum otf_input_order { }; enum otf_input_path { - OTF_INPUT_SERIAL_PATH = 0, - OTF_INPUT_PARAL_PATH = 1 + OTF_INPUT_SENSOR_PATH = 0, + OTF_INPUT_PAF_RDMA_PATH = 1 }; enum otf_intput_error { @@ -767,7 +767,8 @@ struct param_otf_input { u32 bayer_crop_offset_y; u32 bayer_crop_width; /* BCrop1 output width without considering ISP margin = BDS input width */ u32 bayer_crop_height; /* BCrop1 output height without considering ISP margin = BDS input height */ - u32 reserved[PARAMETER_MAX_MEMBER-11]; + u32 source; /* 0 : sensor, 1: paf rdma */ + u32 reserved[PARAMETER_MAX_MEMBER-12]; u32 err; }; diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3aa.c b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3aa.c index 668e02af9f5c..ea4003f5a51d 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3aa.c +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3aa.c @@ -98,6 +98,8 @@ static int fimc_is_ischain_3aa_cfg(struct fimc_is_subdev *leader, */ otf_input = fimc_is_itf_g_param(device, frame, PARAM_3AA_OTF_INPUT); + if (group->head->id == GROUP_ID_PAF0 || group->head->id == GROUP_ID_PAF1) + otf_input->source = OTF_INPUT_PAF_RDMA_PATH; if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) { otf_input->cmd = OTF_INPUT_COMMAND_ENABLE; otf_input->width = fimc_is_sensor_g_bns_width(device->sensor); @@ -156,7 +158,7 @@ static int fimc_is_ischain_3aa_cfg(struct fimc_is_subdev *leader, else otf_output->cmd = OTF_OUTPUT_COMMAND_DISABLE; #ifdef USE_3AA_CROP_AFTER_BDS - if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) { + if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (otf_input->source != OTF_INPUT_PAF_RDMA_PATH)) { otf_output->width = otcrop->w; otf_output->height = otcrop->h; otf_output->crop_enable = 0; diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3ap.c b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3ap.c index aecc339d8f97..aa18e147f408 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3ap.c +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3ap.c @@ -45,6 +45,7 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device, struct param_dma_output *dma_output; struct fimc_is_module_enum *module; u32 hw_format, hw_bitwidth; + bool paf_rdma_enable = false; FIMC_BUG(!queue); FIMC_BUG(!queue->framecfg.format); @@ -54,6 +55,9 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device, hw_format = queue->framecfg.format->hw_format; hw_bitwidth = queue->framecfg.format->hw_bitwidth; /* memory width per pixel */ + if (group->head->id == GROUP_ID_PAF0 || group->head->id == GROUP_ID_PAF1) + paf_rdma_enable = 1; + ret = fimc_is_sensor_g_module(device->sensor, &module); if (ret) { merr("fimc_is_sensor_g_module is fail(%d)", device, ret); @@ -71,7 +75,7 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device, goto p_err; } - if (otcrop->x || otcrop->y) { + if ((otcrop->x || otcrop->y) && (!paf_rdma_enable)) { mwarn("crop pos(%d, %d) is ignored", device, otcrop->x, otcrop->y); otcrop->x = 0; otcrop->y = 0; @@ -90,7 +94,7 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device, dma_output->bitwidth = hw_bitwidth; dma_output->msb = MSB_OF_3AA_DMA_OUT; #ifdef USE_3AA_CROP_AFTER_BDS - if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) { + if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (!paf_rdma_enable)) { dma_output->width = otcrop->w; dma_output->height = otcrop->h; dma_output->crop_enable = 0; @@ -132,11 +136,15 @@ static int fimc_is_ischain_3ap_stop(struct fimc_is_device_ischain *device, int ret = 0; struct fimc_is_group *group; struct param_dma_output *dma_output; + bool paf_rdma_enable = false; mdbgd_ischain("%s\n", device, __func__); group = &device->group_3aa; + if (group->head->id == GROUP_ID_PAF0 || group->head->id == GROUP_ID_PAF1) + paf_rdma_enable = 1; + if ((otcrop->w > taa_param->otf_input.bayer_crop_width) || (otcrop->h > taa_param->otf_input.bayer_crop_height)) { mrerr("bds output size is invalid((%d, %d) > (%d, %d))", device, frame, @@ -148,7 +156,7 @@ static int fimc_is_ischain_3ap_stop(struct fimc_is_device_ischain *device, goto p_err; } - if (otcrop->x || otcrop->y) { + if ((otcrop->x || otcrop->y) && (!paf_rdma_enable)) { mwarn("crop pos(%d, %d) is ignored", device, otcrop->x, otcrop->y); otcrop->x = 0; otcrop->y = 0; @@ -157,7 +165,7 @@ static int fimc_is_ischain_3ap_stop(struct fimc_is_device_ischain *device, dma_output = fimc_is_itf_g_param(device, frame, subdev->param_dma_ot); dma_output->cmd = DMA_OUTPUT_COMMAND_DISABLE; #ifdef USE_3AA_CROP_AFTER_BDS - if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) { + if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (!paf_rdma_enable)) { dma_output->width = otcrop->w; dma_output->height = otcrop->h; dma_output->crop_enable = 0;