summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm (follow)
Commit message (Collapse)AuthorAge
...
* | msm: kgsl: Correct memory type update in IOCTL_KGSL_GPUOBJ_SET_INFODeepak Kumar2018-03-02
| | | | | | | | | | | | | | | | | | A bad user can pass memory type parameter value greater than 255. Limit the memory type value to valid range before updating memory descriptor flags to avoid incorrect flag update. Change-Id: I23ce69584d1e2c9969583461ee942c5046e7cdbc Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
* | msm: kgsl: Fix reading lm_sequence in _execute_reg_sequence()Archana Sriram2018-02-26
|/ | | | | | | | | Added proper checks while reading lm_sequence array so that it is not accessed beyond lm_size. CRs-Fixed: 2175951 Change-Id: I639b07fba275aad0f62cc03fa11201c126e24812 Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
* msm: kgsl: Prevent race condition when freeing memoryDeepak Kumar2018-02-21
| | | | | | | | | | Add a check to set the pending_free flag if it is not already set before freeing sparse memory entry. This is required to prevent multiple ioctl threads from freeing the same sparse memory entry. Change-Id: I4e2bbe6fcd98c58d36340c4f87cdff27fc1de22e Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
* Merge "msm: kgsl: Properly remove ref count on gpuobj_sync failure"Linux Build Service Account2018-02-19
|\
| * msm: kgsl: Properly remove ref count on gpuobj_sync failureCarter Cooper2018-02-16
| | | | | | | | | | | | | | | | | | | | The user can pass bad data into kgsl_ioctl_gpuobj_sync(). If _copy_from_user() fails do to bad data, undo any current references taken through this ioctl call. Change-Id: I56195520b9dadba20ee419658fc2cbb282b8449c Signed-off-by: Carter Cooper <ccooper@codeaurora.org> Signed-off-by: samit vats <svats@codeaurora.org>
* | msm: kgsl: Add a check for valid frequency of RBBM timer clockArchana Obannagari2018-02-15
|/ | | | | | | | | | rbbmtimer_clk hardwired fixed XO frequency 19.2Mhz. clock_round_rate() for RBBM timer clock fails with -EPERM as it is fixed. So added a check to make sure that rbbmtimer_clk clk_set_rate() has valid frequency. This avoids warning message in the driver log. Change-Id: I8f8bcec88e6a39e1550bb67590e6b66dba8e7a27 Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
* msm: kgsl: Update global memory base to 0XFC000000 for 64bit kernelDeepak Kumar2018-01-30
| | | | | | | | | | | | KGSL memstore GPU address should be 32bit value for user mode graphics driver to successfully mmap device memstore. Move global memory base to 0XFC000000 from 0X100000000 for 64bit kernel to allow user mode graphics driver to successfully mmap memstore. Change-Id: Iadfbde5e2b13c1be943a272e424f6c5f05cc1b97 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
* msm: kgsl: Move global memory region to 0x100000000Deepak Kumar2018-01-23
| | | | | | | | | | | | | | | 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>
* Merge "msm: kgsl: Capture all the shader data in the snapshot"Linux Build Service Account2017-12-01
|\
| * msm: kgsl: Capture all the shader data in the snapshotLynus Vaz2017-12-01
| | | | | | | | | | | | | | | | | | The shader block size is in dwords. Make sure we copy out all the bytes that we want. Change-Id: I42364350ee6314b4830ed11cc06e61d854122543 Signed-off-by: Lynus Vaz <lvaz@codeaurora.org> Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
* | msm: kgsl: Fix the process sysfs refcountingLynus Vaz2017-11-30
|/ | | | | | | | | | The kobject used for the process's sysfs node did not provide a release function, so it did not correctly implement the refcounting. Add a release callback so that we keep the process structure valid as long as the kobject is alive. Change-Id: I6db54092ed29ecd4d2f157188a4f1a5fc70f1edf Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
* Merge "msm: kgsl: Update the dispatcher timer properly"Linux Build Service Account2017-11-19
|\
| * msm: kgsl: Update the dispatcher timer properlyLynus Vaz2017-11-08
| | | | | | | | | | | | | | | | | | The dispatcher timer should be updated if preemption is not in progress. This schedules the dispatcher work in case the command does not make progress. Change-Id: I9ef55b12d7a4f07a3c5bba650e37453bd8f86ce3 Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
* | msm: kgsl: Use the bind lock when dumping entriesLynus Vaz2017-11-14
| | | | | | | | | | | | | | | | Take the bind lock when we dump information about sparse memory allocations through the debugfs node. Change-Id: I955d64d06a259a2bbe4d85a33d68887ee01aad07 Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
* | msm: kgsl: Do not expose kernel pointer for global entriesHareesh Gundu2017-11-11
|/ | | | | | | | 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>
* Merge "msm: kgsl: Add property to determine commands timeout"Linux Build Service Account2017-11-05
|\
| * msm: kgsl: Add property to determine commands timeoutSunil Khatri2017-10-30
| | | | | | | | | | | | | | | | Add the property to determine the current command timeout value which is used by the clients via KGSL IOCTL. Change-Id: Ifd6b373d211ebd78dc3a8032ede073258487d689 Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
* | msm: kgsl: Print Vulkan memory types as wellYoung Hwan Kwak2017-11-02
|/ | | | | | | | | Vulkan memory types are added into UMD. Print Vulkan memory type as an int value. CRs-Fixed: 2119633 Change-Id: Idf5d58a6a02dbef6ef8cf6663e7819d221bf3e11 Signed-off-by: Young Hwan Kwak <ykwak@codeaurora.org>
* msm: kgsl: Add a check for availability of RBBM timer clockArchana Obannagari2017-10-10
| | | | | | | | | Before calling kgsl_pwrctrl_clk_set_rate(), make sure the RBBM timer clock is available. This avoids warning messages in the driver log. Change-Id: I0cd21b7253c802e8522d570056c8aeda02729267 Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
* Merge "msm: kgsl: Avoid cache ops on secure memory"Linux Build Service Account2017-10-07
|\
| * msm: kgsl: Avoid cache ops on secure memoryAkhil P Oommen2017-10-04
| | | | | | | | | | | | | | | | | | | | | | There is no check before cache ops if the memory is marked secure. This leads to stage 2 pagefault if a secure memory is passed to IOCTL_KGSL_GPUMEM_SYNC_CACHE ioctl because kernel is not allowed to do cache ops on secure memory. This can be avoided by returning success immediately if the memory is marked as secure. Change-Id: I215d77d2a488cdb00e8e18cfd38cddd9632fd9f6 Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
* | Merge "msm: kgsl: Fix size check issue in _read_fw2_block_header()"Linux Build Service Account2017-10-05
|\ \
| * | msm: kgsl: Fix size check issue in _read_fw2_block_header()Archana Obannagari2017-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | During firmware data read, it may leads to cross the max range. Add a check to validate data size with in the max range. Change-Id: I12b3c1761214a7d2af2c45ad73bf61954c8398b6 Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
* | | Merge "msm: kgsl: Fix calculation of size in _load_regfile"Linux Build Service Account2017-10-05
|\ \ \
| * | | msm: kgsl: Fix calculation of size in _load_regfileArchana Sriram2017-09-26
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During firmware load, there could be data over reads due to calculation of lm_size and lm_sequence from block and block_size. Added bounds checking to prevent this and improved the size calculation. CRs-Fixed: 2107981 Change-Id: Ib4283951b0d6c8fb699af1f85e657981ad4c0318 Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
* | | msm: kgsl: Use a lock when updating the sparse bindingsLynus Vaz2017-10-04
| | | | | | | | | | | | | | | | | | | | | | | | Use the appropriate lock when adding sparse bindings, to protect the list of sparse bindings from concurrent updates by multiple threads. Change-Id: Ice9750c96fca42f4049ed352533f4722b5166221 Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
* | | msm: kgsl: Bail out when two threads add sparse bindingsLynus Vaz2017-10-04
| |/ |/| | | | | | | | | | | | | | | If we find that a different thread has already added bindings at the same offset we wanted to add to the sparse object, don't get stuck in an infinite loop, and return with an error. Change-Id: I6b17c91eccb14c07e13cae24135dfe7b13f3301d Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
* | msm: kgsl: Don't read stale crashdumper dataLynus Vaz2017-09-25
|/ | | | | | | | | | | After the crashdumper runs once, and the user sets the snapshot_crashdumper sysfs node to 0, it is possible that stale data is saved off into the snapshot. Check the value of the sysfs node at the appropriate place to force a re-read of the data through the legacy path. Change-Id: Icf27c39b68d786003c33fd0eb22bd3e8b9a036be Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
* Merge "msm: kgsl: Do not crash on context detach timeout failure"Linux Build Service Account2017-09-15
|\
| * msm: kgsl: Do not crash on context detach timeout failureHareesh Gundu2017-09-13
| | | | | | | | | | | | | | | | | | | | | | | | If context wait for global timeouts in detach path there is no use to process its pending commands. Hence to handle context detach timeout failure,invalidate the context and remove all the pending commands from that context. So that other context commands proceed successfully after the context detach timeout fault recovery. Change-Id: Ie4ff0ed5d08312d345b248a2404ce085552b0b09 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
* | Merge "msm: kgsl: Fixing an uninitialized variable in _gpuobj_map_useraddr()"Linux Build Service Account2017-09-15
|\ \ | |/ |/|
| * msm: kgsl: Fixing an uninitialized variable in _gpuobj_map_useraddr()Archana Obannagari2017-09-11
| | | | | | | | | | | | | | | | | | | | Uninitalized kernel variable passes to userspace, it may have data from stack. To avoid data leak from kernel to userspace initializes struct kgsl_gpuobj_import_useraddr to zero. CRs-Fixed: 2096006 Change-Id: Ib79b030cd5e3edd7279632af20dc3fac95eb73d4 Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
* | Merge "msm: kgsl: Protect the bind object against bad dereference"Linux Build Service Account2017-09-12
|\ \
| * | msm: kgsl: Protect the bind object against bad dereferenceSunil Khatri2017-09-07
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Sparse bind object are unbinded with bind id. This can be exploited by any malicious application calling unbind with same bind id again and again. This can lead to a race condition between two threads where one free the bind object and second thread uses same object leading to bad dereference. Change-Id: I542a008fc647489560667fb5016453a0c3448f7a Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
* | Merge "msm: kgsl: Limit the kgsl log frequency in kgsl_get_unmapped_area()"Linux Build Service Account2017-09-11
|\ \
| * | msm: kgsl: Limit the kgsl log frequency in kgsl_get_unmapped_area()Venkateswara Rao Tadikonda2017-09-07
| |/ | | | | | | | | | | | | | | Reduce the frequency of kgsl logging when kgsl driver failed to get memory mapping for requested memory. Change-Id: If1a8832a9aa0396e3c990916deec7949697be12d Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
* | Merge "msm: kgsl: Do not allocate scratch memory for A3xx"Linux Build Service Account2017-09-11
|\ \
| * | msm: kgsl: Do not allocate scratch memory for A3xxHareesh Gundu2017-09-08
| |/ | | | | | | | | | | | | | | | | A3xx device gets the ring buffer read pointer directly from the GPU registers. So don’t allocate scratch memory which can’t be used for A3xx GPU devices. Change-Id: I95016dfc169b9fee74e978f5560592740f34515e Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
* | Merge "msm: kgsl: Fix gpu fault issue while enabling stall on page fault"Linux Build Service Account2017-09-11
|\ \
| * | msm: kgsl: Fix gpu fault issue while enabling stall on page faultHareesh Gundu2017-09-08
| |/ | | | | | | | | | | | | | | | | | | | | Stall on page fault feature is supported on A5XX and later GPUs. Enabling this feature on unsupported GPUs causes GPU faults. So don't insert GPU stall related commands in ringbuffer if not supported. But allow user to capture the GPU snapshot on GPU page fault. Change-Id: Ied26a5b4f44c1877b289a0ff5c0a6d47901e453d Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
* | Merge "msm: kgsl: Add debug log in adreno_of_get_pwrlevels()"Linux Build Service Account2017-09-11
|\ \ | |/ |/|
| * msm: kgsl: Add debug log in adreno_of_get_pwrlevels()Hareesh Gundu2017-08-25
| | | | | | | | | | | | | | | | Add debug log to dump the GPU speed bin value incase probe fails due to efused bin value mismatch with speed bin value. Change-Id: I329523f8dbb82272418981a54a1c2e6cf5e90b85 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
* | msm: kgsl: Return supported page size based on available memory poolsDeepak Kumar2017-09-01
|/ | | | | | | | | | In case memory pools are supported return the page size as supported only if corresponding memory pool is available. This will increase the usage of memory pool and will reduce the overall allocation time. Change-Id: Iea84a4259b38fe9cb546419dfcbaf0a9666e7ca9 Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
* Merge "msm: kgsl: Add disable-wake-on-touch devicetree property" into msm-4.4Linux Build Service Account2017-08-20
|\
| * msm: kgsl: Add disable-wake-on-touch devicetree propertyHareesh Gundu2017-08-08
| | | | | | | | | | | | | | | | | | | | Add a devicetree "disable-wake-on-touch" property support to disable GPU wake up on touch input events. This will help save power in case of unintended taps and swipes, for example, when the screen is wet. Change-Id: I35768dc78c473272472aaf9c0e09e66d75817b2c Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
* | msm: kgsl: Correctly update fence_name for larger timestampAbhilash Kumar2017-08-09
| | | | | | | | | | | | | | | | | | Since 'timestamp' is of unsigned int type, for larger timestamp the format specifier %d can show negative values. Fix this by using %u format specifier for timestamp. Change-Id: I621dfd4843099cb27436006500fe3342d1d5ddf4 Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
* | Merge "msm: kgsl: Disable VPC all flat shading optimization for A5XX"Linux Build Service Account2017-08-07
|\ \
| * | msm: kgsl: Disable VPC all flat shading optimization for A5XXHareesh Gundu2017-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set ALLFLATOPTDIS bit in A5XX_VPC_DBG_ECO_CNTL register to disable VPC all flat shading optimization. ALLFLATOPTDIS is a hardware chicken bit value needs to be set one, to avoid UI rendering corruption. Change-Id: I39b5ad098daacbb1c3b0fc93963d82d477f70cc1 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
* | | Merge "msm: kgsl: Protect the event->handle with spinlock"Linux Build Service Account2017-08-07
|\ \ \ | |_|/ |/| |
| * | msm: kgsl: Protect the event->handle with spinlockSunil Khatri2017-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | event->handle pointer can be used after free due to the race condition between kgsl_sync_callback and kgsl_sync_fence_async_cancel. Protect the event->handle with a spinlock to avoid concurrent access issues. Change-Id: I3719e401af9ece82ac68b72f2aef784c7fdc1104 Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>