Skip to content

RFC Coordinate pmic i2c bus and i915 punit accesses

Hans de Goede intel-gfx linux-i2c 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/platform/intel/iosf_mbi: Add a mutex for punit accessarch/x86/include/asm/iosf_mbi.h arch/x86/platform/intel/iosf_mbi.c+32 -010 replies
2/4i2c: designware-baytrail: Take punit lock on bus acquiredrivers/i2c/busses/i2c-designware-baytrail.c+4 -00 replies
3/4drm/i915: valleyview: Make intel_set_rps get FORCEWAKE_MEDIAdrivers/gpu/drm/i915/intel_pm.c+7 -210 replies
4/4drm/i915: valleyview: Take punit lock when modifying punit settingsdrivers/gpu/drm/i915/Kconfig drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_pm.c +1 more+37 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/4] Coordinate pmic i2c bus and i915 punit accesses

Hi,

So one user is reporting problems with my patches to get the i2c pmic bus (cherrytrail punit semaphore support) + axp288 fuel_gauge / charger drivers working in combination with i915:

https://bugzilla.kernel.org/show_bug.cgi?id=155241#c37

"My device is a laptop with no USB charging or OTG. So, I'd tried only SDIO _ADR patch, i2c and axp288_fuel_gauge patches. Everything works well for upto 3 mins after boot, then the device freezes. I hadn't tried any drm patches BTW. Here's the log:

[drm:fw_domains_get [i915]] *ERROR* render: timed out waiting for forcewake ack request. [drm:fw_domains_get [i915]] *MEDIA* render: timed out waiting for forcewake ack request. [drm:fw_domains_get [i915]] *ERROR* render: timed out waiting for forcewake ack request. [drm:fw_domains_get [i915]] *MEDIA* render: timed out waiting for forcewake ack request.

clocksource: timekeeping watchdog on CPU0: Marking clocksource 'tsc' as unstable because the skew is too large:
clocksource:                       'refined-jiffies' wd_now: 10002ee30 wd_last: 10002edb8 mask: ffffffff
clocksource:                       'tsc' cs_now: 16ac2c7744a cs_last: 16a8d9bd8f2 mask: ffffffffffffffff
clocksource: Switched to clocksource refined-jiffies
usb 1-2: reset high-speed USB device number 2 using xhci_hcd

i2c_designware 808622C1:06: punit semaphore timed out, resetting i2c_designware 808622C1:06: PUNIT SEM: 2
i2c_designware 808622C1:06: couldn't acquire bus ownership axp288_fuel_gauge axp288_fuel_gauge: axp288 reg read err:-110 axp288_fuel_gauge axp288_fuel_gauge: PWR STAT read failed:-110
usb 1-2: reset high-speed USB device number 2 using xhci_hcd
usb 1-2: reset high-speed USB device number 2 using xhci_hcd
usb 1-2: reset high-speed USB device number 2 using xhci_hcd i2c_designware 808622C1:06: punit semaphore timed out, resetting i2c_designware 808622C1:06: PUNIT SEM: 0
i2c_designware 808622C1:06: couldn't acquire bus ownership axp288_fuel_gauge axp288_fuel_gauge: IIO channel read error: fffffffb, 0 power_supply axp288_fuel_gauge: driver failed to report `voltage_now' property: -5 ***SYSTEM FREEZE***

If I blacklist axp288_fuel_gauge, then there were no errors."

This sounds a lot like things go wrong when the i915 driver asks some changes from the punit while i2c-designware-baytrail is holding the pmic i2c bus semaphore, just like changing C-states while holding the semaphore seems to lock up the punit,

So this patch-set is an attempt at fixing that. I'm still waiting for the reporter to report back if it actually fixes things, in the mean time any input on this issue (or the proposed fix) is welcome.

Note the i2c-designware-baytrail patch applies on top of v5 of my i2c-designware series, which I will send out directly after this.

Regards,

Hans