[PATCH] ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook 845 G8

2021-04-20 Thread Kai-Heng Feng
On HP EliteBook 845 G8, the audio LEDs can be enabled by ALC285_FIXUP_HP_MUTE_LED. So use it accordingly. In addition to that, the mic captures lots of noises, so also limits the mic boost. The quality of capture audio becomes crystal clear after limiting the mic boost. Signed-off-by: Kai-Heng

Re: [PATCH] efifb: Fix runtime pm calls for non PCI efifb device

2021-04-20 Thread Kai-Heng Feng
> ---[ end trace 17d8da630bf8ff77 ]--- > > Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b > > -->8 > > > > Fix the issue by checking for non-NULL efifb_pci_dev before dereferencing > > for runtime pm calls in probe and remove routin

Re: [PATCH] ACPI: PM: s2idle: Invoke _PTS for s2idle

2021-04-19 Thread Kai-Heng Feng
On Mon, Apr 19, 2021 at 7:35 PM Rafael J. Wysocki wrote: > > On Mon, Apr 19, 2021 at 11:08 AM Kai-Heng Feng > wrote: > > > > HP EliteBook 840 G8 reboots on s2idle resume, and HP EliteBook 845 G8 > > wakes up immediately on s2idle. Both are caused by the XMM7360 WWAN PC

Re: [PATCH v2] PCI: Disable D3cold support on Intel XMM7360

2021-04-19 Thread Kai-Heng Feng
On Mon, Apr 12, 2021 at 4:18 PM Kai-Heng Feng wrote: > > On Mon, Mar 29, 2021 at 1:23 PM Kai-Heng Feng > wrote: > > > > On some platforms, the root port for Intel XMM7360 WWAN supports D3cold. > > When the root port is put to D3cold by system suspend or runtime >

[PATCH] ACPI: PM: s2idle: Invoke _PTS for s2idle

2021-04-19 Thread Kai-Heng Feng
) } Return (Zero) } ... } So let's also invok _PTS for s2idle. Signed-off-by: Kai-Heng Feng --- drivers/acpi/sleep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 09fd13757b65..7e84b4b09919 100644

Re: [PATCH v2] nvme: Favor D3cold for suspend if NVMe device supports it

2021-04-19 Thread Kai-Heng Feng
On Mon, Apr 19, 2021 at 2:50 PM Christoph Hellwig wrote: > > On Fri, Apr 16, 2021 at 05:13:44PM +0800, Kai-Heng Feng wrote: > > On AMD platforms that use s2idle, NVMe timeouts on s2idle resume, > > because their SMU FW may cut off NVMe power during sleep. > > We're a

[PATCH v2] nvme: Favor D3cold for suspend if NVMe device supports it

2021-04-16 Thread Kai-Heng Feng
-email-prike.li...@amd.com/ Cc: Alex Deucher Cc: Prike Liang Cc: Shyam Sundar S K Signed-off-by: Kai-Heng Feng --- v2: - Typo. It's EliteBook 845, not EliteBook 840. drivers/nvme/host/pci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host

[PATCH] nvme: Favor D3cold for suspend if NVMe device supports it

2021-04-16 Thread Kai-Heng Feng
-email-prike.li...@amd.com/ Cc: Alex Deucher Cc: Prike Liang Cc: Shyam Sundar S K Signed-off-by: Kai-Heng Feng --- drivers/nvme/host/pci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 7249ae74f71f..cc190324a919 100644

[PATCH] drm/i915/dp: Use slow and wide link training for DPCP rev < 1.4

2021-04-14 Thread Kai-Heng Feng
med the new strategy doesn't introduce regression on XPS 9380. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3384 References: https://gitlab.freedesktop.org/drm/intel/-/issues/272 Signed-off-by: Kai-Heng Feng --- drivers/gpu/drm/i915/display/intel_dp.c | 10 +- 1 file changed

[PATCH] efifb: Check efifb_pci_dev before using it

2021-04-13 Thread Kai-Heng Feng
On some platforms like Hyper-V and RPi4 with UEFI firmware, efifb is not a PCI device. So make sure efifb_pci_dev is found before using it. Fixes: a6c0fd3d5a8b ("efifb: Ensure graphics device for efifb stays at PCI D0") BugLink: https://bugs.launchpad.net/bugs/1922403 Signed-off-by

[PATCH v3] USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet

2021-04-12 Thread Kai-Heng Feng
This is another branded 8153 device that doesn't work well with LPM enabled: [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 So disable LPM to resolve the issue. BugLink: https://bugs.launchpad.net/bugs/1922651 Signed-off-by: Kai-Heng Feng --- v3: - _Really_ put the quirk

Re: [PATCH v2] USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet

2021-04-12 Thread Kai-Heng Feng
On Mon, Apr 12, 2021 at 9:09 PM Johan Hovold wrote: > > On Mon, Apr 12, 2021 at 09:05:20PM +0800, Kai-Heng Feng wrote: > > This is another branded 8153 device that doesn't work well with LPM > > enabled: > > [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -7

[PATCH v2] USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet

