Commit 4a62b5cc authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: get rid of ISP2401_NEW_INPUT_SYSTEM

All ISP2401 devices use the new input system. So, get rid
of the remaining definitions, replacing them by runtime
checks for BYT/CHT when applicable.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 62596705
...@@ -301,10 +301,8 @@ INCLUDES += \ ...@@ -301,10 +301,8 @@ INCLUDES += \
-I$(atomisp)/pci/runtime/rmgr/interface/ \ -I$(atomisp)/pci/runtime/rmgr/interface/ \
-I$(atomisp)/pci/runtime/spctrl/interface/ \ -I$(atomisp)/pci/runtime/spctrl/interface/ \
-I$(atomisp)/pci/runtime/tagger/interface/ \ -I$(atomisp)/pci/runtime/tagger/interface/ \
-I$(atomisp)/pci/css_2400_system/hive/ \
-I$(atomisp)/pci/css_2401_system/ \ -I$(atomisp)/pci/css_2401_system/ \
-I$(atomisp)/pci/css_2401_system/host/ \ -I$(atomisp)/pci/css_2401_system/host/ \
-I$(atomisp)/pci/css_2401_system/hive/ \
-I$(atomisp)/pci/css_2401_system/hrt/ -I$(atomisp)/pci/css_2401_system/hrt/
DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__ DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__
...@@ -319,7 +317,7 @@ ifeq ($(CONFIG_VIDEO_ATOMISP_ISP2401),y) ...@@ -319,7 +317,7 @@ ifeq ($(CONFIG_VIDEO_ATOMISP_ISP2401),y)
atomisp-objs += \ atomisp-objs += \
$(obj-cht) \ $(obj-cht) \
pci/runtime/isys/src/ibuf_ctrl_rmgr.o pci/runtime/isys/src/ibuf_ctrl_rmgr.o
DEFINES += -DISP2401 -DISP2401_NEW_INPUT_SYSTEM DEFINES += -DISP2401
endif endif
ccflags-y += $(INCLUDES) $(DEFINES) -fno-common ccflags-y += $(INCLUDES) $(DEFINES) -fno-common
...@@ -5156,11 +5156,11 @@ static int css_input_resolution_changed(struct atomisp_sub_device *asd, ...@@ -5156,11 +5156,11 @@ static int css_input_resolution_changed(struct atomisp_sub_device *asd,
dev_dbg(asd->isp->dev, "css_input_resolution_changed to %ux%u\n", dev_dbg(asd->isp->dev, "css_input_resolution_changed to %ux%u\n",
ffmt->width, ffmt->height); ffmt->width, ffmt->height);
#if defined(ISP2401_NEW_INPUT_SYSTEM) if (IS_ISP2401)
atomisp_css_input_set_two_pixels_per_clock(asd, false); atomisp_css_input_set_two_pixels_per_clock(asd, false);
#else else
atomisp_css_input_set_two_pixels_per_clock(asd, true); atomisp_css_input_set_two_pixels_per_clock(asd, true);
#endif
if (asd->continuous_mode->val) { if (asd->continuous_mode->val) {
/* Note for all checks: ffmt includes pad_w+pad_h */ /* Note for all checks: ffmt includes pad_w+pad_h */
if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO || if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO ||
...@@ -5494,9 +5494,14 @@ static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd, ...@@ -5494,9 +5494,14 @@ static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd,
static void atomisp_check_copy_mode(struct atomisp_sub_device *asd, static void atomisp_check_copy_mode(struct atomisp_sub_device *asd,
int source_pad, struct v4l2_pix_format *f) int source_pad, struct v4l2_pix_format *f)
{ {
#if defined(ISP2401_NEW_INPUT_SYSTEM)
struct v4l2_mbus_framefmt *sink, *src; struct v4l2_mbus_framefmt *sink, *src;
if (!IS_ISP2401) {
/* Only used for the new input system */
asd->copy_mode = false;
return;
}
sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL, sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
V4L2_SUBDEV_FORMAT_ACTIVE, ATOMISP_SUBDEV_PAD_SINK); V4L2_SUBDEV_FORMAT_ACTIVE, ATOMISP_SUBDEV_PAD_SINK);
src = atomisp_subdev_get_ffmt(&asd->subdev, NULL, src = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
...@@ -5510,8 +5515,6 @@ static void atomisp_check_copy_mode(struct atomisp_sub_device *asd, ...@@ -5510,8 +5515,6 @@ static void atomisp_check_copy_mode(struct atomisp_sub_device *asd,
sensor[asd->sensor_curr].stream_num > 1))) sensor[asd->sensor_curr].stream_num > 1)))
asd->copy_mode = true; asd->copy_mode = true;
else else
#endif
/* Only used for the new input system */
asd->copy_mode = false; asd->copy_mode = false;
dev_dbg(asd->isp->dev, "copy_mode: %d\n", asd->copy_mode); dev_dbg(asd->isp->dev, "copy_mode: %d\n", asd->copy_mode);
......
...@@ -972,7 +972,7 @@ int atomisp_css_irq_translate(struct atomisp_device *isp, ...@@ -972,7 +972,7 @@ int atomisp_css_irq_translate(struct atomisp_device *isp,
void atomisp_css_rx_get_irq_info(enum mipi_port_id port, void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
unsigned int *infos) unsigned int *infos)
{ {
#ifndef ISP2401_NEW_INPUT_SYSTEM #ifndef IS_ISP2401
ia_css_isys_rx_get_irq_info(port, infos); ia_css_isys_rx_get_irq_info(port, infos);
#else #else
*infos = 0; *infos = 0;
...@@ -982,7 +982,7 @@ void atomisp_css_rx_get_irq_info(enum mipi_port_id port, ...@@ -982,7 +982,7 @@ void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
void atomisp_css_rx_clear_irq_info(enum mipi_port_id port, void atomisp_css_rx_clear_irq_info(enum mipi_port_id port,
unsigned int infos) unsigned int infos)
{ {
#ifndef ISP2401_NEW_INPUT_SYSTEM #ifndef IS_ISP2401
ia_css_isys_rx_clear_irq_info(port, infos); ia_css_isys_rx_clear_irq_info(port, infos);
#endif #endif
} }
......
...@@ -464,13 +464,11 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd) ...@@ -464,13 +464,11 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
css_capture_pipe_id = IA_CSS_PIPE_ID_CAPTURE; css_capture_pipe_id = IA_CSS_PIPE_ID_CAPTURE;
} }
#ifdef ISP2401_NEW_INPUT_SYSTEM if (IS_ISP2401 && asd->copy_mode) {
if (asd->copy_mode) {
css_capture_pipe_id = IA_CSS_PIPE_ID_COPY; css_capture_pipe_id = IA_CSS_PIPE_ID_COPY;
css_preview_pipe_id = IA_CSS_PIPE_ID_COPY; css_preview_pipe_id = IA_CSS_PIPE_ID_COPY;
css_video_pipe_id = IA_CSS_PIPE_ID_COPY; css_video_pipe_id = IA_CSS_PIPE_ID_COPY;
} }
#endif
if (asd->yuvpp_mode) { if (asd->yuvpp_mode) {
capture_pipe = &asd->video_out_capture; capture_pipe = &asd->video_out_capture;
......
...@@ -1635,12 +1635,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i ...@@ -1635,12 +1635,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
pdev->d3cold_delay = 0; pdev->d3cold_delay = 0;
break; break;
case ATOMISP_PCI_DEVICE_SOC_ANN: case ATOMISP_PCI_DEVICE_SOC_ANN:
isp->media_dev.hw_revision = ( isp->media_dev.hw_revision = ( ATOMISP_HW_REVISION_ISP2401
#ifdef ISP2401_NEW_INPUT_SYSTEM
ATOMISP_HW_REVISION_ISP2401
#else
ATOMISP_HW_REVISION_ISP2401_LEGACY
#endif
<< ATOMISP_HW_REVISION_SHIFT); << ATOMISP_HW_REVISION_SHIFT);
isp->media_dev.hw_revision |= pdev->revision < 2 ? isp->media_dev.hw_revision |= pdev->revision < 2 ?
ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0; ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
...@@ -1648,12 +1643,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i ...@@ -1648,12 +1643,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
isp->hpll_freq = HPLL_FREQ_1600MHZ; isp->hpll_freq = HPLL_FREQ_1600MHZ;
break; break;
case ATOMISP_PCI_DEVICE_SOC_CHT: case ATOMISP_PCI_DEVICE_SOC_CHT:
isp->media_dev.hw_revision = ( isp->media_dev.hw_revision = ( ATOMISP_HW_REVISION_ISP2401
#ifdef ISP2401_NEW_INPUT_SYSTEM
ATOMISP_HW_REVISION_ISP2401
#else
ATOMISP_HW_REVISION_ISP2401_LEGACY
#endif
<< ATOMISP_HW_REVISION_SHIFT); << ATOMISP_HW_REVISION_SHIFT);
isp->media_dev.hw_revision |= pdev->revision < 2 ? isp->media_dev.hw_revision |= pdev->revision < 2 ?
ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0; ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment