This adds the gpu regulator and enables the gpu node.
Change-Id: I8a0f580fa600d8f37fb3fa497cf657abf2905d5f
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Based on the p2180 pmic config, modified to match p2530
Change-Id: Ic7baa787b8e9633da72622a4562258860c05fca6
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
The SHIELD TV 2015 is a consumer media Android device that is based on
P2571
Change-Id: Ib981728d277f7daca812223ec3534d98555d43a1
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
The p3310 som has a BCM4354 module with wifi on sdio.
Change-Id: Ie4b42165fb81a129a7afe58c1c632261d13eca53
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
This appears to be a typo. The voltage input to the wireless module is
expected to be 1.8V-3.3V, per the downstream device tree.
Fixes: 02df3f03a8 ("arm64: tegra: Add initial power tree for P3310")
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Add OPP table and interconnects property to scale DDR frequency with
CPU frequency for better performance. Each operating point entry of
the OPP table has CPU freq to per MC channel bandwidth mapping.
One table is added for each cluster even though the table data is
same because the bandwidth request is per cluster. This is done
because the OPP framework creates a single icc path and hence single
bandwidth request if the table is marked as 'opp-shared' and shared
among all clusters. For us, the OPP table data is same but the MC
Client ID argument to interconnects property is different for each
cluster. So, having per cluster tables makes different icc paths for
each cluster and helps to make per cluster BW requests.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Add OPP table and interconnects property to scale DDR frequency with
CPU frequency for better performance. Each operating point entry of
the OPP table has CPU freq to per MC channel bandwidth mapping. One
table is added for each cluster because the different cpu types have
different scaling curves.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Add Interconnect framework support to dynamically set the DRAM
bandwidth from different clients. The MC driver is added as an ICC
provider and the EMC driver is already a provider.
Change-Id: I1c315f833711ed33f972bc0e26c1e3b91de32eba
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Add Interconnect framework support to dynamically set the DRAM
bandwidth from different clients. The MC driver is added as an ICC
provider and the EMC driver is already a provider.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
This adds support for dynamic frequency scaling of external memory on
devices with bpmp firmware that does not support bwmgr.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
These are being referenced by actmon, but are not currently enabled.
Fixes: 654427e0b9 ("arm64: tegra: Add OPP tables on Tegra210")
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
This makes mc and emc interconnect providers and allows for dynamic
memory clock scaling.
Change-Id: I3d787bd3bd18f0baa346844140094e2c11d8d91b
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Without the cmu, nvdisplay will display colors that are notably darker
than intended. The vendor bootloader and the downstream display driver
enable the cmu and sets a sRGB table. Loading that table here results in
the intended colors.
Co-developed-by: Kurt Kiefer <kekiefer@gmail.com>
Signed-off-by: Kurt Kiefer <kekiefer@gmail.com>
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Tested-by: Jasper Korten <jja2000@gmail.com>
This partially reverts commit 80fa614e2f ("selftests: timers: Remove
local NSEC_PER_SEC and USEC_PER_SEC defines").
The original commit removed local definitions of NSEC_PER_SEC and
USEC_PER_SEC in favor of including <include/vdso/time64.h>. However,
NSEC_PER_SEC in vdso/time64.h is defined as 1000000000L, which is
32-bit on 32-bit architectures. This causes integer overflow warnings
in several timer tests when doing arithmetic like NSEC_PER_SEC * 10 on
32-bit systems.
To fix this, restore the local definitions of NSEC_PER_SEC and
USEC_PER_SEC in the test files, but use "LL" suffix consistently
(1000000000LL and 1000000LL) to ensure 64-bit arithmetic and avoid
overflows.
We keep the cleanup from the original commit that renamed plural
definitions (NSECS_PER_SEC/USECS_PER_SEC) to singular ones in
posix_timers.c, but we now define them locally there as well.
This also removes the dependency of the selftests on the internal
kernel header <include/vdso/time64.h>.
Signed-off-by: Wake Liu <wakel@google.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: John Stultz <jstultz@google.com>
Link: https://patch.msgid.link/20260610014721.718362-1-wakel@google.com
Bug: 444295917
(cherry picked from commit f44ce7fdbdd00a596455b8689b62c12d5530d610
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core)
Change-Id: I6ff5716b95ae429fe39e40034ada78d633e12956
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 127c77fc4e.
Let's bring back this commit as doing so avoids conflicts with new
upstream patches such as commit b00385b8d0 ("selftests/posix_timers:
Use CLOCK_THREAD_CPUTIME_ID for ITIMER_PROF measurements") from John.
Instead of the revert, we can cherry-pick Wake's fix directly from the
tip tree [1].
Bug: 444295917
Cc: Wake Liu <wakel@google.com>
Cc: John Stultz <jstultz@google.com>
Link: https://git.kernel.org/tip/f44ce7fdbdd0 [1]
Change-Id: I5f28c56849db94c3bcb3b2669e824d2d5814b483
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Consolidate TEST_MAPPING config in arch/x86 by add the config to upper
level and remove configs in subfolders.
Test: presubmit
Bug: 436349608
Change-Id: Ie5792c3dbf1a789799c55df15ab4afc761c54989
Signed-off-by: Betty Zhou <bettyzhou@google.com>
Last references were removed in http://r.android.com/3552603 and
http://r.android.com/3552602.
Since mixed-build-prefix is no longer used, we can safely remove its
definition and export.
Bug: 205893923
Test: tools/bazel build //common-modules/virtual-device:virtual_device_x86_64
Change-Id: I467d7a01648bbd079640e645e09b9f5edbdee3b3
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
Update TEST_MAPPING in common/net to be import based for majority of tests.
Test: presubmit
Bug: 436349608
Change-Id: I73df7d1b3ea3f4c373de9d0cfb386d24656c36fc
Signed-off-by: Betty Zhou <bettyzhou@google.com>
Remove TEST_MAPPING in common/drivers/ and common/kernel subfolders and consolidate the tests in upper level at common/drivers in common/kernel.
Test: presubmit
Bug: 436349608
Change-Id: I86f5e951e8bb3b702c21d68afa59e7d0620770a9
Signed-off-by: Betty Zhou <bettyzhou@google.com>
In [1], sashiko reported the following issue:
=== snip ===
Looking at how these fences are managed, drm_crtc_create_fence()
creates a dma_fence without taking a reference to the drm_device or
drm_crtc. Because the sync_file framework exposes this fence to
userspace, the fence can outlive the CRTC.
The dma_fence contract requires that data accessed by dma_fence_ops
(like get_driver_name) must remain valid for an RCU grace period after
the fence is signaled. However, drm_crtc_cleanup() and the subsequent
freeing of the device do not wait for an RCU grace period via
synchronize_rcu().
If userspace calls ioctl(SYNC_IOC_FILE_INFO) concurrently with a device
hot-unplug:
CPU1 (Userspace)
sync_file_get_name()
ops = rcu_dereference(fence->ops);
if (!dma_fence_test_signaled_flag())
// Preempted or delayed here
CPU2 (Driver Teardown)
Signals the fence (setting fence->ops = NULL)
Destroys and frees the CRTC without waiting for an RCU grace period
CPU1 (Resumes)
ops->get_driver_name(fence) -> drm_crtc_fence_get_driver_name()
crtc = fence_to_crtc(fence); // Casts to the freed CRTC
return crtc->dev->driver->name; // Use-after-free
...
Does the CRTC or DRM device need to be kept alive for the RCU grace
period, or should the fence hold a proper reference to prevent the
use-after-free when get_driver_name() and get_timeline_name() access
the freed CRTC structure?
=== snap ===
I believe this to be a correct observation and this patch implements
the suggestion of waiting for an RCU grace period before proceeding
with destruction of the drm_crtc, so that get_driver_name() and
get_timeline_name() can still work.
Link: https://sashiko.dev/#/patchset/20260618-linux-drm_crtc_fix2-v1-1-c03e77b36f34@linaro.org?part=1
Fixes: 6d6003c4b6 ("drm/fence: add fence timeline to drm_crtc")
Cc: stable@vger.kernel.org
Reviewed-by: Philipp Stanner <phasta@kernel.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/all/20260721-linux-drm_crtc_fix2-v3-1-afa8c71506e6@linaro.org/
Bug: 521531791
Test: TH
Change-Id: Ib7607bfbf5f619c8c4d19d306dff7288063177f1
Signed-off-by: André Draszik <draszik@google.com>
This reverts commit 44ee1179cb.
Upstream reverted the equivalent patch in commit c1855dd0a6 ("clk: qcom:
Revert sync_state based clk_disable_unused") after finding some issues
with this approach [1]. Also, keeping this patch creates build issues
with further upstream patches, so let's just drop it. If this is really
needed please work on landing this functionality upstream.
Bug: 535619959
Cc: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id9f47b9225b14dc8dce29394f4b55534c6c7df34
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit ed7a77c50f.
Upstream reverted the equivalent patch in commit c1855dd0a6 ("clk: qcom:
Revert sync_state based clk_disable_unused") after finding some issues
with this approach [1]. Also, keeping this patch creates build issues
with further upstream patches, so let's just drop it. If this is really
needed please work on landing this functionality upstream.
Bug: 535619959
Cc: Greg Kroah-Hartman <gregkh@google.com>
Link: https://lore.kernel.org/all/20230222153415.5npe4axg4mupzvw4@ripper/ [1]
Change-Id: Ie8d6962080e6ddf1f7824910a69399dbfb01d245
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit fe7d795db4.
Upstream reverted the equivalent patch in commit c1855dd0a6 ("clk: qcom:
Revert sync_state based clk_disable_unused") after finding some issues
with this approach [1]. Also, keeping this patch creates build issues
with further upstream patches, so let's just drop it. If this is really
needed please work on landing this functionality upstream.
Bug: 535619959
Cc: Greg Kroah-Hartman <gregkh@google.com>
Link: https://lore.kernel.org/all/20230222153415.5npe4axg4mupzvw4@ripper/ [1]
Change-Id: Idec2aca7f460322546766eeb68a6f48974e39705
Signed-off-by: Carlos Llamas <cmllamas@google.com>
The TEST_MAPPING in common/fs is updated to import based for majority of the tests.
Test: presubmit
Bug: 436349608
Change-Id: Ifd4db9082d01d0ef252b5c70324c92c285311fa8
Signed-off-by: Betty Zhou <bettyzhou@google.com>
Update TEST_MAPPING in common/drivers/android to be import based for most of the tests.
Signed-off-by: Betty Zhou <bettyzhou@google.com>
Test: presubmit
Bug: 436349608
Change-Id: I00f768d3efe8b50ac17624e041d7eaf9c8e100d7
* These have been recently broken by a dependency upgrade. This commit
disables them while they get fixed.
Bug: 536813037
Bug: 536732335
Bug: 536739090
Change-Id: I279fbb2ce563e3597e96ec762b26866d12b0ea22
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
This will allow mixed builds to use source-built pahole.
Bug: 477549297
Change-Id: Ibc9293bef1fa9ce4ebeb8c0ba1126e9ce0ec0713
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
This config option is not used by microdroid VMs and already has been
removed upstream.
Bug: 529833761
Test: presubmit
Change-Id: Ie89025a7b3029c16562b1d4f11e9f77f5b7b74d3
Merged-In: Ie89025a7b3029c16562b1d4f11e9f77f5b7b74d3
Signed-off-by: Nikita Ioffe <ioffe@google.com>
(cherry picked from commit 6df17ae72b6245aeb206aff24190a76cf33561c0)
The CRYPTO_LZ4 config is now implicitly selected via HIBERNATION, so
remove it from our gki_defconfig files.
Fixes: 2068d7715e ("PM: hibernate: make LZ4 available for hibernation compression")
Change-Id: Ia298ccce5f6c2bd46a767f65dc6d82a0215f965e
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This reverts commit 9bd7b75557.
It creates merge conflicts with upstream patches. Plus, it doesn't seem
to be critical functionality for it to live in android-mainline branch.
However, it can be later reapplied if really needed.
Bug: 312392542
Cc: vincent wang <vincentwang3@lenovo.com>
Change-Id: Ib2fd55877dffb8a0199862780f0f3db71526a921
Signed-off-by: Carlos Llamas <cmllamas@google.com>
This makes the kernel builds use source-built pahole.
Bug: 477549297
Change-Id: I7ceb5d5349c1e920ff996a4d629ad0d1ad53948e
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
This reverts commit 7c4637b548.
Reason for revert: Qais raised some skepticism that the impact is as bad as earlier reported. Wants to have it still as an option to evaluate.
Bug: 458065944
Change-Id: I9ee82670e1a4802486083d987e0646ae3d447d36
Signed-off-by: John Stultz <jstultz@google.com>
CONFIG_RCU_LAZY causes RCU grace periods to be delayed, which negatively
impacts kfree_rcu() and sheaves freeing performance in SLUB allocations.
Since there is no active benefit or necessity for HZ=1000 in mainline,
disable/remove CONFIG_RCU_LAZY from gki_defconfig to prevent memory
reclamation regressions.
Bug: 458065944
Test: Verified gki_defconfig changes and RCU_LAZY removal
Change-Id: Ib30072f6f1a89a46907eda2167a366fa39139ea1
Signed-off-by: Howard Chen <howardsoc@google.com>
The sw_sync driver is useful for debugging and testing GPU drivers, and
is leveraged by several tests in the igt-gpu-tools test suite.
The driver carries a warning that it poses a risk of unsafe fence
management that can lead to userspace-initiated system deadlocks, so it
has been disabled in Android kernels to protect against this
possibility.
GMS requirements for Android 12 and newer disallow shipping devices with
debugfs mounted.
Beginning in the Android 4.9 kernel, sw_sync is only exposed through
debugfs, so enabling in newer GKI kernels for debugging and testing no
longer poses the risk to shipping builds.
Bug: 513375529
Test: tools/bazel build //common:kernel_aarch64
Test: tools/bazel build //common:kernel_x86_64
Test: adb shell ls /sys/kernel/debug/sync/sw_sync
Signed-off-by: Ryan Neph <ryanneph@google.com>
Cherrypick-From: https://android-review.googlesource.com/q/commit:f83948e947ffb1a8b1798cd576bc7d58263d9279
Merged-In: I5ab41385c9c30cdb1a4b21123eb4777c17adcb5a
Change-Id: I5ab41385c9c30cdb1a4b21123eb4777c17adcb5a