~vicamo/+git/ubuntu-kernel:bug-1868936/implement-tccold/unstable

Last commit made on 2020-04-21
Get this branch:
git clone -b bug-1868936/implement-tccold/unstable https://git.launchpad.net/~vicamo/+git/ubuntu-kernel
Only You-Sheng Yang can upload to this branch. If you are You-Sheng Yang please log in for upload directions.

Branch merges

Branch information

Name:
bug-1868936/implement-tccold/unstable
Repository:
lp:~vicamo/+git/ubuntu-kernel

Recent commits

fbac446... by You-Sheng Yang

Bug 1868936: Fix TC port in legacy/static mode not detected due TCCOLD

d153196... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/tc: Do not warn when aux power well of static TC ports timeout

This is a expected timeout of static TC ports not conneceted, so
not throwing warnings that would taint CI.

v3:
- moved checks to tc_phy_aux_timeout_expected()

v4:
- moved and add comments to tc_phy_aux_timeout_expected()

v5:
- only checking tc_legacy_port for TC ports

Signed-off-by: José Roberto de Souza <email address hidden>
Reviewed-by: Imre Deak <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit 0f8925090ac7ad451ed9e803662ebe3214dc8072)
Signed-off-by: You-Sheng Yang <email address hidden>

9843dee... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/tc: Catch TC users accessing FIA registers without enable aux

As described in "drm/i915/tc/icl: Implement TC cold sequences" users
of TC functions should held aux power well during access to avoid
read garbage due HW in TC cold state.

v3:
- renamed is_tc_cold_blocked() to assert_tc_cold_blocked()
- restored the removed 0xffffffff checks

Reviewed-by: Imre Deak <email address hidden>
Tested-by: You-Sheng Yang <email address hidden>
Signed-off-by: José Roberto de Souza <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit 3ed347d1a73ea485ea9f68df64e95cc164e1a790)
Signed-off-by: You-Sheng Yang <email address hidden>

19e9384... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/tc/tgl: Implement TC cold sequences

TC ports can enter in TCCOLD to save power and is required to request
to PCODE to exit this state before use or read to TC registers.

For TGL there is a new MBOX command to do that with a parameter to ask
PCODE to exit and block TCCOLD entry or unblock TCCOLD entry.

So adding a new power domain to reuse the refcount and only allow
TC cold when all TC ports are not in use.

v2:
- fixed missing case in intel_display_power_domain_str()
- moved tgl_tc_cold_request to intel_display_power.c
- renamed TGL_TC_COLD_OFF to TGL_TC_COLD_OFF_POWER_DOMAINS
- added all TC and TBT aux power domains to
TGL_TC_COLD_OFF_POWER_DOMAINS

v3:
- added one msec sleep when PCODE returns -EAGAIN
- added timeout of 5msec to not loop forever if
sandybridge_pcode_write_timeout() keeps returning -EAGAIN

v4:
- Made failure to block or unblock TC cold a error
- removed 5msec timeout, instead giving PCODE 1msec by up 3 times to
recover from the internal error

v5:
- only sleeping 1msec when ret is -EAGAIN

BSpec: 49294
Cc: Imre Deak <email address hidden>
Cc: Cooper Chiou <email address hidden>
Cc: Kai-Heng Feng <email address hidden>
Reviewed-by: Imre Deak <email address hidden>
Signed-off-by: José Roberto de Souza <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit 3c02934b24e37344b8c1c6f9df55efc8891e6251)
Signed-off-by: You-Sheng Yang <email address hidden>

b7de60d... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/tc: Skip ref held check for TC legacy aux power wells

As part of ICL TC cold exit sequences we need to request aux power
well before lock the access to TC ports, so skiping the
intel_tc_port_ref_held() check for TC legacy ports.

Reviewed-by: Imre Deak <email address hidden>
Tested-by: You-Sheng Yang <email address hidden>
Signed-off-by: José Roberto de Souza <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit 7ce40a671538c225ea8eb170830cad90b16ec211)
Signed-off-by: You-Sheng Yang <email address hidden>

bd140ff... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/tc/icl: Implement TC cold sequences

This is required for legacy/static TC ports as IOM is not aware of
the connection and will not trigger the TC cold exit.

Just request PCODE to exit TCCOLD is not enough as it could enter
again before driver makes use of the port, to prevent it BSpec states
that aux powerwell should be held.

So here embedding the TC cold exit sequence into ICL aux enable,
it will enable aux and then request TC cold to exit.

The TC cold block(exit and aux hold) and unblock was added to some
exported TC functions for the others and to access PHY registers,
callers should enable and keep aux powerwell enabled during access.