2021-04-12 Thread Kai-Heng Feng
This is another branded 8153 device that doesn't work well with LPM enabled: [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 So disable LPM to resolve the issue. BugLink: https://bugs.launchpad.net/bugs/1922651 Signed-off-by: Kai-Heng Feng --- v2: - Put the quirk in the right

[PATCH] USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet

2021-04-12 Thread Kai-Heng Feng
This is another branded 8153 device that doesn't work well with LPM enabled: [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 So disable LPM to resolve the issue. BugLink: https://bugs.launchpad.net/bugs/1922651 Signed-off-by: Kai-Heng Feng --- drivers/usb/core/quirks.c | 3 +++ 1

Re: [PATCH v2] PCI: Disable D3cold support on Intel XMM7360

2021-04-12 Thread Kai-Heng Feng
On Mon, Mar 29, 2021 at 1:23 PM Kai-Heng Feng wrote: > > On some platforms, the root port for Intel XMM7360 WWAN supports D3cold. > When the root port is put to D3cold by system suspend or runtime > suspend, attempt to systems resume or runtime resume will freeze the > lap

[PATCH v2] PCI: Coalesce contiguous regions for host bridges

2021-04-01 Thread Kai-Heng Feng
-by: Bjorn Helgaas Signed-off-by: Kai-Heng Feng --- v2: - Coalesce all contiguous regresion in pci_register_host_bridge(), if conditions are met. drivers/pci/probe.c | 49 + 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/drivers/pci

Re: [PATCH] PCI: Try to find two continuous regions for child resource

2021-03-31 Thread Kai-Heng Feng
On Tue, Mar 30, 2021 at 12:23 AM Bjorn Helgaas wrote: > > On Mon, Mar 29, 2021 at 04:47:59PM +0800, Kai-Heng Feng wrote: > > Built-in grahpics on HP EliteDesk 805 G6 doesn't work because graphics > > can't get the BAR it needs: > > [0.611504] pci_bus :00

[PATCH] PCI: Try to find two continuous regions for child resource

2021-03-29 Thread Kai-Heng Feng
region if two regions are continuous and can contain child resource. This change makes the grahpics works on the system in question. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212013 Signed-off-by: Kai-Heng Feng --- arch/microblaze/pci/pci-common.c | 4 +-- arch/powerpc/kernel/pci

[PATCH v2] PCI: Disable D3cold support on Intel XMM7360

2021-03-28 Thread Kai-Heng Feng
, as the Intel XMM7360 doesn't have a driver yet. So disable D3cold for XMM7360 as a workaround, until proper device driver is in place. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212419 Signed-off-by: Kai-Heng Feng --- v2: - Add comment. drivers/pci/quirks.c | 13 + 1 file

[PATCH v3 1/2] ALSA: usb-audio: Carve out connector value checking into a helper

2021-03-25 Thread Kai-Heng Feng
This is preparation for next patch, no functional change intended. Signed-off-by: Kai-Heng Feng --- v3: - No change. v2: - Only return early when ret < 0. sound/usb/mixer.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sound/

[PATCH v3 2/2] ALSA: usb-audio: Check connector value on resume

2021-03-25 Thread Kai-Heng Feng
connector, and a new callback, reset_resume, to also restore switches and volumes. Suggested-by: Takashi Iwai Signed-off-by: Kai-Heng Feng --- v3: - New callback to handle resume and reset-resume separately. v2: - Remove reset-resume. - Fold the connector checking to the mixer resume callback.

Re: [PATCH v2 2/2] ALSA: usb-audio: Check connector value on resume

2021-03-25 Thread Kai-Heng Feng
On Thu, Mar 25, 2021 at 9:55 PM Kai-Heng Feng wrote: > > On Thu, Mar 25, 2021 at 9:41 PM Takashi Iwai wrote: > > > > On Thu, 25 Mar 2021 13:12:48 +0100, > > Kai-Heng Feng wrote: > > > > > > Rear Mic on Lenovo P620 cannot record after S3, despite tha

Re: [PATCH v2 2/2] ALSA: usb-audio: Check connector value on resume

2021-03-25 Thread Kai-Heng Feng
On Thu, Mar 25, 2021 at 9:41 PM Takashi Iwai wrote: > > On Thu, 25 Mar 2021 13:12:48 +0100, > Kai-Heng Feng wrote: > > > > Rear Mic on Lenovo P620 cannot record after S3, despite that there's no > > error and the other two functions of the USB audio, Line In and L

[PATCH v2 2/2] ALSA: usb-audio: Check connector value on resume

2021-03-25 Thread Kai-Heng Feng
ve reset-resume path to consolidate mixer resume path. Signed-off-by: Kai-Heng Feng --- v2: - Remove reset-resume. - Fold the connector checking to the mixer resume callback. sound/usb/card.c | 16 +++- sound/usb/mixer.c | 27 +++ sound/usb/mixer.h | 2 +- 3 files ch

[PATCH v2 1/2] ALSA: usb-audio: Carve out connector value checking into a helper

2021-03-25 Thread Kai-Heng Feng
This is preparation for next patch, no functional change intended. Signed-off-by: Kai-Heng Feng --- v2: - Only return early when ret < 0. sound/usb/mixer.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sound/usb/mixer.c b/sound/

Re: [PATCH 2/2] ALSA: usb-audio: Check connector value on resume

2021-03-25 Thread Kai-Heng Feng
On Thu, Mar 25, 2021 at 3:19 PM Takashi Iwai wrote: > > On Wed, 24 Mar 2021 18:14:08 +0100, > Kai-Heng Feng wrote: > > > > Rear Mic on Lenovo P620 cannot record after S3, despite that there's no > > error and the other two functions of the USB audio, Line In and L

[PATCH 2/2] ALSA: usb-audio: Check connector value on resume

2021-03-24 Thread Kai-Heng Feng
at as soon as connector status is queried, the mic can work again. So also check connector value on resume to "wake up" the USB audio to make it functional. This can be device specific, however I think this generic approach may benefit more than one device. Signed-off-by: Kai-Heng Feng --

[PATCH 1/2] ALSA: usb-audio: Carve out connector value checking into a helper

2021-03-24 Thread Kai-Heng Feng
This is preparation for next patch, no functional change intended. Signed-off-by: Kai-Heng Feng --- sound/usb/mixer.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index b004b2e63a5d..98f5417a70e4

[PATCH] PCI: Disable D3cold support on Intel XMM7360

2021-03-24 Thread Kai-Heng Feng
, as the Intel XMM7360 doesn't have a driver yet. So disable D3cold for XMM7360 as a workaround, until proper device driver is in place. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212419 Signed-off-by: Kai-Heng Feng --- drivers/pci/quirks.c | 7 +++ 1 file changed, 7 insertions

Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot"

2021-03-19 Thread Kai-Heng Feng
On Fri, Mar 19, 2021 at 3:02 AM Josef Bacik wrote: > > On 3/18/21 1:42 AM, Kai-Heng Feng wrote: > > On Thu, Mar 18, 2021 at 1:25 AM Josef Bacik wrote: > > [snipped] > >> "shutdown now" works fine with and without your patch. Thanks, > > >

Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot"

2021-03-17 Thread Kai-Heng Feng
On Thu, Mar 18, 2021 at 1:25 AM Josef Bacik wrote: [snipped] > "shutdown now" works fine with and without your patch. Thanks, Rafael, Please revert the patch while we are working on it. Josef, Can you please test the following patch: diff --git a/kernel/reboot.c b/kernel/reboot.c index

Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot"

2021-03-17 Thread Kai-Heng Feng
On Wed, Mar 17, 2021 at 11:19 PM Josef Bacik wrote: > > On 3/16/21 10:50 PM, Kai-Heng Feng wrote: > > Hi, > > > > On Wed, Mar 17, 2021 at 10:17 AM Josef Bacik wrote: > >> > >> This reverts commit d60cd06331a3566d3305b3c7b566e79edf4e2095. > >> &g

Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot"

2021-03-16 Thread Kai-Heng Feng
Hi, On Wed, Mar 17, 2021 at 10:17 AM Josef Bacik wrote: > > This reverts commit d60cd06331a3566d3305b3c7b566e79edf4e2095. > > This patch causes a panic when rebooting my Dell Poweredge r440. I do > not have the full panic log as it's lost at that stage of the reboot and > I do not have a serial

Re: [PATCH] ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend()

