Grafico dei commit

31 Commit

Autore SHA1 Messaggio Data
Amol Jadi
01e22caa56 ubwcp: misc cleanup
Removed unused scm calls.
Copy to userspace only on successful hw version call.
Cleanup during probe failure.
During driver removal, update regs only if power ON was successful.

Change-Id: I7acc165bdb80b32e377c7c5704fa3863a3819b39
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-05-29 14:42:26 -07:00
Amol Jadi
21aed34bbd ubwcp: free path cleanup
Unlock before free.
Keep dmabuf ref until complete processing is done during set attr.

Change-Id: Idf0739bc9571cba91add8299f7b27f9a7c51e819
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-05-26 13:15:31 -07:00
Anthony Adamo
9c554efeb1 ubwcp: Add DLKM flag to guard compilation of ubwcp.ko
qmaa mode exposes dependencies on ubwcp.ko compilation
need to guard compilation of ubqcp.ko by dlkm flag

Change-Id: I2e171f2ae837b8ca7aa3e1e0d62731d4d3dde750
Signed-off-by: Anthony Adamo <quic_aadamo@quicinc.com>
2023-05-24 15:28:50 -07:00
Amol Jadi
cce20f5e49 ubwcp: set attribute path cleanup
Ensure buffer size is sufficient during re-configuration.
Ensure unused ioctl values are set to 0.
Fix use of uninitialized value when only plane-1 data is present.
Register mmap ula pa only if ubwcp configuration is successful.
Clarify failure handling of set attribute call.
Cleanup related code.

Change-Id: Ia6ac54e13aa2be1c4a1dc2d4b4a7715dad3aa142
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-05-03 10:42:07 -07:00
Amol Jadi
ff5feb8adc ubwcp: cleanup buffer lock tracking
Replaced use of locked with lock_count.

Change-Id: I5a963850b79ed425cc2eeee5e94cb44104cdccc3
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-05-03 10:40:34 -07:00
qctecmdr
f62cf02bdd Merge "ubwcp: Enable DDK build" 2023-05-02 09:01:59 -07:00
Amol Jadi
1d12729839 ubwcp: update failure handling
Put driver in fault state on critical failures.
Other minor cleanup.

Change-Id: I79154178ae57fe12a3ef87b51626fd420ccb55c0
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-04-24 16:05:34 -07:00
John Moon
e643ade79c ubwcp: Enable DDK build
Enable the DDK build by default in Android.mk.

Change-Id: Id364a32aec4a29d1e95dee0cb09c4e46784e328b
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-04-19 12:43:56 -07:00
John Moon
e49b12d76b ubwcp: Adding missing header file
Currently, the Bazel build fails due to a missing header file that
is not copied to the sandbox.

Add the missing file.

Change-Id: I2301eb9d072e07433b4eea06479986c25a0894c5
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-04-19 12:43:51 -07:00
qctecmdr
d310882b06 Merge "ubwcp: limit error logs" 2023-04-11 08:10:24 -07:00
Amol Jadi
d9bea7f7f4 ubwcp: limit error logs
Enable read & decode irq only for debug.
Rate limit error logs.

Change-Id: I782d5af9049bdb501d14f3cbc6a7f868d49da581
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-04-07 14:14:24 -07:00
Liam Mark
3c0b9be4c9 ubwcp: Replace add_memory with memremap_pages
Replace add_memory with memremap_pages as that will ensure that
ULA PA pages are not added to buddy.

Change-Id: I66dd4c533011f9e7ed4ed45697216ba947a4e3a3
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-04-07 13:17:49 -07:00
Amol Jadi
7049c53fc2 ubwcp: ioctl for stride alignment and bytes per pixels
Implements stride alignment and stride validate IOCTL.
Additional checks on stride value.
Fixes spell error in ioctl interface.

Change-Id: Ic4a41a12e2ffa8d45fd71938133accd069dff863
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-03-28 16:11:50 -07:00
Liam Mark
14742c1cfb ubwcp: optimize power and mem offline perf
Optimize the UBWC-P driver for power by ensuring that UBWC-P is only
powered up when there is a non-linear UBWC-P buffer allocated.

Optimize the performance of the memory offlining by
adding support for the CMO component to be interrupted by the
allocation of a new UBWC-P buffer.

Change-Id: Ib473c00b996782131799fd223eaf1ad7feca058b
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-03-28 09:54:00 -07:00
Liam Mark
b5312c5129 ubwcp: Set ULA PA range size from DT
Use the UBWC-P ula_range DT property to configure the
UBWC-P ULA PA range size.

