]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
UBUNTU: SAUCE: platform/x86: dell-uart-backlight: increase retry times
authorAceLan Kao <acelan.kao@canonical.com>
Wed, 12 Feb 2020 06:53:15 +0000 (14:53 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 04:39:40 +0000 (23:39 -0500)
BugLink: https://bugs.launchpad.net/bugs/1862885
From ODM, scalar takes some time to activate panel during booting up,
it can't respond the UART commands within 1 seconds.
So, we add retry and wait 2 seconds for the response. But sometimes it
still fails to read the response.
During the boot up time, it sometimes takes more than 2 seconds to respond
the first command, so we enlarge the retry timeout from 2 seconds to 5
seconds to make sure we get the first response from scalar.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Acked-By: You-Sheng Yang <vicamo.yang@canonical.com>
Acked-by: Anthony Wong <anthony.wong@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/platform/x86/dell-uart-backlight.c

index 76e9a60a9388d1ba5c24705328e7f941e525d147..bddc4f228bf9fef35cd778d87aa171d5e094d62d 100644 (file)
@@ -318,7 +318,7 @@ static int dell_uart_get_scalar_status(struct dell_uart_backlight *dell_pdata)
        struct dell_uart_bl_cmd *bl_cmd = &uart_cmd[DELL_UART_GET_SCALAR];
        struct uart_8250_port *uart = serial8250_get_port(dell_pdata->line);
        int rx_len;
-       int status = 0, retry = 20;
+       int status = 0, retry = 50;
 
        dell_uart_dump_cmd(__func__, "tx: ", bl_cmd->cmd, bl_cmd->tx_len);