summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-09 09:48:37 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 14:51:28 +0200
commit9972311643ac9c8f550272410a0cd4d6a2671eee (patch)
treec571fe79d79652ce59f4dd73b508866e75b2065b
parent25bccb98ae05c06edc0c31cb82e6bf105124855c (diff)
media: atomisp: make dfs_config_merr_117a struct const
This setting is used only for one of te Merryfield PCI IDs. As this is an ISP2400, we can just get rid of a version test, writing the right value directly inside the struct. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_v4l2.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index b5c3724047c5..9914e05d4fe4 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -217,7 +217,7 @@ static const struct atomisp_dfs_config dfs_config_merr_1179 = {
.dfs_table_size = ARRAY_SIZE(dfs_rules_merr_1179),
};
-static struct atomisp_freq_scaling_rule dfs_rules_merr_117a[] = {
+static const struct atomisp_freq_scaling_rule dfs_rules_merr_117a[] = {
{
.width = 1920,
.height = 1080,
@@ -229,11 +229,7 @@ static struct atomisp_freq_scaling_rule dfs_rules_merr_117a[] = {
.width = 1080,
.height = 1920,
.fps = 30,
- /*
- * FIXME: this is weird, but .isp_freq depends on
- * the chip being ISP2400 or ISP2401. So, this should be
- * initialized on runtime.
- */
+ .isp_freq = ISP_FREQ_266MHZ,
.run_mode = ATOMISP_RUN_MODE_VIDEO,
},
{
@@ -1629,15 +1625,6 @@ static int atomisp_pci_probe(struct pci_dev *dev,
isp->dfs = &dfs_config_merr_1179;
break;
case ATOMISP_PCI_DEVICE_SOC_MRFLD_117A:
- /*
- * FIXME: This should likely be uneeded. Either one
- * value is likely the correct one for this resolution
- */
- if (!atomisp_hw_is_isp2401)
- dfs_rules_merr_117a[1].isp_freq = ISP_FREQ_266MHZ;
- else
- dfs_rules_merr_117a[1].isp_freq = ISP_FREQ_400MHZ;
-
isp->dfs = &dfs_config_merr_117a;
break;