[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <37f290eeb7f0c26b93fe34223d45d1bbce3e8e0c.1591303518.git.mchehab+huawei@kernel.org>
Date: Thu, 4 Jun 2020 22:47:04 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 4/5] media: atomisp: change clock source default for ISP2401
There's a notice there stating that the PLL is not reliable
for CHT. Yet, it tries to read it via the BIOS. Well,
this will fail (at least with the devices I checked the
DSDT tables). So, change the logic in a way that it will
change the default, depending on the ISP version.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
.../media/atomisp/pci/atomisp_gmin_platform.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
index cb02806274d1..a14326111b26 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c
@@ -493,9 +493,23 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
gmin_subdevs[i].subdev = subdev;
gmin_subdevs[i].clock_num = gmin_get_var_int(dev, false, "CamClk", 0);
- /*WA:CHT requires XTAL clock as PLL is not stable.*/
+ /*
+ * FIXME:
+ * WA:CHT requires XTAL clock as PLL is not stable.
+ *
+ * However, such data doesn't seem to be present at the _DSM
+ * table under the GUID dc2f6c4f-045b-4f1d-97b9-882a6860a4be.
+ * So, let's change the default according with the ISP version,
+ * but allowing it to be overridden by BIOS or by DMI match tables.
+ */
+ if (IS_ISP2401)
+ gmin_subdevs[i].clock_src = VLV2_CLK_XTAL_25_0MHz;
+ else
+ gmin_subdevs[i].clock_src = VLV2_CLK_PLL_19P2MHZ;
+
gmin_subdevs[i].clock_src = gmin_get_var_int(dev, false, "ClkSrc",
- VLV2_CLK_PLL_19P2MHZ);
+ gmin_subdevs[i].clock_src);
+
gmin_subdevs[i].csi_port = gmin_get_var_int(dev, false, "CsiPort", 0);
gmin_subdevs[i].csi_lanes = gmin_get_var_int(dev, false, "CsiLanes", 1);
--
2.26.2
Powered by blists - more mailing lists