Also adding TC cold check and warnig in tc_port_load_fia_params() as
at this point of the driver initialization we can't request power
wells, if we get this warning we will need to figure out how to handle
it.

v2:
- moved ICL TC cold exit function to intel_display_power
- using dig_port->tc_legacy_port to only execute sequences for legacy
ports, hopefully VBTs will have this right
- fixed check to call _hsw_power_well_continue_enable()
- calling _hsw_power_well_continue_enable() unconditionally in
icl_tc_phy_aux_power_well_enable(), if needed we will surpress timeout
warnings of TC legacy ports
- only blocking TC cold around fia access

v3:
- added timeout of 5msec to not loop forever if
sandybridge_pcode_write_timeout() keeps returning -EAGAIN
returning -EAGAIN in in icl_tc_cold_exit()
- removed leftover tc_cold_wakeref
- added one msec sleep when PCODE returns -EAGAIN

v4:
- removed 5msec timeout, instead giving 1msec to whoever is using
PCODE to finish it up to 3 times
- added a comment about turn TC cold exit failure as a error in future

BSpec: 21750
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1296
Cc: Imre Deak <email address hidden>
Cc: Cooper Chiou <email address hidden>
Cc: Kai-Heng Feng <email address hidden>
Reviewed-by: Imre Deak <email address hidden>
Signed-off-by: José Roberto de Souza <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit feb7e0ef5ff820ee7242bb46cfe3d0dd3e234c38)
Signed-off-by: You-Sheng Yang <email address hidden>

82fb772... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/display: Split hsw_power_well_enable() into two

This is a preparation for ICL TC cold exit sequences.

v2:
- renamed new functions to hsw_power_well_enable_prepare()/complete()

Signed-off-by: José Roberto de Souza <email address hidden>
Reviewed-by: Imre Deak <email address hidden>
Tested-by: You-Sheng Yang <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit f8bb28e63a1e9f46fe15f63e924fab643ff8abe0)
Signed-off-by: You-Sheng Yang <email address hidden>

2f5e753... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/display: Add intel_legacy_aux_to_power_domain()

This is a similar function to intel_aux_power_domain() but it do not
care about TBT ports, this will be needed by ICL TC sequences.

v2:
- renamed to intel_legacy_aux_to_power_domain()

Cc: Imre Deak <email address hidden>
Cc: Cooper Chiou <email address hidden>
Cc: Kai-Heng Feng <email address hidden>
Reviewed-by: Imre Deak <email address hidden>
Tested-by: You-Sheng Yang <email address hidden>
Signed-off-by: José Roberto de Souza <email address hidden>
Link: https://patchwork<email address hidden>
(cherry picked from drm-tip commit dba6b0b4eab362a886db616ee38c1d624914d98b)
Signed-off-by: You-Sheng Yang <email address hidden>

e6211e7... by =?utf-8?q?Jos=C3=A9_Roberto_de_Souza?= <email address hidden>

drm/i915/display: Move out code to return the digital_port of the aux ch

Moving the code to return the digital port of the aux channel also
removing the intel_phy_is_tc() to make it generic.
digital_port will be needed in icl_tc_phy_aux_power_well_enable()
so adding it as a parameter to icl_tc_port_assert_ref_held().

While at at removing the duplicated call to icl_tc_phy_aux_ch() in
icl_tc_port_assert_ref_held().

v2:
- fixed build when DRM_I915_DEBUG_RUNTIME_PM is not set
- moved to before hsw_wait_for_power_well_enable() as it will be
needed by hsw_wait_for_power_well_enable() in a future patch

v4:
- fixed action of if (!dig_port), continue instead of return

Cc: You-Sheng Yang <email address hidden>
Reviewed-by: Imre Deak <email address hidden>
Tested-by: You-Sheng Yang <email address hidden>
Signed-off-by: José Roberto de Souza <email address hidden>
Link: https://patchwork<email address hidden>
(backported from drm-tip commit 34a3f0b273a7196b98668324556bce9f6dc091d7)
Signed-off-by: You-Sheng Yang <email address hidden>

e36dd1a... by Jian-Hong Pan <email address hidden>

ahci: Add Intel Comet Lake PCH RAID PCI ID

BugLink: https://bugs.launchpad.net/bugs/1871812

Intel Comet Lake should use the default LPM policy for mobile chipsets.
So, add the PCI ID to the driver list of supported devices.

Signed-off-by: Jian-Hong Pan <email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
(cherry picked from commit 7667e63c8af90e287f9e2d070599024cbabe63f5)
Signed-off-by: Kai-Heng Feng <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Seth Forshee <email address hidden>