2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-23 01:56:43 +08:00
Commit Graph

1265628 Commits

Author SHA1 Message Date
c54b7367a6 input: joystick: odin2: fix warnings with checkpatch
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-23 17:40:53 +08:00
ed18d52a67 input: joystick: odin2: use dev_err_probe in probe
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-23 17:12:56 +08:00
bc3ea7b522 input: joystick: odin2: reformat driver code
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-22 23:40:29 +08:00
fe43db03fc Update odin2 config fragment
disabled legacy pty
disabled ifb tunl sit vnic
disabled ip virtual server
enabled Device Mapper related modules (LVM2, mdraid, bcache)
enabled xtables / nftables / ipset related modules

Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-22 17:37:14 +08:00
349bdd18cf
dts: odin2: remove SDR104 2024-05-17 13:46:00 +08:00
Xilin Wu
cc6089c03c arm64: dts: qcom: odin2 regulator comment wip
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-28 16:03:26 +08:00
585b06230f Update Odin2 dts 2024-03-25 23:42:59 +08:00
Xilin Wu
ef0de2f149 HACK: drm/bridge: lt8912b: Enable fixed 1080p60 output on Odin 2
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-25 23:41:38 +08:00
Dmitry Baryshkov
5664f4f091 drm/msm/dpu: include SSPP allocation state into the dumped state
Make dpu_rm_print_state() also output the SSPP allocation state.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:40 +08:00
Dmitry Baryshkov
67b56002c8 drm/msm/dpu: allow sharing of blending stages
It is possible to slightly bend the limitations of the HW blender. If
two rectangles are contiguous (like two rectangles of a single plane)
they can be blended using a single LM blending stage, allowing one to
blend more planes via a single LM.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:40 +08:00
Dmitry Baryshkov
fa66c56ca6 drm/msm/dpu: create additional virtual planes
Since we have enabled sharing of SSPP blocks between two planes, it is
now possible to use twice as much planes as there are hardware SSPP
blocks. Create additional overlay planes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
6d5c9e7dee drm/msm/dpu: allow sharing SSPP between planes
Since SmartDMA planes provide two rectangles, it is possible to use them
to drive two different DRM planes, first plane getting the rect_0,
another one using rect_1 of the same SSPP. The sharing algorithm is
pretty simple, it requires that each of the planes can be driven by the
single rectangle and only consequetive planes are considered.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
b2b0d6b626 drm/msm/dpu: allow using two SSPP blocks for a single plane
Virtual wide planes give high amount of flexibility, but it is not
always enough:

In parallel multirect case only the half of the usual width is supported
for tiled formats. Thus the whole width of two tiled multirect
rectangles can not be greater than max_linewidth, which is not enough
for some platforms/compositors.

Another example is as simple as wide YUV plane. YUV planes can not use
multirect, so currently they are limited to max_linewidth too.

Now that the planes are fully virtualized, add support for allocating
two SSPP blocks to drive a single DRM plane. This fixes both mentioned
cases and allows all planes to go up to 2*max_linewidth (at the cost of
making some of the planes unavailable to the user).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
51aee10f42 drm/msm/dpu: add support for virtual planes
Only several SSPP blocks support such features as YUV output or scaling,
thus different DRM planes have different features.  Properly utilizing
all planes requires the attention of the compositor, who should
prefer simpler planes to YUV-supporting ones. Otherwise it is very easy
to end up in a situation when all featureful planes are already
allocated for simple windows, leaving no spare plane for YUV playback.

To solve this problem make all planes virtual. Each plane is registered
as if it supports all possible features, but then at the runtime during
the atomic_check phase the driver selects backing SSPP block for each
plane.

Note, this does not provide support for using two different SSPP blocks
for a single plane or using two rectangles of an SSPP to drive two
planes. Each plane still gets its own SSPP and can utilize either a solo
rectangle or both multirect rectangles depending on the resolution.