2021-03-04 Thread Kai-Heng Feng
Hi Joakim, On Thu, Mar 4, 2021 at 5:50 PM Joakim Tjernlund wrote: > > On Thu, 2021-03-04 at 12:34 +0800, Kai-Heng Feng wrote: > > Rear audio on Lenovo ThinkStation P620 stops working after commit > > 1965c4364bdd ("ALSA: usb-audio: Disable autosuspend for Lenov

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-03-03 Thread Kai-Heng Feng
On Sat, Feb 27, 2021 at 2:17 AM Bjorn Helgaas wrote: > > On Fri, Feb 26, 2021 at 02:31:31PM +0100, Heiner Kallweit wrote: > > On 26.02.2021 13:18, Kai-Heng Feng wrote: > > > On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit > > > wrote: > > >> &g

[PATCH] ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend()

2021-03-03 Thread Kai-Heng Feng
nd balance the suspend count in disconnect callback. Fixes: 1965c4364bdd ("ALSA: usb-audio: Disable autosuspend for Lenovo ThinkStation P620") Signed-off-by: Kai-Heng Feng --- sound/usb/card.c | 5 + sound/usb/quirks.c | 2 +- sound/usb/usbaudio.h | 1 + 3 files changed

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Kai-Heng Feng
On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit wrote: > > On 26.02.2021 08:12, Kalle Valo wrote: > > Kai-Heng Feng writes: > > > >> Now we have a generic D3 shutdown quirk, so convert the original > >> approach to a PCI quirk. > >> > >> Si

[PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-25 Thread Kai-Heng Feng
Now we have a generic D3 shutdown quirk, so convert the original approach to a PCI quirk. Signed-off-by: Kai-Heng Feng --- drivers/net/wireless/realtek/rtw88/pci.c | 2 -- drivers/pci/quirks.c | 6 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 2/3] PCI: Set AMD Renoir USB controller to D3 when shutdown

2021-02-25 Thread Kai-Heng Feng
ler works fine after power on and reboot. Signed-off-by: Aaron Ma Signed-off-by: Kai-Heng Feng --- drivers/pci/quirks.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 1f94fafc6920..0a848ef0b7db 100644 --- a/drivers/pci/quirks.c +++ b/

[PATCH 1/3] PCI: Introduce quirk hook after driver shutdown callback

2021-02-25 Thread Kai-Heng Feng
It can be useful to apply quirk after device shutdown callback, like putting device into a different power state. This will be used by later patches. Signed-off-by: Aaron Ma Signed-off-by: Kai-Heng Feng --- drivers/pci/pci-driver.c | 2 ++ drivers/pci/quirks.c | 7

Re: [PATCH] efifb: Ensure graphics device for efifb stays at PCI D0

2021-02-21 Thread Kai-Heng Feng
On Mon, Feb 1, 2021 at 11:21 PM Alex Deucher wrote: > > On Sat, Jan 30, 2021 at 6:27 AM Kai-Heng Feng > wrote: > > > > We are seeing root ports on some desktop boards support D3cold for > > discrete graphics card. So when efifb is in use while graphics device >

Re: [PATCH] xhci-pci: Set AMD Renoir USB controller to D3 when shutdown

2021-02-21 Thread Kai-Heng Feng
On Fri, Feb 19, 2021 at 4:07 PM Aaron Ma wrote: > > > > On 2/11/21 8:50 PM, Greg Kroah-Hartman wrote: > > On Wed, Feb 10, 2021 at 03:13:30PM +0200, Mathias Nyman wrote: > >> On 9.2.2021 10.37, Greg Kroah-Hartman wrote: > >>> On Fri, Feb 05, 2021 a

Re: [PATCH 1/2] PCI/AER: Disable AER interrupt during suspend

2021-02-05 Thread Kai-Heng Feng
On Fri, Feb 5, 2021 at 7:28 AM Bjorn Helgaas wrote: > > [+cc Alex] > > On Thu, Jan 28, 2021 at 12:09:37PM +0800, Kai-Heng Feng wrote: > > On Thu, Jan 28, 2021 at 4:51 AM Bjorn Helgaas wrote: > > > On Thu, Jan 28, 2021 at 01:31:00AM +0800, Kai-Heng Feng wrote: > >

Re: [PATCH] xhci-pci: Set AMD Renoir USB controller to D3 when shutdown

2021-02-04 Thread Kai-Heng Feng
On Fri, Feb 5, 2021 at 2:45 PM Aaron Ma wrote: > > > On 2/5/21 12:27 PM, Kai-Heng Feng wrote: > > Can you please test the following patch, which should address the root > > cause: > > https://lore.kernel.org/linux-acpi/20201201213019.1558738-1-furq...@google.com/ &g

Re: [PATCH] xhci-pci: Set AMD Renoir USB controller to D3 when shutdown

2021-02-04 Thread Kai-Heng Feng
On Thu, Feb 4, 2021 at 1:20 PM Aaron Ma wrote: > > On AMD Renoir/Cezanne platforms, when set "Always on USB" to "On" in BIOS, > USB controller will consume more power than 0.03w. > > Set it to D3cold when shutdown, S5 power consumption will be 0.03w lower. > The USB can charge other devices as

Re: [PATCH] drivers: core: Detach device from power domain on shutdown

2021-02-03 Thread Kai-Heng Feng
On Thu, Feb 4, 2021 at 12:09 PM Furquan Shaikh wrote: > > On Wed, Feb 3, 2021 at 6:37 PM Kai-Heng Feng > wrote: > > > > Hi Furquan, > > > > On Wed, Jan 13, 2021 at 10:31 PM Dmitry Osipenko wrote: > > [snipped] > > > Thank you all for addres

Re: [PATCH] drivers: core: Detach device from power domain on shutdown

2021-02-03 Thread Kai-Heng Feng
Hi Furquan, On Wed, Jan 13, 2021 at 10:31 PM Dmitry Osipenko wrote: [snipped] > Thank you all for addressing this problem! Are you still working on the alternate solution? This patch can address S5 power consumption issue for some laptops:

Re: [PATCH] rtw88: 8821c: Add RFE 2 support

2021-02-01 Thread Kai-Heng Feng
On Tue, Feb 2, 2021 at 3:02 PM Larry Finger wrote: > > On 2/2/21 12:29 AM, Kalle Valo wrote: > > Kai-Heng Feng writes: > > > >> On Wed, Aug 5, 2020 at 7:24 PM Kai-Heng Feng > >> wrote: > >>> > >>> Hi Tony, > >>> > >&g

[PATCH v2] r8169: Add support for another RTL8168FP

2021-02-01 Thread Kai-Heng Feng
According to the vendor driver, the new chip with XID 0x54b is essentially the same as the one with XID 0x54a, but it doesn't need the firmware. So add support accordingly. Signed-off-by: Kai-Heng Feng --- v2: - Add phy support. - Rebase on net-next. drivers/net/ethernet/realtek/r8169.h

Re: [PATCH] r8169: Add support for another RTL8168FP

2021-02-01 Thread Kai-Heng Feng
On Tue, Feb 2, 2021 at 2:54 AM Heiner Kallweit wrote: > > On 01.02.2021 17:47, Kai-Heng Feng wrote: > > According to the vendor driver, the new chip with XID 0x54b is > > essentially the same as the one with XID 0x54a, but it doesn't need the > > firmware. > >

[PATCH] r8169: Add support for another RTL8168FP

2021-02-01 Thread Kai-Heng Feng
According to the vendor driver, the new chip with XID 0x54b is essentially the same as the one with XID 0x54a, but it doesn't need the firmware. So add support accordingly. Signed-off-by: Kai-Heng Feng --- drivers/net/ethernet/realtek/r8169.h | 1 + drivers/net/ethernet/realtek

Re: [PATCH] PM: sleep: core: Resume suspended device if direct-complete is disabled

2021-01-28 Thread Kai-Heng Feng
On Thu, Jan 28, 2021 at 4:09 PM Takashi Iwai wrote: > > On Thu, 31 Dec 2020 07:03:19 +0100, > Kai-Heng Feng wrote: > > > > HDA controller can't be runtime-suspended after commit 215a22ed31a1 > > ("ALSA: hda: Refactor codjc PM to use direct-complete optimiza

Re: [PATCH 1/2] PCI/AER: Disable AER interrupt during suspend

2021-01-27 Thread Kai-Heng Feng
On Thu, Jan 28, 2021 at 4:51 AM Bjorn Helgaas wrote: > > On Thu, Jan 28, 2021 at 01:31:00AM +0800, Kai-Heng Feng wrote: > > Commit 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in > > hint") enables ACS, and some platforms lose its NVMe af

[PATCH 2/2] PCI/DPC: Disable DPC interrupt during suspend

2021-01-27 Thread Kai-Heng Feng
em suspend and resume, respectively. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209149 Fixes: 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in hint") Signed-off-by: Kai-Heng Feng --- drivers/pci/pcie/dpc.c | 49 -- 1 file changed,

[PATCH 1/2] PCI/AER: Disable AER interrupt during suspend

2021-01-27 Thread Kai-Heng Feng
and enable it on system suspend and resume, respectively. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209149 Fixes: 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in hint") Signed-off-by: Kai-Heng Feng --- drivers/pci/pcie/aer.c | 18 ++ 1 file ch

[PATCH] ACPI / device_sysfs: Prefer "compatible" modalias

2021-01-22 Thread Kai-Heng Feng
pull/18163 Cc: AceLan Kao Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Cc: Andy Shevchenko Suggested-by: Mika Westerberg Fixes: 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") Signed-off-by: Kai-Heng Feng --- drivers/acpi/device_

Re: [PATCH] ACPI / device_sysfs: Use OF_MODALIAS for "compatible" modalias

2021-01-20 Thread Kai-Heng Feng
On Tue, Jan 19, 2021 at 6:34 PM Greg Kroah-Hartman wrote: > > On Tue, Jan 19, 2021 at 11:41:59AM +0200, Andy Shevchenko wrote: > > On Tue, Jan 19, 2021 at 04:41:48PM +0800, Kai-Heng Feng wrote: > > > On Tue, Jan 19, 2021 at 4:27 PM Greg Kroah-Hartman > > > wrote

Re: [PATCH] HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices

2021-01-20 Thread Kai-Heng Feng
On Tue, Jan 19, 2021 at 1:45 AM Kai-Heng Feng wrote: > > Hi, > > On Mon, Jan 18, 2021 at 10:41 PM Benjamin Tissoires > wrote: > > > > Hi, > > > > On Mon, Jan 18, 2021 at 2:45 PM Kai-Heng Feng > > wrote: > > > > > > Palm e

[PATCH v2] ALSA: hda: Balance runtime/system PM if direct-complete is disabled

2021-01-19 Thread Kai-Heng Feng
R. Crudup Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- v2: - Use pm_runtime_force_*() helpers to avoid suspend/resume ping pong. sound/pci/hda/hda_codec.c | 24 +++- 1 file changed, 7 inserti

[PATCH v2] ACPI / device_sysfs: Use OF_MODALIAS for "compatible" modalias

2021-01-19 Thread Kai-Heng Feng
d/systemd/pull/18163 Fixes: 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") Signed-off-by: Kai-Heng Feng --- v2: Add a comment to document why it's changed. drivers/acpi/device_sysfs.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

Re: [PATCH] ACPI / device_sysfs: Use OF_MODALIAS for "compatible" modalias

2021-01-19 Thread Kai-Heng Feng
On Tue, Jan 19, 2021 at 4:27 PM Greg Kroah-Hartman wrote: > > On Tue, Jan 19, 2021 at 04:15:13PM +0800, Kai-Heng Feng wrote: > > Commit 8765c5ba1949 ("ACPI / scan: Rework modalias creation when > > "compatible" is present") may create two "MODALIAS

[PATCH] ACPI / device_sysfs: Use OF_MODALIAS for "compatible" modalias

2021-01-19 Thread Kai-Heng Feng
d/systemd/pull/18163 Fixes: 8765c5ba1949 ("ACPI / scan: Rework modalias creation when "compatible" is present") Cc: AceLan Kao Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , Cc: Mika Westerberg , Cc: Andy Shevchenko Signed-off-by: Kai-Heng Feng --- drivers/

Re: [PATCH] HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices

2021-01-18 Thread Kai-Heng Feng
Hi, On Mon, Jan 18, 2021 at 10:41 PM Benjamin Tissoires wrote: > > Hi, > > On Mon, Jan 18, 2021 at 2:45 PM Kai-Heng Feng > wrote: > > > > Palm ejection stops working on some Elan and Synaptics touchpad after > > commit 40d5bb87377a ("HID: multitouch: enab

Re: [PATCH] ALSA: hda: Balance runtime/system PM if direct-complete is disabled

2021-01-18 Thread Kai-Heng Feng
On Mon, Jan 18, 2021 at 9:21 PM Takashi Iwai wrote: > > On Mon, 18 Jan 2021 14:09:36 +0100, > Kai-Heng Feng wrote: > > > > HDA controller can't be runtime-suspended after commit 215a22ed31a1 > > ("ALSA: hda: Refactor codjc PM to use direct-complete optimiza

[PATCH] HID: multitouch: Apply MT_QUIRK_CONFIDENCE quirk for multi-input devices

2021-01-18 Thread Kai-Heng Feng
ymore. So also apply the quirk since MT_CLS_WIN_8_FORCE_MULTI_INPUT is essentially MT_CLS_WIN_8. Fixes: 40d5bb87377a ("HID: multitouch: enable multi-input as a quirk for some devices") Signed-off-by: Kai-Heng Feng --- drivers/hid/hid-multitouch.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH] ALSA: hda: Balance runtime/system PM if direct-complete is disabled

2021-01-18 Thread Kai-Heng Feng
to keep PM operations balanced. Reported-by: Kenneth R. Crudup Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- sound/pci/hda/hda_codec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/sound/pci/hda/hda

Re: Multiple MODALIAS= in uevent file confuses userspace

2021-01-17 Thread Kai-Heng Feng
On Sat, Jan 9, 2021 at 12:25 AM Kai-Heng Feng wrote: > > Commit 8765c5ba19490 ("ACPI / scan: Rework modalias creation when > "compatible" is present") creates two modaliases for certain ACPI > devices. However userspace (systemd-udevd in this case) assumes ueven

[PATCH v4 2/3] ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN

2021-01-12 Thread Kai-Heng Feng
Modify hda_codec_jack_wake_enable() to also support disable WAKEEN. In addition, this patch also moves the WAKEEN disablement call out of hda_codec_jack_check() into hda_codec_jack_wake_enable(). This is a preparation for next patch. No functional change intended. Signed-off-by: Kai-Heng Feng

[PATCH v4 3/3] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2021-01-12 Thread Kai-Heng Feng
an already suspended codec from audio controller. So avoid the issue by making sure jackpoll isn't used in system PM process. Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- v4: Clarify why direct-complete path isn

[PATCH v4 1/3] ASoC: SOF: Intel: hda: Resume codec to do jack detection

2021-01-12 Thread Kai-Heng Feng
nce is SOF unconditionally resumes the codec. Signed-off-by: Kai-Heng Feng --- v4: No change. v3: Remove wrong assumption that only Realtek codec is used by SOF. v2: No change. sound/soc/sof/intel/hda-codec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sof

Re: [PATCH v3 1/4] ALSA: hda/realtek: Power up codec when setting LED via COEF and GPIO

2021-01-12 Thread Kai-Heng Feng
On Tue, Jan 12, 2021 at 9:17 PM Takashi Iwai wrote: > > On Tue, 12 Jan 2021 14:06:59 +0100, > Kai-Heng Feng wrote: > > > > System takes a very long time to suspend after commit 215a22ed31a1 > > ("ALSA: hda: Refactor codec PM to use direct-complete optimization&q

[PATCH v3 3/4] ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN

2021-01-12 Thread Kai-Heng Feng
Modify hda_codec_jack_wake_enable() to also support disable WAKEEN. In addition, this patch also moves the WAKEEN disablement call out of hda_codec_jack_check() into hda_codec_jack_wake_enable(). This is a preparation for next patch. No functional change intended. --- v3: No change. v2:

[PATCH v3 4/4] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2021-01-12 Thread Kai-Heng Feng
When runtime resume is for system suspend, hda_codec_jack_check() schedules jackpoll_work which uses snd_hdac_is_power_on() to check whether codec is suspended. If we were to use snd_hdac_is_power_on() in system PM path, pm_runtime_status_suspended() should be used instead of

[PATCH v3 2/4] ASoC: SOF: Intel: hda: Resume codec to do jack detection

2021-01-12 Thread Kai-Heng Feng
Instead of queueing jackpoll_work, runtime resume the codec to let it use different jack detection methods based on jackpoll_interval. This partially matches SOF driver's behavior with commit a6e7d0a4bdb0 ("ALSA: hda: fix jack detection with Realtek codecs when in D3"), the difference is SOF

[PATCH v3 1/4] ALSA: hda/realtek: Power up codec when setting LED via COEF and GPIO

2021-01-12 Thread Kai-Heng Feng
System takes a very long time to suspend after commit 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization"): [ 90.065964] PM: suspend entry (s2idle) [ 90.067337] Filesystems sync: 0.001 seconds [ 90.185758] Freezing user space processes ... (elapsed 0.002 seconds)

Re: [PATCH v2 1/2] thermal: int340x: Fix unexpected shutdown at critical temperature

2021-01-11 Thread Kai-Heng Feng
On Tue, Dec 22, 2020 at 1:23 AM Kai-Heng Feng wrote: > > We are seeing thermal shutdown on Intel based mobile workstations, the > shutdown happens during the first trip handle in > thermal_zone_device_register(): > kernel: thermal thermal_zone15: critical temperature reached (101

Multiple MODALIAS= in uevent file confuses userspace

2021-01-08 Thread Kai-Heng Feng
Commit 8765c5ba19490 ("ACPI / scan: Rework modalias creation when "compatible" is present") creates two modaliases for certain ACPI devices. However userspace (systemd-udevd in this case) assumes uevent file doesn't have duplicated keys, so two "MODALIAS=" breaks the assumption. Based on the

Re: [PATCH v2 3/3] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2021-01-07 Thread Kai-Heng Feng
On Tue, Jan 5, 2021 at 8:28 PM Kai Vehmanen wrote: > > Hey, > > On Mon, 4 Jan 2021, Kai-Heng Feng wrote: > > > System takes a very long time to suspend after commit 215a22ed31a1 > > ("ALSA: hda: Refactor codec PM to use direct-complete optimization"): > &g

Re: [PATCH] rtw88: 8821c: Add RFE 2 support

2021-01-06 Thread Kai-Heng Feng
On Wed, Aug 5, 2020 at 7:24 PM Kai-Heng Feng wrote: > > Hi Tony, > > > On Aug 5, 2020, at 19:18, Tony Chuang wrote: > > > >> 8821CE with RFE 2 isn't supported: > >> [ 12.404834] rtw_8821ce :02:00.0: rfe 2 isn't supported > >> [ 12.40493

Re: [PATCH v2 1/3] ASoC: SOF: Intel: hda: Resume codec to do jack detection

2021-01-06 Thread Kai-Heng Feng
On Tue, Jan 5, 2021 at 9:00 PM Kai Vehmanen wrote: > > Hi, > > On Mon, 4 Jan 2021, Kai-Heng Feng wrote: > > > Instead of queueing jackpoll_work, runtime resume the codec to let it > > use different jack detection methods based on jackpoll_interval. > > hmm, but ja

[PATCH v2 2/3] ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN

2021-01-04 Thread Kai-Heng Feng
Modify hda_codec_jack_wake_enable() to also support disable WAKEEN. In addition, this patch also moves the WAKEEN disablement call out of hda_codec_jack_check() into hda_codec_jack_wake_enable(). This is a preparation for next patch. No functional change intended. Signed-off-by: Kai-Heng Feng

[PATCH v2 1/3] ASoC: SOF: Intel: hda: Resume codec to do jack detection

2021-01-04 Thread Kai-Heng Feng
ltek codec, we don't need any additional check for the resume. Signed-off-by: Kai-Heng Feng --- v2: No change. sound/soc/sof/intel/hda-codec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 68

[PATCH v2 3/3] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2021-01-04 Thread Kai-Heng Feng
PM process. Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- v2: No change. sound/soc/sof/intel/hda-dsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda-dsp.c b/sou

Re: [PATCH 2/2] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2021-01-04 Thread Kai-Heng Feng
On Fri, Jan 1, 2021 at 4:07 PM Takashi Iwai wrote: > > On Thu, 31 Dec 2020 19:06:43 +0100, > Kai-Heng Feng wrote: > > > > On Thu, Dec 31, 2020 at 6:55 PM Takashi Iwai wrote: > > > > > > On Tue, 29 Dec 2020 14:38:15 +0100, > > > Kai-Heng Feng wrot

Re: [PATCH 1/2] ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN

2020-12-31 Thread Kai-Heng Feng
On Thu, Dec 31, 2020 at 6:52 PM Takashi Iwai wrote: > > On Tue, 29 Dec 2020 14:38:14 +0100, > Kai-Heng Feng wrote: > > > > Modify hda_codec_jack_wake_enable() to also support disable WAKEEN. > > This is a preparation for next patch. > > > > No functional

Re: [PATCH 2/2] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2020-12-31 Thread Kai-Heng Feng
On Thu, Dec 31, 2020 at 6:55 PM Takashi Iwai wrote: > > On Tue, 29 Dec 2020 14:38:15 +0100, > Kai-Heng Feng wrote: > > > > System takes a very long time to suspend after commit 215a22ed31a1 > > ("ALSA: hda: Refactor codec PM to use direct-complete optimization&q

[PATCH] PM: sleep: core: Resume suspended device if direct-complete is disabled

2020-12-30 Thread Kai-Heng Feng
"ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- drivers/base/power/main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 46793276598d..9c0e25a92ad0 100644 --- a/drive

[PATCH] ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7

2020-12-30 Thread Kai-Heng Feng
HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED to enable mute and micmute LED. So apply the quirk to enable the LEDs. Signed-off-by: Kai-Heng Feng --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound

[PATCH] HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device

2020-12-30 Thread Kai-Heng Feng
Pointstick and its left/right buttons on HP EliteBook 850 G7 need multi-input quirk to work correctly. Signed-off-by: Kai-Heng Feng --- drivers/hid/hid-multitouch.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index

[PATCH 2/2] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

2020-12-29 Thread Kai-Heng Feng
PM process. Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- sound/soc/sof/intel/hda-dsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/i

[PATCH 1/2] ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN

2020-12-29 Thread Kai-Heng Feng
Modify hda_codec_jack_wake_enable() to also support disable WAKEEN. This is a preparation for next patch. No functional change intended. Signed-off-by: Kai-Heng Feng --- sound/soc/sof/intel/hda-codec.c | 16 +++- sound/soc/sof/intel/hda-dsp.c | 6 -- sound/soc/sof/intel

Re: Time to re-enable Runtime PM per default for PCI devcies?

2020-12-29 Thread Kai-Heng Feng
On Sat, Dec 26, 2020 at 11:26 PM Heiner Kallweit wrote: > > On 17.11.2020 17:57, Rafael J. Wysocki wrote: > > On Tue, Nov 17, 2020 at 5:38 PM Bjorn Helgaas wrote: > >> > >> [+to Rafael, author of the commit you mentioned, > >> +cc Mika, Kai Heng, Lukas, linux-pm, linux-kernel] > >> > >> On Tue,

Re: [PATCH] ALSA: hda: Resume codec for system suspend if LED is controlled by codec

2020-12-28 Thread Kai-Heng Feng
On Sat, Dec 26, 2020 at 3:46 PM Takashi Iwai wrote: > > On Fri, 25 Dec 2020 17:47:23 +0100, > Kai-Heng Feng wrote: > > > > Laptop with codec controlled LEDs takes a very long time to suspend > > after commit 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use

[PATCH] ALSA: hda: Resume codec for system suspend if LED is controlled by codec

2020-12-25 Thread Kai-Heng Feng
d to solve the problem. Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Signed-off-by: Kai-Heng Feng --- include/sound/hda_codec.h | 1 + sound/pci/hda/hda_codec.c | 7 +++ sound/pci/hda/hda_generic.c | 1 + 3 files changed, 9 insertions(+)

Re: [Nouveau] [PATCH v2] ALSA: hda: Continue to probe when codec probe fails

2020-12-21 Thread Kai-Heng Feng
On Tue, Dec 22, 2020 at 1:56 AM Ilia Mirkin wrote: > > On Mon, Dec 21, 2020 at 11:33 AM Kai-Heng Feng > wrote: > > > > [+Cc nouveau] > > > > On Fri, Dec 18, 2020 at 4:06 PM Takashi Iwai wrote: > > [snip] > > > > Quite possibly the

[PATCH v2 2/2] thermal: intel: pch: Fix unexpected shutdown at critical temperature

2020-12-21 Thread Kai-Heng Feng
Like previous patch, the intel_pch_thermal device is not in ACPI ThermalZone namespace, so a critical trip doesn't mean shutdown. Override the default .critical callback to prevent surprising thermal shutdoown. Signed-off-by: Kai-Heng Feng --- v2: - Amend subject. drivers/thermal/intel

[PATCH v2 1/2] thermal: int340x: Fix unexpected shutdown at critical temperature

2020-12-21 Thread Kai-Heng Feng
ssive cooling method. As int340x device isn't present under ACPI ThermalZone, override the default .critical callback to prevent surprising thermal shutdown. Signed-off-by: Kai-Heng Feng --- v2: - Amend subject. - Remove int3400 device. .../thermal/intel/int340x_thermal/int340x_thermal_zone.c

Re: [PATCH v2] ALSA: hda: Continue to probe when codec probe fails

2020-12-21 Thread Kai-Heng Feng
On Tue, Dec 22, 2020 at 12:47 AM Takashi Iwai wrote: [snip] > But what happens if you plug the HDMI cable later and want to use the > HDMI audio? It won't work with your fix, right? No it won't. It's possible to fix from nouveau, but it's at the mercy of Nvidia to fix their proprietary driver,

Re: [PATCH 1/2] thermal: int340x: Add critical callback to override default shutdown behavior

2020-12-21 Thread Kai-Heng Feng
On Tue, Dec 22, 2020 at 12:55 AM Srinivas Pandruvada wrote: > > On Mon, 2020-12-21 at 21:52 +0800, Kai-Heng Feng wrote: > > We are seeing thermal shutdown on Intel based mobile workstations, > > the > > shutdown happens during the first trip handle in > >

Re: [PATCH v2] ALSA: hda: Continue to probe when codec probe fails

2020-12-21 Thread Kai-Heng Feng
[+Cc nouveau] On Fri, Dec 18, 2020 at 4:06 PM Takashi Iwai wrote: [snip] > > Quite possibly the system doesn't power up HDA controller when there's > > no external monitor. > > So when it's connected to external monitor, it's still needed for HDMI > > audio. > > Let me ask the user to confirm

  1   2   3   4   5   6   7   8   9   10   >