Change-Id: I46579146904f76160c0f984d8e377e8d28a56dd7
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-03-28 09:53:32 -07:00
Liam Mark
fcb70f9328 ubwcp: add ftrace support
Add ftrace support to help with performance
measurements.

Change-Id: I21f762a9e25b2b745fbf4f72990c9932f823634b
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-03-22 16:25:49 -07:00
Liam Mark
bc6e2ce23d ubwcp: Re-map as uncached and invalidate
Re-map ULA PA as uncached and invalidate before power
collapse.

Change-Id: Ice676b98a472512c0be1ad83b5b592fec079e7ee
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-02-02 16:19:42 -08:00
Liam Mark
7a0417fe15 Revert "ubwcp: Keep UBWC-P powered on after buffer alloc"
This reverts commit ff2498ad42.

No longer needed now that we are doing CMOs with an
un-cached mapping.

Change-Id: I927b93aaf869755a9fe36e77a24874e5b83a331d
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-02-02 16:18:10 -08:00
Amol Jadi
47907f98a1 ubwcp: bazel support
Add support for bazel build system

Change-Id: I9ec76c8341d7d1c909725016c0387beb13302570
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2023-02-01 18:15:28 -08:00
Liam Mark
34771eb84c ubwcp: Add kernel error handler support
Add kernel error handler support

Change-Id: If7cdb1fe2858491ee6c523637eaf1bd6f7626e4d
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-02-01 10:27:27 -08:00
Liam Mark
bb3a224519 ubwcp: Add clocks support
Add support in the UBWC-P driver to enable the clocks
listed in the DT.

Change-Id: Ib94eadb89cc7e9901641570ff0b25d45306b0a13
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2023-01-17 11:07:28 -08:00
qctecmdr
1c6d2225cd Merge "ubwcp: Ensure UV plane is aligned" 2022-12-08 15:27:30 -08:00
Liam Mark
cb8c724b74 ubwcp: Ensure UV plane is aligned
Ensure linear aperture UV plane meets UBWC-P alignment requirements.

Change-Id: Ibdc887c2b7c6f4981d5587b2caca1b2c653893ae
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2022-12-08 14:26:24 -08:00
Amol Jadi
a4283e7c90 ubwcp: remove flush workaround
- workaround is not needed for read-only cases on v1

Change-Id: I6977f0ff1e7990ecfdcea5319e17b47c0106be27
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2022-12-05 15:49:46 -08:00
Liam Mark
bbc9e0b644 ubwcp: Switch to using offline_and_remove_memory
remove_memory doesn't work when memory hotplug has been enabled, switch
to using offline_and_remove_memory.

Change-Id: Ia62efc9394326cde5bb0a5dd76ba811f9b1d4b17
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2022-12-01 16:08:09 -08:00
Amol Jadi
ad3b9b9ada ubwcp: update one time config
- enable padding & scc bit

Change-Id: I6b74c98b73e13d34565527aeb11ad9ffd1c55ec6
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2022-11-22 11:36:57 -08:00
Liam Mark
ff2498ad42 ubwcp: Keep UBWC-P powered on after buffer alloc
Always keep UBWC-P powered on after first UBWC-P buffer is allocated.

Change-Id: If1785e53f8b9015032094ba20ead7b2cb6f05f63
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2022-11-17 15:05:08 -08:00
Amol Jadi
010a4acc07 ubwcp: r2 support and other misc changes
- Program height in bytes for non-v1 hardware
- Additional error checking at various places
  to prevent regulator call with NULL vdd
- Set_ops fails when we do rmmod and then insmod
  ignore the return value so we can successfully insmod
  This is a hack that needs to be removed for final product

Change-Id: Ib0252d7ddb7fa34aeeea7b1e1e3f81216e0cc5d3
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2022-11-14 15:53:34 -08:00
Amol Jadi
00184485c7 ubwcp: driver initial version
Implements driver to interface with ubwcp hw block

Change-Id: I092e45acfedd01978c383bc596e48da23f3e873e
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
2022-11-08 20:37:28 -08:00
Amol Jadi
09be32bc71 mm-sys-kernel: build framework files
makefiles for android builds

Change-Id: Ideef4c6424278c62db27b44a542694197fa8018e
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
2022-09-29 17:14:30 -07:00
Gerrit SelfHelp Service Account
3c8384bf4b Initial empty repository 2022-09-08 22:38:26 -07:00