Skip to content

Commit

Permalink
Merge branch 'msm-4.14-v2-final' of github.com:idkwhoiam322/weeb_kern…
Browse files Browse the repository at this point in the history
…el_oneplus_sm8150
  • Loading branch information
idkwhoiam322 committed Apr 24, 2020
2 parents d028484 + c0c01c9 commit 7eae8f3
Show file tree
Hide file tree
Showing 2,213 changed files with 619,605 additions and 20,510 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,5 @@ kernel/configs/android-*.cfg
out/
build_gcc.sh
build_aosp_clang.sh
build_proton_clang.sh
build_proton_clang.sh
*.txt
7 changes: 7 additions & 0 deletions Documentation/ABI/testing/sysfs-class-devfreq
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Description:
The name of devfreq object denoted as ... is same as the
name of device using devfreq.

What: /sys/class/devfreq/.../name
Date: November 2019
Contact: Chanwoo Choi <[email protected]>
Description:
The /sys/class/devfreq/.../name shows the name of device
of the corresponding devfreq object.

What: /sys/class/devfreq/.../governor
Date: September 2011
Contact: MyungJoo Ham <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
dynamic table installation which will install SSDT
tables to /sys/firmware/acpi/tables/dynamic.

acpi_no_watchdog [HW,ACPI,WDT]
Ignore the ACPI-based watchdog interface (WDAT) and let
a native driver control the watchdog device instead.

acpi_rsdp= [ACPI,EFI,KEXEC]
Pass the RSDP address to the kernel, mostly used
on machines running EFI runtime service to boot the
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/arm/msm/mdm-modem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to be reset.

Required Properties:
- compatible: The bus devices need to be compatible with
"qcom,ext-mdm9x55", qcom,ext-sdx50m, qcom,ext-sdxprairie.
"qcom,ext-mdm9x55", qcom,ext-sdx50m, qcom,ext-sdxprairie, qcom,ext-marmot.

Required named gpio properties:
- qcom,mdm2ap-errfatal-gpio: gpio for the external modem to indicate to the apps processor
Expand Down
58 changes: 58 additions & 0 deletions Documentation/devicetree/bindings/drm/msm/sde-dp-sim.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
QTI Snapdragon Display Engine (SDE) DP-MST sideband message emulation driver

Required properties:
- compatible: "qcom,dp-mst-sim"

Each child node represents a port at root branch, with properties:
- qcom,mode-h-active: A u32 property defines the horizontal active size.
- qcom,mode-h-front-porch: A u32 property defines the horizontal front porch.
- qcom,mode-h-pulse-width: A u32 property defines the horizontal pulse.
- qcom,mode-h-back-porch: A u32 property defines the horizontal back porch.
- qcom,mode-h-active-high: A boolean property if horizontal polarity is high.
- qcom,mode-v-active: A u32 property defines the vertical active size.
- qcom,mode-v-front-porch: A u32 property defines the vertical front portch.
- qcom,mode-v-pulse-width: A u32 property defines the vertical pulse width.
- qcom,mode-v-back-porch: A u32 property defines the vertical back porch.
- qcom,mode-v-active-high: A boolean property if vertical polarity is high.
- qcom,mode-refresh-rate: A u32 property defines vertial refresh rate.
- qcom,mode-clock-in-khz: A u32 property defines clock in kHz.

Example:

/ {
...

sde_dp_mst_sim: qcom,dp-mst-sim {
compatible = "qcom,dp-mst-sim";

port@0 {
qcom,mode-h-active = <1920>;
qcom,mode-h-front-porch = <88>;
qcom,mode-h-pulse-width = <44>;
qcom,mode-h-back-porch = <148>;
qcom,mode-h-active-high;
qcom,mode-v-active = <1080>;
qcom,mode-v-front-porch = <4>;
qcom,mode-v-pulse-width = <5>;
qcom,mode-v-back-porch = <36>;
qcom,mode-v-active-high;
qcom,mode-refresh-rate = <60>;
qcom,mode-clock-in-khz = <148500>;
};

port@1 {
qcom,mode-h-active = <1920>;
qcom,mode-h-front-porch = <88>;
qcom,mode-h-pulse-width = <44>;
qcom,mode-h-back-porch = <148>;
qcom,mode-h-active-high;
qcom,mode-v-active = <1080>;
qcom,mode-v-front-porch = <4>;
qcom,mode-v-pulse-width = <5>;
qcom,mode-v-back-porch = <36>;
qcom,mode-v-active-high;
qcom,mode-refresh-rate = <60>;
qcom,mode-clock-in-khz = <148500>;
};
};
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/drm/msm/sde-dp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Optional properties:
device node. Refer to pinctrl-bindings.txt
- qcom,max-lclk-frequency-khz: An integer specifying the max. link clock in KHz supported by Display Port.
- qcom,mst-fixed-topology-ports: u32 values of which MST output port to reserve, start from one
- qcom,dp-aux-bridge: phandle for dp aux bridge module, for 3rd party dp bridge only.
- qcom,dp-aux-bridge-sim: phandle for dp aux bridge module, for internal mst debug simulation only.

[Optional child nodes]: These nodes are for devices which are
dependent on msm_ext_disp. If msm_ext_disp is disabled then
Expand Down
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/net/fsl-fman.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ PROPERTIES
Usage: required
Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt

- fsl,erratum-a050385
Usage: optional
Value type: boolean
Definition: A boolean property. Indicates the presence of the
erratum A050385 which indicates that DMA transactions that are
split can result in a FMan lock.

=============================================================================
FMan MURAM Node

Expand Down
29 changes: 29 additions & 0 deletions Documentation/devicetree/bindings/sound/qcom-audio-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,19 @@ Optional properties:
- qcom,csra-devs : List of phandles of all possible CSRA66x0 devices supported for the target
- qcom,csra-aux-dev-prefix : Name prefix in multi-channel configuration for CSRA66x0 device
- qcom,afe-rxtx-lb: AFE RX to TX loopback.
- qcom,ext-mclk-gpio: pinctrl referring to external mclk
- qcom,ext-mclk-src: Device tree node referring to external mclk clock
- #ext-mclk-1-cfg-cells: Number of cells in ext-mclk-1-cfg-* nodes. Must be 6.
- ext-mclk-1 cfg-11p2896: Frequnency table for 11.2896MHz mclk frequnecy.
Fields are clock rate, div2x, m, n, d and clock root.
- ext-mclk-1 cfg-12p288: Frequnency table for 12.288MHz mclk frequnecy.
Fields are clock rate, div2x, m, n, d and clock root.
- ext-mclk-1 cfg-16p384: Frequnency table for 16.384MHz mclk frequnecy.
Fields are clock rate, div2x, m, n, d and clock root.
- ext-mclk-1-cfg-22p5792: Frequency table for 22.5792MHz mclk frequency.
Fields are clock rate, div2x, m, n, d and clock root.
- ext-mclk-1 cfg-24p576: Frequnency table for 24.576MHz mclk frequnecy.
Fields are clock rate, div2x, m, n, d and clock root.
Example:

qcs405_snd {
Expand Down Expand Up @@ -2019,6 +2032,7 @@ Optional properties:
- qcom,wcn-btfm : Property to specify if WCN BT/FM chip is used for the target
- qcom,mi2s-audio-intf: Property to specify if MI2S interface is used for the target
- qcom,auxpcm-audio-intf: Property to specify if Aux PCM interface is used for the target
- qcom,tdm-audio-intf: Property to specify if Aux PCM interface is used for the target
- qcom,cdc-dmic-gpios : phandle for Digital mic clk and data gpios.
- qcom,msm_audio_ssr_devs: List the snd event framework clients
- qcom,afe-rxtx-lb: AFE RX to TX loopback.
Expand All @@ -2031,6 +2045,7 @@ Example:
qcom,wcn-btfm = <1>;
qcom,mi2s-audio-intf = <1>;
qcom,auxpcm-audio-intf = <1>;
qcom,tdm-audio-intf = <1>;
qcom,afe-rxtx-lb = <1>;

asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
Expand Down Expand Up @@ -2261,3 +2276,17 @@ Example:
asoc-codec = <&stub_codec>;
asoc-codec-names = "msm-stub-codec.1";
};

* HANA55 ASoC Machine driver

Required properties:
- compatible : "qcom,sm8150-asoc-snd-hana55".
- qcom,model : The user-visible name of this sound card.

Example:

snd_934x {
compatible = "qcom,sm8150-asoc-snd-hana55";
qcom,model = "sm8150-hana55-snd-card";
qcom,quat-mi2s-gpios = <&quat_mi2s_gpios>;
};
7 changes: 7 additions & 0 deletions Documentation/filesystems/porting
Original file line number Diff line number Diff line change
Expand Up @@ -606,3 +606,10 @@ in your dentry operations instead.
dentry separately, and it now has request_mask and query_flags arguments
to specify the fields and sync type requested by statx. Filesystems not
supporting any statx-specific features may ignore the new arguments.
--
[mandatory]

[should've been added in 2016] stale comment in finish_open()
nonwithstanding, failure exits in ->atomic_open() instances should
*NOT* fput() the file, no matter what. Everything is handled by the
caller.
1 change: 1 addition & 0 deletions Documentation/sound/hd-audio/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ HD-Audio
models
controls
dp-mst
realtek-pc-beep
129 changes: 129 additions & 0 deletions Documentation/sound/hd-audio/realtek-pc-beep.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
===============================
Realtek PC Beep Hidden Register
===============================

This file documents the "PC Beep Hidden Register", which is present in certain
Realtek HDA codecs and controls a muxer and pair of passthrough mixers that can
route audio between pins but aren't themselves exposed as HDA widgets. As far
as I can tell, these hidden routes are designed to allow flexible PC Beep output
for codecs that don't have mixer widgets in their output paths. Why it's easier
to hide a mixer behind an undocumented vendor register than to just expose it
as a widget, I have no idea.

Register Description
====================

The register is accessed via processing coefficient 0x36 on NID 20h. Bits not
identified below have no discernible effect on my machine, a Dell XPS 13 9350::

MSB LSB
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |h|S|L| | B |R| | Known bits
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|0|0|1|1| 0x7 |0|0x0|1| 0x7 | Reset value
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

1Ah input select (B): 2 bits
When zero, expose the PC Beep line (from the internal beep generator, when
enabled with the Set Beep Generation verb on NID 01h, or else from the
external PCBEEP pin) on the 1Ah pin node. When nonzero, expose the headphone
jack (or possibly Line In on some machines) input instead. If PC Beep is
selected, the 1Ah boost control has no effect.

Amplify 1Ah loopback, left (L): 1 bit
Amplify the left channel of 1Ah before mixing it into outputs as specified
by h and S bits. Does not affect the level of 1Ah exposed to other widgets.

Amplify 1Ah loopback, right (R): 1 bit
Amplify the right channel of 1Ah before mixing it into outputs as specified
by h and S bits. Does not affect the level of 1Ah exposed to other widgets.

Loopback 1Ah to 21h [active low] (h): 1 bit
When zero, mix 1Ah (possibly with amplification, depending on L and R bits)
into 21h (headphone jack on my machine). Mixed signal respects the mute
setting on 21h.

Loopback 1Ah to 14h (S): 1 bit
When one, mix 1Ah (possibly with amplification, depending on L and R bits)
into 14h (internal speaker on my machine). Mixed signal **ignores** the mute
setting on 14h and is present whenever 14h is configured as an output.

Path diagrams
=============

1Ah input selection (DIV is the PC Beep divider set on NID 01h)::

<Beep generator> <PCBEEP pin> <Headphone jack>
| | |
+--DIV--+--!DIV--+ {1Ah boost control}
| |
+--(b == 0)--+--(b != 0)--+
|
>1Ah (Beep/Headphone Mic/Line In)<

Loopback of 1Ah to 21h/14h::

<1Ah (Beep/Headphone Mic/Line In)>
|
{amplify if L/R}
|
+-----!h-----+-----S-----+
| |
{21h mute control} |
| |
>21h (Headphone)< >14h (Internal Speaker)<

Background
==========

All Realtek HDA codecs have a vendor-defined widget with node ID 20h which
provides access to a bank of registers that control various codec functions.
Registers are read and written via the standard HDA processing coefficient
verbs (Set/Get Coefficient Index, Set/Get Processing Coefficient). The node is
named "Realtek Vendor Registers" in public datasheets' verb listings and,
apart from that, is entirely undocumented.

This particular register, exposed at coefficient 0x36 and named in commits from
Realtek, is of note: unlike most registers, which seem to control detailed
amplifier parameters not in scope of the HDA specification, it controls audio
routing which could just as easily have been defined using standard HDA mixer
and selector widgets.

Specifically, it selects between two sources for the input pin widget with Node
ID (NID) 1Ah: the widget's signal can come either from an audio jack (on my
laptop, a Dell XPS 13 9350, it's the headphone jack, but comments in Realtek
commits indicate that it might be a Line In on some machines) or from the PC
Beep line (which is itself multiplexed between the codec's internal beep
generator and external PCBEEP pin, depending on if the beep generator is
enabled via verbs on NID 01h). Additionally, it can mix (with optional
amplification) that signal onto the 21h and/or 14h output pins.

The register's reset value is 0x3717, corresponding to PC Beep on 1Ah that is
then amplified and mixed into both the headphones and the speakers. Not only
does this violate the HDA specification, which says that "[a vendor defined
beep input pin] connection may be maintained *only* while the Link reset
(**RST#**) is asserted", it means that we cannot ignore the register if we care
about the input that 1Ah would otherwise expose or if the PCBEEP trace is
poorly shielded and picks up chassis noise (both of which are the case on my
machine).

Unfortunately, there are lots of ways to get this register configuration wrong.
Linux, it seems, has gone through most of them. For one, the register resets
after S3 suspend: judging by existing code, this isn't the case for all vendor
registers, and it's led to some fixes that improve behavior on cold boot but
don't last after suspend. Other fixes have successfully switched the 1Ah input
away from PC Beep but have failed to disable both loopback paths. On my
machine, this means that the headphone input is amplified and looped back to
the headphone output, which uses the exact same pins! As you might expect, this
causes terrible headphone noise, the character of which is controlled by the
1Ah boost control. (If you've seen instructions online to fix XPS 13 headphone
noise by changing "Headphone Mic Boost" in ALSA, now you know why.)

The information here has been obtained through black-box reverse engineering of
the ALC256 codec's behavior and is not guaranteed to be correct. It likely
also applies for the ALC255, ALC257, ALC235, and ALC236, since those codecs
seem to be close relatives of the ALC256. (They all share one initialization
function.) Additionally, other codecs like the ALC225 and ALC285 also have this
register, judging by existing fixups in ``patch_realtek.c``, but specific
data (e.g. node IDs, bit positions, pin mappings) for those codecs may differ
from what I've described here.
19 changes: 0 additions & 19 deletions Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Currently, these files are in /proc/sys/vm:
- nr_trim_pages (only if CONFIG_MMU=n)
- numa_zonelist_order
- oom_dump_tasks
- reap_mem_on_sigkill
- oom_kill_allocating_task
- overcommit_kbytes
- overcommit_memory
Expand Down Expand Up @@ -658,24 +657,6 @@ The default value is 1 (enabled).

==============================================================

reap_mem_on_sigkill

This enables or disables the memory reaping for a SIGKILL received
process and that the sending process must have the CAP_KILL capabilities.

If this is set to 1, when a process receives SIGKILL from a process
that has the capability, CAP_KILL, the process is added into the oom_reaper
queue which can be picked up by the oom_reaper thread to reap the memory of
that process. This reaps for the process which received SIGKILL through
either sys_kill from user or kill_pid from kernel.

If this is set to 0, we are not reaping memory of a SIGKILL, sent through
either sys_kill from user or kill_pid from kernel, received process.

The default value is 0 (disabled).

==============================================================

oom_kill_allocating_task

This enables or disables killing the OOM-triggering task in
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6877,7 +6877,7 @@ M: Joonas Lahtinen <[email protected]>
M: Rodrigo Vivi <[email protected]>
L: [email protected]
W: https://01.org/linuxgraphics/
B: https://01.org/linuxgraphics/documentation/how-report-bugs
B: https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs
C: irc://chat.freenode.net/intel-gfx
Q: http://patchwork.freedesktop.org/project/intel-gfx/
T: git git://anongit.freedesktop.org/drm-intel
Expand Down
Loading

0 comments on commit 7eae8f3

Please sign in to comment.