Note #2: By default support for virtual planes is turned off and the
driver still uses old code path with preallocated SSPP block for each
plane. To enable virtual planes, pass 'msm.dpu_use_virtual_planes=1'
kernel parameter.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
b00886eef5 drm/msm/dpu: move rot90 checking to dpu_plane_atomic_check_pipe()
Move a call to dpu_plane_check_inline_rotation() to the
dpu_plane_atomic_check_pipe() function, so that the rot90 constraints
are checked for both pipes. Also move rotation field from struct
dpu_plane_state to struct dpu_sw_pipe_cfg.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
f826f8519d drm/msm/dpu: split dpu_plane_atomic_check()
Split dpu_plane_atomic_check() function into two pieces:

dpu_plane_atomic_check_nopipe() performing generic checks on the pstate,
without touching the associated pipe,

and

dpu_plane_atomic_check_pipes(), which takes into account used pipes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
c0360a5f0e drm/msm/dpu: move scaling limitations out of the hw_catalog
Max upscale / downscale factors are constant between platforms. In
preparation to adding support for virtual planes and allocating SSPP
blocks on demand move max scaling factors out of the HW catalog and
handle them in the dpu_plane directly. If any of the scaling blocks gets
different limitations, this will have to be handled separately, after
the plane refactoring.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
069be007b7 drm/msm/dpu: drop virt_formats from SSPP subblock configuration
The virt_formats / virt_num_formats are not used by the current driver
and are not going to be used in future since formats for virtual planes
are handled in a different way, by forbidding unsupported combinations
during atomic_check. Drop those fields now.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
57b091d309 drm/msm/dpu: move pstate->pipe initialization to dpu_plane_atomic_check
In preparation for virtualized planes support, move pstate->pipe
initialization from dpu_plane_reset() to dpu_plane_atomic_check(). In
case of virtual planes the plane's pipe will not be known up to the
point of atomic_check() callback.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
704f36afa8 drm/msm/dpu: use drm_rect_fp_to_int()
Use the drm_rect_fp_to_int() helper instead of using the hand-written
code.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
ffcdcb9d17 drm/msm/dpu: take plane rotation into account for wide planes
Take into account the plane rotation and flipping when calculating src
positions for the wide plane parts.

This is not an issue yet, because rotation is only supported for the
UBWC planes and wide UBWC planes are rejected anyway because in parallel
multirect case only the half of the usual width is supported for tiled
formats. However it's better to fix this now rather than stumbling upon
it later.

Fixes: 80e8ae3b38 ("drm/msm/dpu: add support for wide planes")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-25 20:00:39 +08:00
Dmitry Baryshkov
8c44fb477a drm/msm/dpu: add current resource allocation to dumped state
Provide atomic_print_state callback to the DPU's private object. This
way the debugfs/dri/0/state will also include RM's internal state.

Example output (RB5 board, HDMI and writeback encoder enabled)

resource mapping:
	pingpong=31 36 # # # # - - - - -
	mixer=31 36 # # # # -
	ctl=# # 31 36 # #
	dspp=# # # #
	dsc=# # # # - -
	cdm=#

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
2024-03-25 20:00:18 +08:00
Xilin Wu
32bef1aefd Update odin2 device tree
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-24 22:42:37 +08:00
Xilin Wu
0950a39496 Update odin2 config fragment
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-24 22:41:58 +08:00
Xilin Wu
7b6b2b3dad Revert "HACK: arm64: dts: qcom: sm8550: Disable cpuidle"
This reverts commit 3c4d35a832.
2024-03-24 20:29:11 +08:00
Xilin Wu
d66055b677 HACK: cpufreq: qcom-cpufreq-hw: Enable boost by default
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-24 16:17:19 +08:00
Krzysztof Kozlowski
ba1d39f0e3 UPSTREAM: ASoC: codecs: tx-macro: correct TX SMIC MUXn widgets on SM8350+
Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
block version v9.2, the register responsible for TX SMIC MUXn muxes is
different.  In earlier LPASS versions this mux had bit fields for
analogue (ADCn) and digital (SWR_DMICn) MICs.  Choice of ADCn was
selecting the analogue path in CDC_TX_TOP_CSR_SWR_DMICn_CTL register.

