Skip to content

Commit 96af683

Browse files
committed
drm/vc4_hdmi: Allow hotplug detect to be forced
See: https://forum.libreelec.tv/thread/24783-tv-avr-turns-back-on-right-after-turning-them-off While the kernel provides a :D flag for assuming device is connected, it doesn't stop this function from being called and generating a cec_phys_addr_invalidate message when hotplug is deasserted. That message provokes a flurry of CEC messages which for many users results in the TV switching back on again and it's very hard to get it to stay switched off. It seems to only occur with an AVR and TV connected but has been observed across a number of manufacturers. The issue started with raspberrypi#4371 and this provides an optional way of getting back the old behaviour Signed-off-by: Dom Cobley <[email protected]>
1 parent ea7fe1b commit 96af683

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#include <linux/component.h>
4141
#include <linux/gpio/consumer.h>
4242
#include <linux/i2c.h>
43+
#include <linux/module.h>
44+
#include <linux/moduleparam.h>
4345
#include <linux/of_address.h>
4446
#include <linux/of_gpio.h>
4547
#include <linux/of_platform.h>
@@ -113,6 +115,9 @@
113115

114116
#define HDMI_14_MAX_TMDS_CLK (340 * 1000 * 1000)
115117

118+
static int force_hotplug = 0;
119+
module_param(force_hotplug, int, 0644);
120+
116121
static const char * const output_format_str[] = {
117122
[VC4_HDMI_OUTPUT_RGB] = "RGB",
118123
[VC4_HDMI_OUTPUT_YUV420] = "YUV 4:2:0",
@@ -257,6 +262,9 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
257262
connected = true;
258263
}
259264

265+
if (force_hotplug)
266+
connected = true;
267+
260268
if (connected) {
261269
if (connector->status != connector_status_connected) {
262270
struct edid *edid = drm_get_edid(connector, vc4_hdmi->ddc);

0 commit comments

Comments
 (0)