drm/rockchip: dw_hdmi: Don't set enable-gpio value when hdmi bind

If uboot logo is enabled and the enable-gpio value is
different from that in uboot, kernel logo will be displayed
abnormally. Therefore, we do not set the value of enable-gpio
when hdmi bind, but set it in encoder enable when hdmi is switched
after system boot. This method is also compatible with
scenarios that uboot logo is not enabled.

Change-Id: I238aeb63790b67414036e2c89382870ff575c4e5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2024-03-20 20:02:29 +08:00
committed by Tao Huang
parent 219d18bb9b
commit cd4db62ef0

View File

@@ -1654,7 +1654,7 @@ static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
}
hdmi->enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
GPIOD_OUT_HIGH);
GPIOD_ASIS);
if (IS_ERR(hdmi->enable_gpio)) {
ret = PTR_ERR(hdmi->enable_gpio);
dev_err(hdmi->dev, "failed to request enable GPIO: %d\n", ret);
@@ -1934,9 +1934,9 @@ static void dw_hdmi_rockchip_encoder_enable(struct drm_encoder *encoder)
if (hdmi->is_hdmi_qp) {
if (hdmi->link_cfg.frl_mode)
gpiod_set_value(hdmi->enable_gpio, 0);
gpiod_direction_output(hdmi->enable_gpio, 0);
else
gpiod_set_value(hdmi->enable_gpio, 1);
gpiod_direction_output(hdmi->enable_gpio, 1);
}
if (hdmi->chip_data->lcdsel_grf_reg < 0)