With LPASS v9.2 and newer, the bit fields are integrated into just
SWR_MICn and there is no distinction for analogue or digital MIC in the
register.

Fix support for LPASS v9.2+:
1. Add new set of widgets and audio routes for LPASS v9.2.
2. Do not choose analogue or digital in CDC_TX_TOP_CSR_SWR_DMICn_CTL
   based on value of the mux.
3. Replace all the input widgets (TX SWR_ADCn, TX SWR_DMICn) with TX
   SWR_INPUTn ones.

The change is not backwards compatible with older DTBs and existing
mixer settings, therefore it does not change handling of older platforms
with working micrphones (SC8280xp) but only the ones with issues
(SM8450, SM8550) which need the fix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes in v3:
1. Do not change driver match data for SC8280xp, because of
   compatibility reasons. Unlike on other newer platforms like SM8450
   and SM8550, microphones are working fine on SC8280xp so apparently
   the fix is not necessary on SC8280xp.

Changes in v2:
1. Keep all the MSM_DMIC/TX DMIC MUX audio routes in the shared
   tx_audio_map, because it does not differ between v9 and v9.2.

2. Drop backwards compatible widgets because they create issues with
   routes in existing DTS.

(cherry picked from commit 5ef64853515dcaaaf7095e739392ffa2c8921901)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 16:00:24 +08:00
Srinivasa Rao Mandadapu
1fdafa1c6e LOCAL: ASoC: qdsp6: audioreach: Add SPF Ready check
Check for SPF readiness in prm driver probe to avoid race conditions
during ADSP pil loading.
This patch is to avoid, sending requests to ADSP before it's PD's is
up and ready.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Tested-by: Ratna Deepthi Kudaravalli <rkudarav@qti.qualcomm.com>
(cherry picked from commit b8d605823adfcb71fe3b3fa110dcf2fc2f53cb21)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 16:00:24 +08:00
Srinivas Kandagatla
7aa5d88c29 LOCAL: ASoC: codecs: tx-macro: add HPF filter
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
(cherry picked from commit 46e48e42f67ad5c375081f665ea25c868439faeb)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
(cherry picked from commit 648d7bab0f51192ef762e36ad9beb7f9fdea6792)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 16:00:24 +08:00
Srinivas Kandagatla
12aeb178ba LOCAL: ASoC: q6apm-dai: fix period size to be algined to 64 bytes
DSP expects the buffers to be aligned to 64bytes, so fix
the current sizes where there is a possiblity of getting an
unaligned buffers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
(cherry picked from commit 910a758d0340cff90ddb997a94ea269e30180beb)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
(cherry picked from commit 86575bf4ea5ba0372ff72ef52f8a93bd1a70816f)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 16:00:24 +08:00
Srinivas Kandagatla
908d646758 LOCAL: WIP: soundwire: qcom: add some post bank switch delay
For some reason on wsa883x we see Port Collision during bank swith,
adding a delay seems provide a good workaround for this.

Needs more investigation.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
(cherry picked from commit 32d454e57c2996099cb3a1920db5319f1eef6fa2)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 15:54:23 +08:00
Srinivas Kandagatla
4ae6956610 soundwire: qcom: enable runtime pm before controller is registered
Registering controller even before pm runtime is enabled will result
in pm runtime underflow warnings. Fix this by properly moving
the runtime pm enable before registering controller.

