mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
ODROID: aml_media: Add disablehpd module_param.
Change-Id: I2fa0889eb7a1e05aa5245e2aceaddb9c161c2709
This commit is contained in:
@@ -3233,6 +3233,10 @@ static int hdmitx_tmds_cedst(struct hdmitx_dev *hdev)
|
||||
return scdc21_status_flags(hdev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_MESON_ODROID_COMMON
|
||||
extern char *disablehpd;
|
||||
#endif
|
||||
|
||||
static int hdmitx_cntl_misc(struct hdmitx_hw_common *tx_hw, u32 cmd,
|
||||
u32 argv)
|
||||
{
|
||||
@@ -3263,7 +3267,16 @@ static int hdmitx_cntl_misc(struct hdmitx_hw_common *tx_hw, u32 cmd,
|
||||
argv = HPD_UNMUX_HPD;
|
||||
return hdmitx21_hpd_hw_op(argv);
|
||||
case MISC_HPD_GPI_ST:
|
||||
#ifdef CONFIG_ARCH_MESON_ODROID_COMMON
|
||||
if (!strcmp(disablehpd, "true")) {
|
||||
HDMITX_INFO(HW "disablehpd = %s\n", disablehpd);
|
||||
return 1;
|
||||
} else {
|
||||
return hdmitx21_hpd_hw_op(HPD_READ_HPD_GPIO);
|
||||
}
|
||||
#else
|
||||
return hdmitx21_hpd_hw_op(HPD_READ_HPD_GPIO);
|
||||
#endif
|
||||
case MISC_TRIGGER_HPD:
|
||||
if (argv == 1)
|
||||
hdmitx21_wr_reg(HDMITX_TOP_INTR_STAT, 1 << 1);
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
#include <linux/amlogic/media/vout/hdmi_tx_ext.h>
|
||||
#include "common.h"
|
||||
|
||||
#ifdef CONFIG_ARCH_MESON_ODROID_COMMON
|
||||
char *disablehpd = "false";
|
||||
module_param(disablehpd, charp, 0644);
|
||||
MODULE_PARM_DESC(disablehpd, "\n disablehpd\n");
|
||||
#endif
|
||||
|
||||
static void intr2_sw_handler(struct intr_t *);
|
||||
static void intr5_sw_handler(struct intr_t *);
|
||||
static void top_hpd_intr_stub_handler(struct intr_t *);
|
||||
@@ -278,6 +284,17 @@ void hdmitx_top_intr_handler(struct work_struct *work)
|
||||
else
|
||||
dat_top &= ~(1 << 1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_MESON_ODROID_COMMON
|
||||
if (!strcmp(disablehpd, "true")) {
|
||||
HDMITX_INFO(HW "disablehpd = %s\n", disablehpd);
|
||||
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGIN;
|
||||
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGOUT;
|
||||
hdmitx21_wr_reg(HDMITX_TOP_INTR_STAT_CLR, dat_top | 0x6);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* bit[2:1] of dat_top means HPD falling and rising */
|
||||
if ((dat_top & 0x6) && hdev->tx_hw.base.hdmitx_gpios_hpd >= 0) {
|
||||
struct timespec64 kts;
|
||||
@@ -517,4 +534,14 @@ void hdmitx_setupirqs(struct hdmitx_dev *phdev)
|
||||
if (r != 0)
|
||||
HDMITX_INFO(SYS "can't request emp_vsync irq\n");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_MESON_ODROID_COMMON
|
||||
if (!strcmp(disablehpd, "true")) {
|
||||
HDMITX_INFO(HW "disablehpd = %s\n", disablehpd);
|
||||
phdev->hdmitx_event |= HDMI_TX_HPD_PLUGIN;
|
||||
phdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGOUT;
|
||||
queue_delayed_work(phdev->hdmi_intr_wq,
|
||||
&phdev->work_hpd_plugin, HZ / 3);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user