| Commit message (Collapse) | Author | Age |
|
|
|
| |
Change-Id: I126075a330f305c85f8fe1b8c9d408f368be95d1
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://git.codelinaro.org/clo/la/kernel/msm-4.4 into android13-4.4-msm8998
"LA.UM.8.4.c25-06600-8x98.0"
* tag 'LA.UM.8.4.c25-06600-8x98.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.4:
diag: Prevent out of bound write while sending dci pkt to remote
diag: Ensure dci entry is valid before sending the packet
ion: Fix integer overflow in msm_ion_custom_ioctl
diag: Use valid data_source for a valid token
msm: kgsl: Remove 'fd' dependency to get dma_buf handle
msm: kgsl: Fix gpuaddr_in_range() to check upper bound
msm: adsprpc: Handle UAF in fastrpc debugfs read
msm: kgsl: Add a sysfs node to control performance counter reads
msm: kgsl: Perform cache flush on the pages obtained using get_user_pages()
soc: qcom: hab: Add sanity check for payload_count
msm: kgsl: Fix out of bound write in adreno_profile_submit_time
futex: Fix inode life-time issue
futex: Handle faults correctly for PI futexes
futex: Simplify fixup_pi_state_owner()
futex: Use pi_state_update_owner() in put_pi_state()
rtmutex: Remove unused argument from rt_mutex_proxy_unlock()
futex: Provide and use pi_state_update_owner()
futex: Replace pointless printk in fixup_owner()
futex: Avoid violating the 10th rule of futex
futex: Rework inconsistent rt_mutex/futex_q state
futex: Remove rt_mutex_deadlock_account_*()
futex,rt_mutex: Provide futex specific rt_mutex API
msm: adsprpc: Handle UAF in process shell memory
Disable TRACER Check to improve Camera Performance
msm: kgsl: Deregister gpu address on memdesc_sg_virt failure
crypto: Fix possible stack out-of-bound error
msm: kgsl: Correct the refcount on current process PID.
msm: kgsl: Compare pid pointer instead of TGID for a new process
qcom,max-freq-level change for trial
msm: kgsl: Protect the memdesc->gpuaddr in SVM use cases.
msm: kgsl: Stop using memdesc->usermem.
Conflicts:
drivers/char/adsprpc.c
drivers/char/diag/diag_dci.c
drivers/gpu/msm/kgsl.c
drivers/gpu/msm/kgsl_debugfs.c
drivers/gpu/msm/kgsl_iommu.c
drivers/gpu/msm/kgsl_mmu.c
drivers/gpu/msm/kgsl_sharedmem.c
drivers/gpu/msm/kgsl_trace.h
kernel/futex.c
kernel/locking/rtmutex.c
kernel/locking/rtmutex_common.h
Change-Id: I777ee96b855e2967ef6733e603d12f40174974d0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently gpuaddr_in_range() accepts only the gpuaddr & returns
true if it lies in valid range. But this does not mean that the
entire buffer is within range.
Modify the function to accept size as a parameter and check that
both starting & ending points of buffer lie within mmu range.
Change-Id: I1d722295b9a27e746bfdb6d3bf409ffe722193cb
Signed-off-by: Rohan Sethi <quic_rohsethi@quicinc.com>
Signed-off-by: Abhishek Barman <quic_abarman@quicinc.com>
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is a possibility of sharing process_private between two unrelated
processes due to PID wrapping. In kgsl_process_private_new(), instead
of checking numeric TGID, compare the unique pid pointer of the current
process with that of the existing processes in kgsl process list to
allow sharing of process_private data judiciously. Also, in all required
functions get TGID/PID of a process from its struct pid.
Change-Id: I0e3d5d79275cdb3f3c304fb36322ad56b0d0b227
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When SVM is being used there can only be one GPU address assigned
to the memory descriptor. Don't allow the GPU address to be changed
after it has been negotiated the first time by a process.
Change-Id: Ic0dedbad2a1b3ccdc2c1598a6c501b2be288d64e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Variable start should be of type int instead of u32. Correct this to
ensure while loop can exit and WARN_ON statement is effective in
case global VA space doesn't have enough space for current request.
Change-Id: I0bc817abc9a16934b5c91fc31ba9c6dff3545c90
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Signed-off-by: Pranav Patel <pranavp@codeaurora.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When SVM is being used there can only be one GPU address assigned
to the memory descriptor. Don't allow the GPU address to be changed
after it has been negotiated the first time by a process.
Change-Id: Ic0dedbad2a1b3ccdc2c1598a6c501b2be288d64e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
There is a possibility of sharing process_private between two unrelated
processes due to PID wrapping. In kgsl_process_private_new(), instead
of checking numeric TGID, compare the unique pid pointer of the current
process with that of the existing processes in kgsl process list to
allow sharing of process_private data judiciously. Also, in all required
functions get TGID/PID of a process from its struct pid.
Change-Id: I0e3d5d79275cdb3f3c304fb36322ad56b0d0b227
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
User should not be provided address out of SVM region.
Return error for any such requests from user.
Change-Id: If149044039b156f8192f405714f5c1a0571004e7
Signed-off-by: gkiranku <gkiranku@codeaurora.org>
Signed-off-by: Sebanti Das <sebadas@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
Select a random global GPU address for the "scratch" buffer that is used
by the ringbuffer for various tasks.
Change-Id: Ic0dedbaddda71dbf9cb2adab3c6c33a24d6a604c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
To prepare to allow global buffers to allocate a semi-random GPU address
move from a sequential allocator to a bitmap based one.
Change-Id: Ic0dedbadba36c4c7b7839528103997724eac7d6d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Harshitha Sai Neelati <hsaine@codeaurora.org>
|
|
|
|
|
|
|
|
| |
Log context type in case of GPU page faults or GPU faults.
Also add Vulkan context type to distinguish it from GL.
Change-Id: I7b93bf645b80abe82f2d6aa379296b2fffceb684
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a 64bit kernel, a 32bit user application is not
restricted to 3GB limit of virtual memory. It is
allowed to access complete 4GB range.
Move global memory region to 0x100000000 outside of
32bit range on 64bit kernel to increase the virtual
memory range for a 32bit application running on a
64bit kernel. This will also move secure memory
region to 0xF0000000.
Change-Id: I017ac0c052b4d9466f9f1a66af4a83f0636450cb
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
|
|
|
|
|
|
|
|
| |
Add kernel pointer restriction while printing the global
page table entries through the debugfs.
Change-Id: Ia2ef4243248ece477e3f679c0027379686670928
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
|
|
|
|
|
|
|
| |
Return an appropriate error code if the default pagetable is NULL.
Change-Id: Ic88b066c40a8f840d95fd3fbc9ee9274c428b66a
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
|
|
|
|
|
|
|
|
| |
Map the GPU QTimer area as a global into the GPU
IOMMU so that the GPU can access the QTimer.
Change-Id: If50bd36681123adde7e3a37644c41316f101154c
Signed-off-by: Jonathan Wicks <jwicks@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During a pagefault we print trace with the fault
information which gets delayed by unacceptable
time. It happens due to the the code that searches the
faulty address in the recently freed addresses for a matching
entry.
Moving it to new position wont have any impact on debugging
instead trace is dumped without any delay.
Change-Id: I11487798b60742096e06605cf3046b4cfc8cc057
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
Return error instead of BUG_ON on map global failure.
This will avoid crashing the entire system.
CRs-Fixed: 1106621
Change-Id: I693dc196bb7a2e01f6a033f5fbbf7b454108108d
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memdesc->pagetable is supposed to help ensure that memory gets
unmapped before it is freed, but the pagetable member is being
populated at create time not when the buffer gets mapped. This
forces the developer to ensure that the same pagetable is
used for both the create and map step. Instead, assign the
pagetable member when it is first used (to get a GPU address)
and put it away when the GPU address is released.
Change-Id: Ic0dedbad372fd9029b932dd99633a650049751ed
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
The DOMAIN_ATTR_COHERENT_HTW_DISABLE IOMMU domain attribute is being
removed. SMMU coherency will be configured through the SMMU device tree
nodes moving forward. Remove the obsolete option.
Change-Id: I4bbbfb90fe172e048cc9504c4e6be5f36501b485
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Log the nearby allocations for pagefaults on global buffers.
Print the names of the allocations that fall around the
faulting address on a global buffer. Also add a new debugfs
file to list all the global pagetable entries. Useful for
debugging pagefaults and other issues with "global" objects.
CRs-Fixed: 985631
Change-Id: Ifbbdc69044fc64d7ea02509bf8113ed94eeece1e
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to allocate/reserve a virtual address range without
physically backing. Add support to allocate physically backing memory
without assigning it a virtual address. Add support to unite
the two forementioned allocations together. Add support to
divorce them from one another. Add support to let their kids
do cache operations as they see fit.
Create a 'dummy' page that is used to back virtual allocations
that are not yet backed by physical memory.
CRs-Fixed: 1046456
Change-Id: Ifaa687b036eeab22ab4cf0238abdfbe7b2311ed3
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done to improve the kgsl vmfault routine. Currently,
it traverses the sglist to find the faulted page, which takes
linear time. By having an array of all the page pointers,
this operation will be completed in constant time.
Also, allocate sgt only for mapping this memory to the GPU.
Since this optimization is not needed for secure/global or
imported memory, we will not keep this array but keep
the sgt instead.
CRs-Fixed: 1006012
Change-Id: I221fce9082da0bdd59842455221b896a33a6ce42
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Map the GPU QDSS STM area as a global into the GPU
IOMMU so that GPU traces can be routed to QDSS.
Enable the gpuaddr and size of the area to be queried
from userspace.
CRs-Fixed: 1031648
Change-Id: I2e32522a42508a6bee088c95dc56a13935dd691c
Signed-off-by: Jonathan Wicks <jwicks@codeaurora.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of trying to make a decision to switch out the active
draw context for NULL at detach time leave the reference count
for it until the next context switch or until the next slumber
whichever comes first. This avoids races with the preemption
code and ensures a smooth transition.
A side effect is that we were depending heavily on the context
detach to reset the ringbuffer to the default at power down and
we didn't touch it on power up (though we did on soft reset and
wake from slumber. Curious). Obviously if we are no longer
switching we will need to force the default pagetable during start
but it seems to me like this would be the right thing to do even
if we were still switching out.
CRs-Fixed: 1009124
Change-Id: Ic0dedbadff8df192096292b221130c8ef5b31e12
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
iommu_attach_device() should return a log message for every
possible error and we don't need to double up the pain
especially for situations when we run out of available
domains and start getting a storm of ENOSPC errors back.
CRs-Fixed: 1009158
Change-Id: Ic0dedbad7416abb23c769a4d3be9ebd0ca04810c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|/
|
|
|
|
|
|
|
|
| |
We don't need to wait for idle before changing the pagefault
policy on the IOMMU which is a good thing because on a busy
system we may never hit idle.
CRs-Fixed: 1009187
Change-Id: Ic0dedbadb8f6122e32a0a34a65c54a7bca2a523c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
Allow MMU mappings to take offsets rather than only allowing
full range mappings.
CRs-Fixed: 971174
Change-Id: Iaa113c8414a2d2d8f92b3cb21eaf2e422f273454
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Allocate guard page when the first buffer is
mapped into the IOMMU. This also ensures that
the guard page gets allocated if the guard page
mmu feature is enabled.
CRs-Fixed: 988093
Change-Id: Id97492707463a1f15a4bf1c67b9c0f03214e6283
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable the guardpage workaround for A5x and instead
selectively suppress pagefaults. Suppress read pagefaults
that are likely caused due to UCHE overfetches. For this,
the fault address must be within the first 64 bytes of a
page and the fault page must be preceded by a valid allocation.
CRs-Fixed: 975293
Change-Id: I6a0995af3ab4129c6923726043c5f34c747641f9
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
| |
During the initialization sequence, submit a set of important
packets to the GPU in order to pre-load the I-cache with the
critical ucode instructions.
CRs-Fixed: 978777
Change-Id: Ic6a17b24d8c3aa383af8e25cf9ef771459d65796
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of looking up the process by pagetable base and
name, use the fault context to extract the pid and other
process specific information. This works for both the
per-process and global pagetable configurations and also
reduces some locking. This also reports the correct
pid and task name in the global pagetable configuration.
CRs-Fixed: 971753
Change-Id: I9c869527c3d1b2606f3d12234163935d6f5e43a9
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current MMU code assumes a binary state - either there is a
IOMMU or there isn't. This precludes other memory models and
makes for a lot of inherent IOMMU knowledge in the generic MMU
code and the rest of the driver. Reorganize and cleanup the
MMU and IOMMU code:
* Add a Kconfig boolean dependent on ARM and/or MSM SMMU support.
* Make "nommu" mode an actual MMU subtype and figure out available
MMU subtypes at probe time.
* Move IOMMU device tree parsing to the IOMMU code.
* Move the MMU subtype private structures into struct kgsl_mmu.
* Move adreno_iommu specific functions out of other generic
adreno code.
* Move A4XX specific preemption code out of the ringbuffer code.
CRs-Fixed: 970264
Change-Id: Ic0dedbad1293a1d129b7c4ed1105d684ca84d97f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a helper macro to convert an adreno_device pointer to a
struct kgsl_device pointer. This is mostly syntatic sugar
but it makes the code a bit cleaner and it abstracts a bit of
the ugliness away.
Change-Id: Ic0dedbadd97bda3316a58514a5a64757bd4154c7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
Global pagetable entries are exclusively for IOMMU and per-process
pagetables. Move all the code out of the generic driver and into
the IOMMU driver and clean up a bunch of stuff along the way.
Change-Id: Ic0dedbadbb368bb2a289ba4393f729d7e6066a17
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
|
|
|
|
|
|
| |
The setstate memory is a IOMMU specific construct. Move it to the
IOMMU code where it belongs.
Change-Id: Ic0dedbada977f2861f7c1300a5365da5b09d70a9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
_get_unmapped_area_topdown() subtracts the requested size
from lower entry base without really checking its value.
This leads to overflow while working at boundary conditions.
Add a condition to check entry base with the size and proceed.
Change-Id: Ic695da683b11de35c7c4b8936a35d693dc8fa452
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
mmapsize is no longer important to the memory descriptor
and the APIs that would use it never materialized. It currently
just tracks the size of the memdesc and is no longer needed.
Change-Id: I8fa1001c2f89f23034029de7de6ab77532bf45fa
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
|
|
|
|
|
|
|
|
|
|
| |
The code has gotten bloated and repeats the same logic in several
places leading to very stringy code. Consolidate this code to
enable easier readability as well as prep the code for future
changes to this area.
Change-Id: Ibb70cbae3a8a5157e589020ccebefff11b6ffaf1
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
|
|
|
|
|
|
|
|
|
| |
struct kgsl_mmu is a static member of struct kgsl_device so we can
use the usual container_of trick to get the device from a mmu
pointer rather than carry around an unneeded back reference.
Change-Id: Ic0dedbad7ff22e598b03d980dfbb738374ed5a7a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|
|
Snapshot of the Qualcom Adreno GPU driver (KGSL) as of msm-3.18 commit
commit e70ad0cd5efd ("Promotion of kernel.lnx.3.18-151201.").
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
|