Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 972805c1 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'omapdrm-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next

omapdrm changes for 4.15

* OMAP4 HDMI CEC support

* tag 'omapdrm-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  omapdrm: omapdss_hdmi_ops: add lost_hotplug op
  omapdrm: hdmi4: hook up the HDMI CEC support
  omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support
  omapdrm: hdmi4: refcount hdmi_power_on/off_core
  omapdrm: hdmi4: move hdmi4_core_powerdown_disable to hdmi_power_on_core()
  omapdrm: hdmi4: prepare irq handling for HDMI CEC support
  omapdrm: hdmi4: make low-level functions available
  omapdrm: hdmi.h: extend hdmi_core_data with CEC fields
  omapdrm: encoder-tpd12s015: keep ls_oe_gpio high
parents d0f6d401 019114ef
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -165,11 +165,15 @@ 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;
	bool connected;

	if (gpio_is_valid(ddata->hpd_gpio))
		return gpio_get_value_cansleep(ddata->hpd_gpio);
		connected = gpio_get_value_cansleep(ddata->hpd_gpio);
	else
		return in->ops.hdmi->detect(in);
		connected = in->ops.hdmi->detect(in);
	if (!connected && in->ops.hdmi->lost_hotplug)
		in->ops.hdmi->lost_hotplug(in);
	return connected;
}

static int hdmic_register_hpd_cb(struct omap_dss_device *dssdev,
+9 −9
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@ static int tpd_connect(struct omap_dss_device *dssdev,
	dssdev->dst = dst;

	gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
	gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1);

	/* DC-DC converter needs at max 300us to get to 90% of 5V */
	udelay(300);

@@ -69,6 +71,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
		return;

	gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
	gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);

	dst->src = NULL;
	dssdev->dst = NULL;
@@ -146,25 +149,22 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
{
	struct panel_drv_data *ddata = to_panel_data(dssdev);
	struct omap_dss_device *in = ddata->in;
	int r;

	if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
		return -ENODEV;

	gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1);

	r = in->ops.hdmi->read_edid(in, edid, len);

	gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);

	return r;
	return in->ops.hdmi->read_edid(in, edid, len);
}

static bool tpd_detect(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *ddata = to_panel_data(dssdev);
	struct omap_dss_device *in = ddata->in;
	bool connected = gpiod_get_value_cansleep(ddata->hpd_gpio);

	return gpiod_get_value_cansleep(ddata->hpd_gpio);
	if (!connected && in->ops.hdmi->lost_hotplug)
		in->ops.hdmi->lost_hotplug(in);
	return connected;
}

static int tpd_register_hpd_cb(struct omap_dss_device *dssdev,
+8 −0
Original line number Diff line number Diff line
@@ -65,6 +65,14 @@ config OMAP4_DSS_HDMI
	help
	  HDMI support for OMAP4 based SoCs.

config OMAP4_DSS_HDMI_CEC
	bool "Enable HDMI CEC support for OMAP4"
	depends on OMAP4_DSS_HDMI
	select CEC_CORE
	default y
	---help---
	  When selected the HDMI transmitter will support the CEC feature.

config OMAP5_DSS_HDMI
	bool "HDMI support for OMAP5"
	default n
+1 −0
Original line number Diff line number Diff line
@@ -14,5 +14,6 @@ omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
omapdss-$(CONFIG_OMAP2_DSS_HDMI_COMMON) += hdmi_common.o hdmi_wp.o hdmi_pll.o \
	hdmi_phy.o
omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi4.o hdmi4_core.o
omapdss-$(CONFIG_OMAP4_DSS_HDMI_CEC) += hdmi4_cec.o
omapdss-$(CONFIG_OMAP5_DSS_HDMI) += hdmi5.o hdmi5_core.o
ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG
+6 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/platform_device.h>
#include <linux/hdmi.h>
#include <sound/omap-hdmi-audio.h>
#include <media/cec.h>

#include "omapdss.h"
#include "dss.h"
@@ -264,6 +265,10 @@ struct hdmi_core_data {
	void __iomem *base;
	bool cts_swmode;
	bool audio_use_mclk;

	struct hdmi_wp_data *wp;
	unsigned int core_pwr_cnt;
	struct cec_adapter *adap;
};

static inline void hdmi_write_reg(void __iomem *base_addr, const u32 idx,
@@ -373,7 +378,7 @@ struct omap_hdmi {
	bool audio_configured;
	struct omap_dss_audio audio_config;

	/* This lock should be taken when booleans bellow are touched. */
	/* This lock should be taken when booleans below are touched. */
	spinlock_t audio_playing_lock;
	bool audio_playing;
	bool display_enabled;
Loading