Age | Commit message (Collapse) | Author |
|
SBMerger: 610748217
Change-Id: I43570d7d183542afea64c54a1c79c032c5373919
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
The hrtimer_cancel() call will deadlock if it is called within the same
spinlock in the hrtimer interrupt handler function.
Bug: 326824585
Test: GCA
Change-Id: I75712c02f0ba4288956ec9a1df23b879627e12ba
Signed-off-by: Holmes Chou <holmeschou@google.com>
|
|
Validates read_entries and read_buf_size to ensure
they don't exceed reasonable limits that could trigger overflow.
Adds explicit checks before the calculation to detect potential integer overflows.
Bug: 322327963
Test: CTS/PTS, GCA_SMOKE TEST
Change-Id: I1b2e99cc83cfd751d3a82e501dbd64ddfebd039f
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
SBMerger: 605678113
Change-Id: I6eb93447f6148072a4e44cecfa668f5ddb0280f4
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
k_dev is the platform device that represents the physical hardware. k_dev is also set up for DMA operations and connected to the relevant IOMMU. We should use k_dev for iommu_dma_enable_best_fit_algo() call.
Bug: 317666175
Test: boot and check to log
Change-Id: If64daf0e2a2e61f7924f24eb9b154fe0c5dbb7d4
Signed-off-by: Holmes Chou <holmeschou@google.com>
|
|
Remove device enable log
Bug: 310523061
Test: GCA
Change-Id: I2754c03b4e4a151cd74cf71a8834d66d6ca04507
Signed-off-by: Holmes Chou <holmeschou@google.com>
(cherry picked from commit ae2e88527f5c0e81fa12219d0253535c22e47bfa)
|
|
Bug: 322483069
Test: gca_smoke
Change-Id: If6468d36c76499b23ecf6cd4c9c893a69259c811
Signed-off-by: Tommy Kardach <thomaskardach@google.com>
|
|
1. Lock when accessing periodic_io->active.
2. Lock when accessing lwis_client->timer_list.
Bug: 323203324
Test: GCA with MTE on
Change-Id: If756bf22d1675e2ad0309fc9a0817de3f479be4a
Signed-off-by: Holmes Chou <holmeschou@google.com>
(cherry picked from commit 31f8019a37d22981910f278693d821be0e60ae48)
|
|
We should make sure num_nodes is below the preset max value, and is
within a valid range.
Bug: 322326009
Test: manual test
Change-Id: Id9a6874997398ab743a8dcb88b509fcf19098e80
Signed-off-by: Tommy Kardach <thomaskardach@google.com>
|
|
SBMerger: 605678113
Change-Id: I8627a7ddc9c3d09ccab6f0c185102a106ac476bc
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Check the status value prior to setting the fence status, this
guarantees that we will exit the lwis_fence_signal method if the
fence has already been signaled.
Lock the transaction list during fence object release.
Bug: 322327063
Test: gca_smoke
Change-Id: I1181dcc264ec36851de5766995f7bc22696751f3
Signed-off-by: Tommy Kardach <thomaskardach@google.com>
|
|
SBMerger: 571992243
Change-Id: I2f61689a45e1ebb2feb734e2f6553f95669c3a9e
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
This change addresses the comments for the I2C Bus Manager feature.
1. Stop I2C bus manager kthread worker if there is an error during I2C
bus manager creation.
2. Fix setting transaction pointer to NULL after the transaction is freed.
3. Refactor functions to connect and disconnect the I2C clients from the
bus manager.
4. Refactor processing broken transaction based on transaction limit.
5. Refactor lwis_i2c_bus_manager_get_manager to lwis_i2c_bus_manager_get.
6. Refactor ptransaction to a non-hungarian naming scheme.
7. Fix comment formatting and copyright headers in LWIS files.
8. Refactor functions to queue work on transaction and bus manager
worker threads.
Bug: 316016899
Test: GCA Smoke Test
Change-Id: I3e6c36d048ffd4f8adc938578210f30e01d7dff5
Signed-off-by: Meghana Barkalle <mbarkalle@google.com>
(cherry picked from commit 55b89edc912e9207793f51e0f9f9d0d89e2dd203)
|
|
Current unknown command is printed in error log level. Use warning
instead of error should be better.
Bug: 317858822
Test: GCA
Change-Id: I173642ce376c9d3e5d91f3a112d58eb5f4a34ba3
Signed-off-by: Holmes Chou <holmeschou@google.com>
|
|
When we call iommu_dma_enable_best_fit_algo() in the
lwis_ioreg_device_parse_dt(), it needs a struct device input. We are
using ioreg_dev->base_dev.dev as input now, but it is not ready at this
moment. The best place to call iommu_dma_enable_best_fit_algo() should
be in lwis_ioreg_device_setup().
Bug: 321131062
Test: GCA
Change-Id: I257dfd3350500d21f9480fddebc4dec2af2004e8
Signed-off-by: Holmes Chou <holmeschou@google.com>
|
|
SBMerger: 571992243
Change-Id: Icd4c4a87ec76ff2a06979c16d7b33aca77832211
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Bug: 318461074
Test: build pass and hat tool
Change-Id: I9e1dfff080c9d083658d1fc05bb9d154da48f4de
Signed-off-by: Kamal Shafi <kamalshafi@google.com>
(cherry picked from commit a95c0e403ce6172d0d58f924c7163288985f5145)
|
|
SBMerger: 571992243
Change-Id: I72234f7447f7b8ad114057822d819f0f291b2006
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
SBMerger: 571992243
Change-Id: I217e8524e332fd868274360f4003a847f251efdb
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Revert submission 2521855-285981567
Reason for revert: open for 5.15 in-market kernel development
Reverted changes: /q/submissionid:2521855-285981567
Bug: 313355593
Bug: 309749142
Change-Id: Ie9774ed4cc2bf792122b597496635d78a860a47e
|
|
In order to move kmalloc to an atomic context,
it should be called with the GFP_ATOMIC flag and within a spinlock.
Bug: 315438415
Test: GCA_SMOKE, CTS
Change-Id: Idfec377b3773a7aa06db2da5ca9cdd6180dd785b
Signed-off-by: Nick Chung <nickchung@google.com>
(cherry picked from commit ccfb61d41a2961cbacbb2be8b1488447433f04e0)
|
|
The event_subscriber_list is used to subscribe and unsubscribe
from events. The list may be removed before it is unsubscribed from,
so it must be protected by a Spinlock to prevent data corruption.
Bug: 239867994
Test: Fuzzing test. GCA
Change-Id: Ibc8c2b218e16e5300bc68a3e4281fc0ba53adf62
Signed-off-by: Nick Chung <nickchung@google.com>
(cherry picked from commit 676c16df8585f0b8178dc5c22fee18033ea03ec8)
|
|
SBMerger: 571992243
Change-Id: I03f0c8070171848ddf9d987ab698278def070440
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Move the find_bts_block and lwis_dpm_update_qos_with_clock_family from
common directory to platform specific directory.
Bug: 308976572
Change-Id: I592ff6228d5d768335a4bb15ccd98d06d56d8a82
Signed-off-by: linyuny <linyuny@google.com>
(cherry picked from commit 176482983150f88d795cecf83fc4f2bf5413bdbe)
|
|
Define QOS update via qos_family_name under platform directory.
Cherry pick from other branch for qos interface cleanup purpose:
https://b.corp.google.com/issues/308976572#comment2
Bug: 308976572
Change-Id: Ib3a926c9701fc14a0bd41bc99e19b54bc04a2fed
Signed-off-by: linyuny <linyuny@google.com>
(cherry picked from I4d912ab3d69c2291218b4c909ae06ae7eb56c8ae)
|
|
For backward compatibility, we keep the family_name and use it for qos
update. But for new socs, we do qos update via qos_family_name.
Bug: 308976572
Change-Id: I0047261ee5da293e7425782a5acc13dd472ce279
Signed-off-by: linyuny <linyuny@google.com>
|
|
SBMerger: 571992243
Change-Id: I5a4bcef89f737ec210edf40af39c9a14cf396472
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
The change is to combine all of the event register bits
and then write the combined mask value once.
This can significantly reduce the number of register
read/writes and enable multiple bits all at once.
Bug:285798736
Test: CTS, GCA_SMOKE, Perfetto
Change-Id: Ie6c6c6bf8a17507b029f97cb4445064f363f66ba
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
SBMerger: 571992243
Change-Id: I785a97f46d52ca399d3575d8ebe831299d627480
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Bug: 298493098
Test: GCA
Change-Id: I6c5ae0d6349000684691b9e7c220e0984e298ad6
Signed-off-by: Edmond Chung <edmondchung@google.com>
|
|
SBMerger: 571992243
Change-Id: I8da872387a40e5e8e5b8f227784506d01a462560
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
devm_kzalloc() does not need kfree()
Bug: 307807231
Test: local build
Change-Id: I7c78d6d5b77686369b61f4c6fb2efe4713b61498
Signed-off-by: Holmes Chou <holmeschou@google.com>
|
|
The events have to be emitted after transaction cancellation.
Bug: 308201015
Test: atest liblyric.lwis_test, GCA_SMOKE, CTS
Change-Id: I3451a12f86e24def955de2b2919e70b4a1b95493
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
SBMerger: 571992243
Change-Id: Iab1a2cfef7ff68ac6ac49c0651c6d82c306c67f8
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
1) Rename the clock_family_name to qos_family_name
2) Restructured lwis_qos_setting_v3 interface in lwis.
Bug: 303071434
Change-Id: I12d2af16c25a28087094251f39340e8f529901cf
Signed-off-by: linyuny <linyuny@google.com>
|
|
Add new interface to support string type clock family.
Bug: 303071434
Test: CTS, GCA
Change-Id: I5912a6a42e04540320145ff5cd0485bc7565deda
Signed-off-by: linyuny <linyuny@google.com>
|
|
SBMerger: 558810260
Change-Id: Ife7dd6226ac15a50da941fccc833477fad3a78e5
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Measure the time from the trigger event of the transaction
to the start of transaction processing.
If the delta is greater than 5ms, print a warning.
Bug: 299571400
Test: GCA_SMOKE, CTS
Change-Id: Icf00b5f3183ca51f4a693f0f378e0dd2b37246de
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
It's not necessary to wait for all events in
the transaction processing queue to be processed
before emitting the event.
Bug: 289336115
Test: GCA_SMOKE, CTS
Change-Id: I062d7dabc50ac4123b8b10a1a4a5fd51688214a7
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
SBMerger: 558810260
Change-Id: Idd5294740628e91f6fbddc8c584fbdd5fe83e7b5
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Bug: 302544486
Test: Build
Change-Id: I7e683a9b038f248e104743a3acb7f4b58804ccfb
Signed-off-by: Edmond Chung <edmondchung@google.com>
|
|
SBMerger: 558810260
Change-Id: I4b31560a7bdd488a184d2d94aa23f1f9521dd03b
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
SBMerger: 558810260
Change-Id: I887a7a9d8bbc883976a73c911f7493986f62fb48
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
If we use spinlock in the nested case, we should separate the flags
for different lock.
Bug: 301174678
Test: GCA, CTS
Change-Id: Ib886f11cdc73185e719d888950a127ca7de2b384
Signed-off-by: Holmes Chou <holmeschou@google.com>
|
|
To prevent ramdumps caused by accessing invalid DMA address,
we have made sure that the dma addr is valid and add a lock to
avoid race condition when multiple clients access the DMA address.
Bug: 283654578
Test: CTS, GCA, Force to ramdump to check it.
Change-Id: Iba1b9850f0aefa8025fe51504a1b39374ec385ae
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
Bug: 267775002
TESTED: https://acma.teams.x20web.corp.google.com/lwis_coverages/lwis_coverage.info
Change-Id: I4380778280ec1e6c45dc3b89377425c337f20e75
Signed-off-by: linyuny <linyuny@google.com>
|
|
SBMerger: 558810260
Change-Id: I048fc1cdd7fe33189476079ad271aa29b3139e30
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
To avoid a race condition, we should protect the
lwis_i2c_dev_is_in_use function with the same group i2c lock.
Bug: 295526174
Test: GCA_SMOKE, CTS, I2C integration test
Change-Id: I0c843ffc22fa1dff022fea4cf9fb2c98d5e1434b
Signed-off-by: Nick Chung <nickchung@google.com>
|
|
SBMerger: 558810260
Change-Id: I2b9dc56c400ffb7285e530e0d101d31a4056beef
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
|
|
Since (b/289966000) GSE takes more than 5ms to finish SW reset in some
rare cases, causing LWIS polling timeout, we need to get some data on how long it took the ISP to reset.
It doesn't cause log spew in normal cases. There are only two cases(IPP and GSE) that take more than 5ms, and they are rare.
Bug: 290195085
Test: GCA_SMOKE, CTS
Change-Id: Ica812cbd9bae6175091da5a6b765bbdbf9e737a7
Signed-off-by: Nick Chung <nickchung@google.com>
|