When dmabuf does not exists in our record, we were matching it
to the last ubwcp buf instead of returning NULL. Also fixed
incorrect state check for hw ver call.
Change-Id: If899bab884a049dcbb8a9acd45a706d10e6d77d4
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
Failure to look up plane information during size calculatin
was returning size of 0. Instead return error and let the caller
handle error. This removes need for warn calls and communicates error
up the caller.
Change-Id: Ie147e20a64077fe586c7cd29ce91fe9dfe22a96c
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
Conversion between ioctl/internal/hw image formats is made consistent and
eliminated need for warn calls. Ioctl handling is broken down into
multiple functions.
Change-Id: Ic2786466f5dd7d6b2a380e030f8e04ead67dfe8c
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
Removed writing to override reg as default value is the same.
Use defines for hardcoded attribute limit values.
Change-Id: Ief67b048d5f94eeb260476e6c8aba5a5bf346436
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
Always invalidate on lock (even for write). This ensures that partial tile
writes will not overwrite buffer with dummy data from previously prefetched lines.
On subsequent lock calls, in case of write, update direction to bi_directional.
This way buffer will get flushed during unlock.
Change-Id: If3f1deffefe14af1dbdb2dae0a77b25106d35e5c
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
Width passed in to validation logic is in pixels and was
compared to stride in bytes. Updated to first convert width to
bytes before comparison.
Change-Id: Idef3d7d4e79109c556f083c9b95629d77f4717fc
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
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>
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>
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>
Put driver in fault state on critical failures.
Other minor cleanup.
Change-Id: I79154178ae57fe12a3ef87b51626fd420ccb55c0
Signed-off-by: Amol Jadi <quic_ajadi@quicinc.com>
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>
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>
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>
Add ftrace support to help with performance
measurements.
Change-Id: I21f762a9e25b2b745fbf4f72990c9932f823634b
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
Re-map ULA PA as uncached and invalidate before power
collapse.
Change-Id: Ice676b98a472512c0be1ad83b5b592fec079e7ee
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
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>