Re: HDMI on OMAP4460: clk rate mismatch warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/04/14 19:11, Joachim Eastwood wrote:
> On 16 April 2014 07:40, Tomi Valkeinen <tomi.valkeinen@xxxxxx> wrote:
>> On 15/04/14 20:36, Joachim Eastwood wrote:
>>> Hello,
>>>
>>> I am trying to get HDMI work with DT on my VAR-STK-OM44 (4460) board.
>>> But during kernel boot I get the following message:
>>>
>>> [ 0.953796] ------------[ cut here ]------------
>>> [ 0.953826] WARNING: CPU: 0 PID: 1 at
>>> drivers/video/omap2/dss/dss.c:483 dss_set_fck_rate+0x7c/0x8c()
>>> [ 0.953826] clk rate mismatch: 153600000 != 170666666
>>
>> I have a fix (attached) for this in fbdev-fixes, which I'll probably be
>> sending to Linus today. I couldn't send it in the main fbdev pull
>> request, as it depended on clk driver changes. And it's not fatal, most
>> likely things work fine even with the warning.
> 
> The warning disappeared after the patch. Thanks.
> Feel free to add: Tested-By: Joachim Eastwood <manabian@xxxxxxxxx>

Thanks. It should be in -rc2.

> This board (VAR-STK-OM44) has a TPD12S521 which has no controllable
> settings so adding a driver for it would be pretty meaningless. I
> think it's the same situation with Gumstix Parlor. That board also
> just have a very simple HDMI transmitter which shouldn't require a
> driver.
> 
> But never the less I got HDMI working on my board adding the tpd21s015
> nodes and providing a dummy gpio for "CT CP HPD". This works but it's
> a bit hacky.

Remove the tpd21s015 nodes and try the attached patch. It adds HPD
support to the hdmi connector. You also need something like this for the
hdmi-connector node:


pinctrl-names = "default";
pinctrl-0 = <&hdmi_conn_pins>;

hpd-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; /* GPIO 193, HPD */


And the respective pinctrl node:

hdmi_conn_pins: pinmux_hdmi_conn_pins {
        pinctrl-single,pins = <
                0x0fe (PIN_INPUT_PULLDOWN | MUX_MODE6)
        >;
};

Note that I tested this yesterday on one board, but I couldn't get it
working yet, so no promises =). But that may be an issue with the HPD
pin on the board.

> One other thing.
> Does HDMI audio work with DT or is that a still TODO?
> I am only getting probe deferral's from omap-hdmi-audio. Haven't look
> to far into it.

It's still on the works. If you volunteer for testing it (and Jyri needs
someone to test), you can ask Jyri Sarha.

 Tomi

From e004ca58936336f06339e216c1f4bd5f1e694932 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
Date: Thu, 17 Apr 2014 10:18:58 +0300
Subject: [PATCH] connector-hdmi: hpd support

---
 drivers/video/omap2/displays-new/connector-hdmi.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/video/omap2/displays-new/connector-hdmi.c b/drivers/video/omap2/displays-new/connector-hdmi.c
index 29ed21b9dce5..7b06ea430209 100644
--- a/drivers/video/omap2/displays-new/connector-hdmi.c
+++ b/drivers/video/omap2/displays-new/connector-hdmi.c
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <drm/drm_edid.h>
 
@@ -43,6 +44,8 @@ struct panel_drv_data {
 	struct device *dev;
 
 	struct omap_video_timings timings;
+
+	int hpd_gpio;
 };
 
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
@@ -161,7 +164,10 @@ static bool hdmic_detect(struct omap_dss_device *dssdev)
 	struct panel_drv_data *ddata = to_panel_data(dssdev);
 	struct omap_dss_device *in = ddata->in;
 
-	return in->ops.hdmi->detect(in);
+	if (gpio_is_valid(ddata->hpd_gpio))
+		return gpio_get_value_cansleep(ddata->hpd_gpio);
+	else
+		return in->ops.hdmi->detect(in);
 }
 
 static int hdmic_audio_enable(struct omap_dss_device *dssdev)
@@ -288,6 +294,8 @@ static int hdmic_probe_pdata(struct platform_device *pdev)
 
 	pdata = dev_get_platdata(&pdev->dev);
 
+	ddata->hpd_gpio = -ENODEV;
+
 	in = omap_dss_find_output(pdata->source);
 	if (in == NULL) {
 		dev_err(&pdev->dev, "Failed to find video source\n");
@@ -307,6 +315,14 @@ static int hdmic_probe_of(struct platform_device *pdev)
 	struct panel_drv_data *ddata = platform_get_drvdata(pdev);
 	struct device_node *node = pdev->dev.of_node;
 	struct omap_dss_device *in;
+	int gpio;
+
+	/* HPD GPIO */
+	gpio = of_get_named_gpio(node, "hpd-gpios", 0);
+	if (gpio_is_valid(gpio))
+		ddata->hpd_gpio = gpio;
+	else
+		ddata->hpd_gpio = -ENODEV;
 
 	in = omapdss_of_find_source_for_first_ep(node);
 	if (IS_ERR(in)) {
@@ -344,6 +360,11 @@ static int hdmic_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
+	r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio,
+			GPIOF_DIR_IN, "hdmi_hpd");
+	if (r)
+		return r;
+
 	ddata->timings = hdmic_default_timings;
 
 	dssdev = &ddata->dssdev;
-- 
1.8.3.2

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux