~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel:topic/designware-baytrail

Last commit made on 2017-03-02
Get this branch:
git clone -b topic/designware-baytrail https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel
Members of Ubuntu Kernel Test can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
topic/designware-baytrail
Repository:
lp:~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel

Recent commits

264ec1a... by Hans de Goede <email address hidden>

drm/i915: Listen for PMIC bus access notifications

Listen for PMIC bus access notifications and get FORCEWAKE_ALL while
the bus is accessed to avoid needing to do any forcewakes, which need
PMIC bus access, while the PMIC bus is busy:

This fixes errors like these showing up in dmesg, usually followed
by a gfx or system freeze:

[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.
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

Downside of this approach is that it causes wakeups whenever the PMIC
bus is accessed. Unfortunately we cannot simply wait for the PMIC bus
to go idle when we hit a race, as forcewakes may be done from interrupt
handlers where we cannot sleep to wait for the i2c PMIC bus access to
finish.

Note that the notifications and thus the wakeups will only happen on
baytrail / cherrytrail devices using PMICs with a shared i2c bus for
P-Unit and host PMIC access (i2c busses with a _SEM method in their
APCI node), e.g. an axp288 PMIC.

I plan to write some patches for drivers accessing the PMIC bus to
limit their bus accesses to a bare minimum (e.g. cache registers, do not
update battery level more often then 4 times a minute), to limit the
amount of wakeups.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241
Signed-off-by: Hans de Goede <email address hidden>
Tested-by: tagorereddy <email address hidden>
Reviewed-by: Ville Syrjälä <email address hidden>
[danvet: Wiggle in conflicts.]
Signed-off-by: Daniel Vetter <email address hidden>

68f6094... by Hans de Goede <email address hidden>

drm/i915: Add intel_uncore_suspend / resume functions

Rename intel_uncore_early_sanitize to intel_uncore_resume, dropping the
(always true) restore_forcewake argument and add a new intel_uncore_resume
function to replace the intel_uncore_forcewake_reset(dev_priv, false)
calls done from the suspend / runtime_suspend functions and make
intel_uncore_forcewake_reset private.

This is a preparation patch for adding PMIC bus access notifier support.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241
Signed-off-by: Hans de Goede <email address hidden>
Tested-by: tagorereddy <email address hidden>
Reviewed-by: Ville Syrjälä <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

d93a6ed... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Call pmic_bus_access_notifier_chain

Call the iosf_mbi pmic_bus_access_notifier_chain on bus acquire / release.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241
Signed-off-by: Hans de Goede <email address hidden>
Tested-by: tagorereddy <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

5b2cacc... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Acquire P-Unit access on bus acquire

Acquire P-Unit access to stop others from accessing the P-Unit while the
PMIC i2c bus is in use. This is necessary because accessing the P-Unit
from the kernel may result in the P-Unit trying to access the PMIC i2c
bus, which results in a hang when it happens while we own the PMIC i2c
bus semaphore.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=155241
Signed-off-by: Hans de Goede <email address hidden>
Tested-by: tagorereddy <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

fd476fa... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Add support for cherrytrail

The cherrytrail punit has the pmic i2c bus access semaphore at a
different register address.

Signed-off-by: Hans de Goede <email address hidden>
Reviewed-by: Takashi Iwai <email address hidden>
Tested-by: Takashi Iwai <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

519e23a... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Fix race when resetting the semaphore

Use iosf_mbi_modify instead of iosf_mbi_read + iosf_mbi_write so that
we keep the iosf_mbi_lock locked during the read-modify-write done to
reset the semaphore.

Signed-off-by: Hans de Goede <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

086cb4a... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Disallow the CPU to enter C6 or C7 while holding the punit semaphore

On my cherrytrail tablet with axp288 pmic, just doing a bunch of repeated
reads from the pmic, e.g. "i2cdump -y 14 0x34" would lookup the tablet in
1 - 3 runs guaranteed.

This seems to be causes by the cpu trying to enter C6 or C7 while we hold
the punit bus semaphore, at which point everything just hangs.

Avoid this by disallowing the CPU to enter C6 or C7 before acquiring the
punit bus semaphore.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=109051
Signed-off-by: Hans de Goede <email address hidden>
Tested-by: Takashi Iwai <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

e234ed2... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts

If (!shared_host) simply return 0, this avoids delaying the probe if
iosf_mbi_available() returns false when an i2c bus is not using the
punit semaphore.

Also move the if (!iosf_mbi_available()) check to above the
dev_info, so that we do not repeat the dev_info on every probe
until iosf_mbi_available() returns true.

Signed-off-by: Hans de Goede <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Tested-by: Takashi Iwai <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

62aee93... by Hans de Goede <email address hidden>

i2c: designware-baytrail: Pass dw_i2c_dev into helper functions

Pass dw_i2c_dev into the helper functions, this is a preparation patch
for the punit semaphore fixes done in the other patches in this set.

Signed-off-by: Hans de Goede <email address hidden>
Reviewed-by: Takashi Iwai <email address hidden>
Tested-by: Takashi Iwai <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>

86524e5... by Hans de Goede <email address hidden>

i2c: designware: Rename accessor_flags to flags

Rename accessor_flags to flags, so that we can use the field for
other flags too. This is a preparation patch for adding cherrytrail
support to the punit semaphore code.

Signed-off-by: Hans de Goede <email address hidden>
Reviewed-by: Andy Shevchenko <email address hidden>
Acked-by: Jarkko Nikula <email address hidden>
Tested-by: Takashi Iwai <email address hidden>
Acked-by: Wolfram Sang <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork<email address hidden>