Initialize the return value before it is used in the driver to
make sure valid return value is returned.
CRs-Fixed: 1050136
Change-Id: I3e2c524ac87d57ae33cd0f28b9c62b2a39ee79ad
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Update the algorithm applied to open-loop voltage partial binning
values so that it only affects the lowest two fused corners (i.e.
MinSVS and SVS). These values correspond to valid voltages for
the highest two fused corners (i.e. Nominal and Turbo).
Change-Id: Ifa54325a1364f10b6f1760c52ad029612114759c
CRs-Fixed: 1050071
Signed-off-by: David Collins <collinsd@codeaurora.org>
In batch mode Venus will be IDLE after sending EBD's and FBD's
to host. Power collapsing Venus at this time can save power.
CRs-Fixed: 1049499
Change-Id: I795d14fd4bc3b5f31897a70009546238117b0825
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
QOS values are programmed wrongly for msmcobalt. This can
affect Venus performance. This change fixes the same.
CRs-Fixed: 1046678
Change-Id: I6d474c2279422abe63ad625f35809fe156e8c465
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
The set_rate requests from the display port clocks should always
make their way upto the DP PLL. Add the NO_RATE_CACHE flag to
clocks in that path in order to let this happen.
CRs-Fixed: 1050007
Change-Id: I6a848b04756b92f9b1149705176e8f4088b2a945
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Ensure we don't try to call online/offline functions with a
null-pointer.
CRs-fixed: 1049957
Change-Id: I6fa8f9bde5d5fd0680b5c571ba3cc99bd1f508b1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Re-enable QTAGUID so that bandwidth control is possible from
userspace now that stability issues have been resolved by
picking upstream commits.
Change-Id: If3b0be88f28da82a08dc4cc67006e8ee8ced5a72
CRs-Fixed: 1035969
Signed-off-by: Bryse Flowers <bflowers@codeaurora.org>
Register a notifier callback with the power_supply framework
to detect when the bms power_supply is available so that
it can be used to query the battery properties required from
the fuel gauge for the maximum current query algorithm.
CRs-Fixed: 1043718
Change-Id: Icd535025a2f888e188f89841f32ac5b822f9b20d
Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
Currently the remote rx_intent is stored with the primary information.
The transport cannot provide a cookie to be retrieved and used later during
transmission.
Add support to receive a remote rx_intent with a cookie.
CRs-Fixed: 1045916
Change-Id: Id5f204647205b2fde9e5cb422a3ddc8cc4f3a5a0
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Treat 0 as a valid fd instead of treating it as an error.
CRs-Fixed: 1030098
Change-Id: I4a1b14fcbca617bc2a43b30af7256edc3920f04c
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Make VBIF register dump more generic to avoid adding new entry
for every VBIF revision. There will not be any change in register
mapping and address for new VBIF revision. AHB reads are permitted
throughout entire VBIF range. For all unoccupied registers read
values driven to 0 by HW but should not be relied upon.
CRs-Fixed: 1021711
Change-Id: I5aada474389e9189abcd38f1bc4854ada91dea87
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Scheduling issues were occurring with the GPU event worker after
b7be807 (msm: kgsl: Unbind the kgsl-event workqueue) was merged.
In certain conditions, it seems that the kgsl-event workqueue
was conflicting with the KGSL worker and slowing it down.
It turns out that everywhere we schedule the event worker
and the dispatcher worker at the same time. Since the worker
is singlethread, the event worker and the dispatcher run
synchronously anyway, so it makes sense to run the event processor
from within the dispatcher and save the extra schedule.
CRs-Fixed: 1043509
Change-Id: Ic0dedbad67eb04d41afb6add4477f146dfff9784
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
For A3xx we get GPU read pointer from the CP_RB_RPTR
register instead of rptr scratch memory address. In
retire_cmdbatch() and _retier_maraker() GPU clock will
be off, so avoid reading CP_RB_RPTR register. Also hold
device mutex in sendcmd() to access GPU registers.
CRs-Fixed: 1024730
Change-Id: Ifa5e9d3f892301685cb48a227ce4967d895499b1
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Check the return value of dma_buf_get function using
IS_ERR_OR_NULL as dma_buf_get function can return
ERR_PTR(-EINVAL) which won't be caught by simple NULL
check. This will avoid kernel panic due to invalid
pointer access.
CRs-Fixed: 1008517
Change-Id: I11ebf618edd25a251d3fb8bb7fbbb886e10d788f
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Dump 256 instead of 128 dwords of SDS as DRAW_STATE_ADDR is
actually 8 bits wide [7:0] and not 7 bits wide [6:0].
CRs-Fixed: 1023608
Change-Id: I8dcb07bf0a3b9e91b6ec7396d89239fdbd548ac0
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
A540 has a new vbif version. Add it so that we can
dump vbif registers in snapshot for A540.
CRs-Fixed: 1024192
Change-Id: Id9323fa98951e2755fcc6903f84a450bc7ab6169
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Add the register to be dumped in a5xx snapshot.
CRs-Fixed: 1024179
Change-Id: I316029caa10047828375ae0eab1f1d35d30fccb6
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
A5xx GPUs currently don't need more than 64KB for
CP preemption record.
CRs-Fixed: 1019529
Change-Id: I3df22b7b282fb8ff3269f01b2b258318fc83cbcb
Signed-off-by: Hareesh Gundu <hareeshg@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>
This change adds a check to avoid allocating memory for loading microcode
in case it is already allocated. This avoids memory allocation failure
for microcode during multiple tries by userspace to open the kgsl device
in case of errors.
CRs-Fixed: 1043490
Change-Id: I018ebdb0dab1fc13af8d85a273c1c8b477fa1e26
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Tracks GPU active time per frequency for GPU workload
profiling. The data will be output in
/sys/class/kgsl/kgsl-3d0/gpu_clock_stats
with one u64 value in microseconds per clock level.
For example:
cat /sys/class/kgsl/kgsl-3d0/gpu_clock_stats
39392 29292 929292 929292 4040404
CRs-Fixed: 1011462
Change-Id: I5f2caa8b38d99ffd23f03c1dfed1efda273fc2fb
Signed-off-by: George Shen <sqiao@codeaurora.org>
Code clean up that makes the driver more like a linux driver.
Add some error recovery to make sure driver will not crash when
error is occurs. Also have cleared the checkpatch errors on 4.4.
This patch is propagated from 3.4 kernel 'commit c2fcdcda743f
("input: touchpanel: Goodix GT915 driver cleanup")'
Change-Id: I3af425f5f0251ec576168f72a2059f85c3be4358
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
[abinayap@codeaurora.org: Fix checkpatch errors for 4.4 kernel
- check for sizeof(p_cfg_grp)/sizeof(p_cfg_grp[0]) that could
be ARRAY_SIZE(p_cfg_grp)
- check for sizeof(touch_key_array)/sizeof(touch_key_array[0])
that could be ARRAY_SIZE(touch_key_array)
- Comparisons should place the constant on the right side
of the test]
Signed-off-by: Abinaya P <abinayap@codeaurora.org>