Fixes: 74e79da9fd ("soundwire: qcom: add runtime pm support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230209131336.18252-3-srinivas.kandagatla@linaro.org
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
(cherry picked from commit 7578d5a6e7e7f0e2457f330c5c10c5c0b09c900d)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 15:53:54 +08:00
Krzysztof Kozlowski
bb41acd03b WIP: ASoC: va-macro: det default reset values on power down
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 15:49:26 +08:00
Krzysztof Kozlowski
eb6a469529 WIP: ASoC: tx-macro: det default reset values on power down
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-03-24 15:49:16 +08:00
Xilin Wu
5e52adbdce Update Odin 2 config fragment
This config fragment was converted from the previous defconfig using
the following command:

ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j12 defconfig
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j12 odin2_defconfig
./scripts/diffconfig -m .config.old .config > arch/arm64/configs/odin2.config

Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-24 15:15:08 +08:00
Xilin Wu
24ab200bff arm64: configs: Add Odin 2 config fragment
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-24 14:18:55 +08:00
Konrad Dybcio
d345d0647b arm64: dts: qcom: sm8550-*: Remove thermal zone polling delays
All of the thermal zone suppliers are interrupt-driven, remove the
bogus and unnecessary polling that only wastes CPU time.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2024-03-24 14:12:25 +08:00
Manivannan Sadhasivam
dce80940de arm64: dts: qcom: sm8550: Fix the msi-map entries
While adding the GIC ITS MSI support, it was found that the msi-map entries
needed to be swapped to receive MSIs from the endpoint.

But later it was identified that the swapping was needed due to a bug in
the Qualcomm PCIe controller driver. And since the bug is now fixed with
commit bf79e33cdd ("PCI: qcom: Enable BDF to SID translation properly"),
let's fix the msi-map entries also to reflect the actual mapping in the
hardware.

Fixes: 114990ce3e ("arm64: dts: qcom: sm8550: Use GIC-ITS for PCIe0 and PCIe1")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
2024-03-24 14:12:25 +08:00
Xilin Wu
bed4f1c305 iris: Remove video_generated_h
Signed-off-by: Xilin Wu <wuxilin123@gmail.com>
2024-03-24 14:12:14 +08:00
Rajendra Nayak
0c119e7bf2 fixup: iris: enable building of iris video driver
fixup: iris: enable building of iris video driver

Signed-off-by: Rajendra Nayak <quic_rjendra@quicinc.com>
2024-03-24 14:11:17 +08:00
Dikshita Agarwal
fe611c111e arm64: dts: qcom: sm8550: add changes to enable video
Add device node for video on Qualcomm SM8550 platform.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:17 +08:00
Dikshita Agarwal
08efde2644 dt-bindings: media: Add sm8550 dt schema
Add a schema description for the iris video encoder/decoder on sm8550.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
48854375e4 iris: enable building of iris video driver
This adds iris driver Makefile and Kconfig, also changes
v4l2 platform/qcom Makefile/Kconfig in order to
enable compilation of the driver.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
06300de634 iris: variant: iris3: implement logic to compute clock frequency
This implements the logic to computer the required clock frequency
by encoder or decoder for a specific usecase. It considers the input
as various parameters configured by client for that usecase.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
287296a4fb iris: variant: iris: implement the logic to compute bus bandwidth
This implements the logic to compute bus bandwidth required by encoder
or decoder for a specific usecase. It takes input as various video
usecase parameters as configured by clients.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
65116e01e1 iris: variant: iris3: add helper for bus and clock calculation
This adds the helper function to calculate the required bus
bandwidth and clock frequency for the given video usecase/s.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
545feb0a13 iris: variant: iris3: add helpers for buffer size calculations
This implements iris3 specific buffer size calculation for
firmware internal buffers, input and output buffers for
encoder and decoder.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
8a8c09489b iris: variant: iris3: add iris3 specific ops
This implements iris3 specific ops for power on, power off,
boot firmware, power collapse etc.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
13f3e55802 iris: variant: add helper functions for register handling
This implements the functions to read and write different regsiters.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:16 +08:00
Dikshita Agarwal
47a96a3ca1 iris: platform: sm8550: add capability file for sm8550
This implements all the capabilities supported by sm8550.

Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2024-03-24 14:11:15 +08:00