Public bug reported:

[Impact]
Boots up the system and sometimes we can see below messages and that leads to 
backlight driver doesn't get loaded.

[   86.424880] dell_uart_backlight:dell_uart_get_display_mode:tx: 6a 10 85
[   86.603936] [7439] dell_uart_backlight:dell_uart_get_display_mode:rx: NULL
[   87.596047] dell_uart_backlight:dell_uart_get_display_mode:tx: 6a 10 85
[   87.775209] [7439] dell_uart_backlight:dell_uart_get_display_mode:rx: NULL

[Fix]
After applying this patch, it appears that the read() command sometimes fails 
to receive a response, even when increasing the retry times. This could be due 
to our use of a spin lock to lock the UART port in the read() function, 
preventing us from calling read() immediately after a write() function.

fbf84fb368923 ("UBUNTU: SAUCE: platform/x86: dell-uart-backlight:
replace chars_in_buffer() with flush_chars()")

To fix this we only need a small delay after the write() function to
make it has time to clear its buffer.

[Test case]
1. Add dell_uart_backlight.dyndbg="+pt" to the kernel cmdline
2. Boots up the system and check dmesg
3. Make sure there is no dell_uart_backlight rx NULL message in dmesg
4. Try to unload/reload dell_uart_backlight couple times and check dmesg again

[Where problems could occur]
sleep for 1ms is pretty short that it's not possible to lead to messages loss.

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: AceLan Kao (acelankao)
         Status: In Progress

** Affects: linux-oem-6.5 (Ubuntu)
     Importance: Undecided
         Status: Invalid

** Affects: linux (Ubuntu Jammy)
     Importance: Undecided
         Status: Invalid

** Affects: linux-oem-6.5 (Ubuntu Jammy)
     Importance: Undecided
     Assignee: AceLan Kao (acelankao)
         Status: In Progress

** Affects: linux (Ubuntu Mantic)
     Importance: Undecided
     Assignee: AceLan Kao (acelankao)
         Status: In Progress

** Affects: linux-oem-6.5 (Ubuntu Mantic)
     Importance: Undecided
         Status: Invalid

** Also affects: linux-oem-6.5 (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: linux-oem-6.5 (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Mantic)
   Importance: Undecided
       Status: New

** Also affects: linux-oem-6.5 (Ubuntu Mantic)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu Jammy)
       Status: New => Invalid

** Changed in: linux-oem-6.5 (Ubuntu Mantic)
       Status: New => Invalid

** Changed in: linux (Ubuntu Mantic)
     Assignee: (unassigned) => AceLan Kao (acelankao)

** Changed in: linux-oem-6.5 (Ubuntu Jammy)
     Assignee: (unassigned) => AceLan Kao (acelankao)

** Changed in: linux (Ubuntu Mantic)
       Status: New => In Progress

** Changed in: linux-oem-6.5 (Ubuntu Jammy)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2035299

Title:
  dell-uart-backlight fails to communicate with the scalar IC somtimes.

Status in linux package in Ubuntu:
  In Progress
Status in linux-oem-6.5 package in Ubuntu:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-oem-6.5 source package in Jammy:
  In Progress
Status in linux source package in Mantic:
  In Progress
Status in linux-oem-6.5 source package in Mantic:
  Invalid

Bug description:
  [Impact]
  Boots up the system and sometimes we can see below messages and that leads to 
backlight driver doesn't get loaded.

  [   86.424880] dell_uart_backlight:dell_uart_get_display_mode:tx: 6a 10 85
  [   86.603936] [7439] dell_uart_backlight:dell_uart_get_display_mode:rx: NULL
  [   87.596047] dell_uart_backlight:dell_uart_get_display_mode:tx: 6a 10 85
  [   87.775209] [7439] dell_uart_backlight:dell_uart_get_display_mode:rx: NULL

  [Fix]
  After applying this patch, it appears that the read() command sometimes fails 
to receive a response, even when increasing the retry times. This could be due 
to our use of a spin lock to lock the UART port in the read() function, 
preventing us from calling read() immediately after a write() function.

  fbf84fb368923 ("UBUNTU: SAUCE: platform/x86: dell-uart-backlight:
  replace chars_in_buffer() with flush_chars()")

  To fix this we only need a small delay after the write() function to
  make it has time to clear its buffer.

  [Test case]
  1. Add dell_uart_backlight.dyndbg="+pt" to the kernel cmdline
  2. Boots up the system and check dmesg
  3. Make sure there is no dell_uart_backlight rx NULL message in dmesg
  4. Try to unload/reload dell_uart_backlight couple times and check dmesg again

  [Where problems could occur]
  sleep for 1ms is pretty short that it's not possible to lead to messages loss.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2035299/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to