Reference count the calls to ion_{un}secure_heap. The secure SCM
call will only be made when the count goes from 0 -> 1 and the
unsecure call will only be made when the count goes from 1 -> 0.
Change-Id: Ia221b79782c9223d9853ef00c2848e1ab7a73091
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
The next generation of content protection has separate SCM
calls into TZ. Add these functions in a dedicated file so they
can be used by any Ion heap.
Change-Id: I197130f6a5fc33efcd6871b0f7c362fa99f18d20
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
kgsl_core_exit() should not call kgsl_sharedmem_uninit_sysfs() and
device_unregister() if those resources have not been allocated.
We check this by seeing if kgsl_driver.virtdev has been
populated or not.
CRs-fixed: 359477
Change-Id: Ic040667b29bd4e006e6f29a50809d94a2bb4b469
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
This patch fixes a possible interrupt storm condition by
the USB wake IRQ, which can cause a dog timeout crash.
The USB wake IRQ detects USB bus suspend on USB D+ line.
This can be done by a rising edge triggered interrupt,
rather than level triggered interrupt.
Change-Id: Ia5451c3847285d38dde893856680a011674bd1e3
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Dump the shader memory (working memory and shadow memory) for A3XX GPUs
in the snapshot.
Change-Id: Ic0dedbadf28733b96323a680b014dbea10b1ceda
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Update the snapshot header to version 2 to return the raw chipid
in the dump.
Change-Id: Ic0dedbad82bbe61395924bf49cb0144e5e2e10e3
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
There are some subtle differences between revisions of GPUs
that are not reflected in the GPU ID value. Return the raw
chipid (derived from the hardware) along with the GPU ID
when queried.
Change-Id: Ic0dedbad035a80726e6fedc066ec11b78b79da2b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Needed on 8x30 MTP/MDP platforms, where interrupt line polled up and
does not work with driver's default configuration
Change-Id: I4827c7a1f7df147245336d18523088c013381f1e
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
The code seeking out the failing frame for a hang got confused if
the CP read and write pointers were equal resulting in missing
IBs.
Change-Id: Ic0dedbadb32e4a708d0f8ee9e8a853fdfaff10b0
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This reverts commit a369ce03ca048fb511642ac1cb73c1f652d70c50.
The change is no more required as pan_update is not being called
and overlay set is now being used instead.
Change-Id: I7b25c256ab57e620f319058638371e079642c448
CRs-Fixed: 367233
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Use a iterator to cleanup how snapshot GPU objects are printed.
This removes a ton of ugly math, and allows us to do subtle
silly things like add padding at the end of a non dword
aligned object.
Change-Id: Ic0dedbadabeee50f42fe9be62ea0b7dfc1f333da
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Enhance the logic that checks to see if the CP_RPTR is stuck
mid packet. Ensure that when we do packet counting that we
use real type3 packets instead of regular data pretending to
be a type3 packet.
Change-Id: Ic0dedbadb502fa2790df0c6752309da300d6d1ae
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Currently we just check the most significant two bits of a dword
in the ringbuffer or IB are set to decide if the data is a type3
packet header. This has proven to be problematic, as it turns out
that the top two bits are often set in nominal data. Enhance
the type3 packet check to verify that various reserved bits in
the dword are 0 as expected.
Change-Id: Ic0dedbada5eff8353bc64da9eefd9919de127fa4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
User side drivers are starting to use more indirect buffers
for CP_LOAD_STATE, so expand the snapshot to support grabbing
all of the possible combinations.
Change-Id: Ic0dedbadff743d03b5accb2a0299ab5dc0bc1a61
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Change the configuration of PM8921 regulators SMPS 7 and LDO 27
so that requests sent to the RPM for these regulators have pd=0
(i.e. pull-down disabled). This modification reduces leakage
current that is seen during XO shutdown when S7 and L27 are
disabled but S3 is kept on. The outputs of S3 and L27 are wired
together so the S3 output voltage is continuously dropped across
the L27 pull-down resistor if it is enabled. S7 is the parent
supply of L27 so the same problem is seen if its pull-down
resistor is enabled.
Change-Id: Ic1b380edc9f60218f2012f2a4bb67467dc099005
CRs-Fixed: 369947
Signed-off-by: David Collins <collinsd@codeaurora.org>
The control cmd structure for sending events to and from the
camera daemon has been updated for camera controls in server
node. Gesture control has been updated leading to crash since
both camera and gesture uses the same server node.
Adding the change to reflect the changes for gestures.
Change-Id: I82d20294d1026a5dce7d63f6d009c83f3f895e56
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
Override the default autosuspend delay of 4 seconds--that is, 2
seconds for device and 2 seconds for the root hub, to 1s for the
HSIC-connected MDM device and 200ms for the root hub. This should
minimize the time spent active for better power savings.
CRs-fixed: 353213
Change-Id: Idfa49928dbb7fd2508deec0b9fab25e1cbcdf078
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Prop bit is checked in userspace and must be set in
driver in order to be recognized correctly, since it defaults
to mouse pointer.
Change-Id: Ibc3ce400033af171b60821c2945596676107eb75
Signed-off-by: Jessica Gonzalez <jgaona@codeaurora.org>
Prop bit is checked in userspace and must be set in
driver in order to be recognized correctly, since it defaults
to mouse pointer.
Change-Id: Id490152174624e86e8b62b746d25baf2d544080a
Signed-off-by: Jessica Gonzalez <jgaona@codeaurora.org>
Accessing buffer pointer before initialization results in device crash.
To memset the buffer using physical address also results in a device crash.
Fixed this by initializing the buffer pointer before it is accessed and
memset the buffer using the virtual address.
Change-Id: I3b03f56cf988c9471c7988665bcec3c467e60bfc
Signed-off-by: Amal Paul <amal@codeaurora.org>
CPUFreq provides scaling sysfs nodes to set min and max frequencies, but
there are times when the operating range has to be controlled
irrespective of the scaling limits, to ensure the thermal stability of
the device.
The API allows kernel thermal safeguards to pitch in and limit the
frequencies.
Change-Id: I3dc7496747792e6223695131f1644dd87054b025
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
commit e879990 (USB: EHCI: remove usages of hcd->state) removed the
hcd->state usage in EHCI driver. Instead rh_state field of ehci_hcd
struct should be used. But the current code is still using
hcd->state. This bug is introduced during 3.4 kernel porting.
If rh_state field is not updated to SUSPEND during root hub suspend,
the root hub will not be resumed upon device connection or remote wakeup.
Change-Id: Id47e7c650c03cda2e7be00be4e8b92a47257fc6a
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Enable and disable the IOMMU clocks for each high-level
mapping operation rather than leaving the clocks enabled
between attach-time and detach-time even if no IOMMU
operations are being done.
Change-Id: I4cde881992b8cd77fb4ea7e8dc1c003f639d15b6
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This change provides support to raise the clks to turbo mode for mpeg4
clips with high number of slices. The firmware performance degrades if
the number of slices is more than 10. Without this fix, we see lot of
frame drops happening, causing a freeze effect.
Change-Id: Ia897854ef6d30bb97cd37810b22eb1ab5ad818fb
CRs-Fixed: 358615
Signed-off-by: Arun Menon <menon@codeaurora.org>
If there is a failure in drawctxt create, then the KGSL core will call
drawctxt destroy to free the memory. If the failure happened soon
enough, there might not a drawctxt to free.
CRs-Fixed: 371852
Change-Id: Ic0dedbad629090ae1827e354b9b94bbd3c5efcdd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
PVS classification data is available for 8930. Therefore, add
this support in this patch.
Change-Id: I338d81d11b2453b353e3449ea220e150d94aefb8
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
SMMU global address space programming need to be performed
each time the device comes out of power collapse, move the
programming of global address space from driver initialization
to the point where the attach is initiated by the clients.
When the first context is attached, the global address space
is programmed prior to the programming the context.
Change-Id: I36e4f161861823aa43d15c3271f8d9b26214cb84
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
Remove the unnecessary irq spinlocks from gic resume path since it
always gets called with interrupt disabled. It also fixes the bug
introduced by commit 6278db09f where it called spin_lock again on the same
lock.
CRs-Fixed: 370894
Change-Id: I94f81cc0d93f362ac233c9af637cbe75036903f9
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Add keymaps for source, tv, media select, info, red, green, yello, blue,
aux keys on Samsung remote.
Change-Id: Icc37eb8f29a930df30bd30aa2a50752a1dfd9c8a
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
Add keymaps for PC & numeric keys on UE RF4CE remote.
Change-Id: I14e43be544774cb2558d7ed5c48ce3bbdd226495
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
Samsung remote is using NECx IR protocol to send remote control key
events. Present nec decoder in rc framework is assuming to have 2 stop
bits (pulse width of 560us & space width 5600us) in NECx, but in
reality NECx sends only pulse of 560us and space untill next frame.So
here we can ignore the space width in stop bit as it is variable.
CRs-Fixed: 359885
Change-Id: I297343b22039a9a4b899ec945a8b103390dcca13
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
Getting invalid context warning message from gpio_ir_recv driver when
remote is operated, gpio_get_value_cansleep function is called from
interrupt context, check gpio_cansleep and use appropriate context API's
Change-Id: I1bcfbbce5e9737eecb9ebc46553f9121b4ee779a
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
Provide interfaces to allow host to update the SPUR Table
with newly found spur frequencies and their RMSSI values.
CRs-Fixed: 352591
Change-Id: I84f296ea313971cc1995c644d604f96581be5f7f
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
Enable reporting of EBI errors to the kernel log to aid in
diagnosing problems related to memory access.
Change-Id: I59d4aacac3a7e5fd50eac7d60e0bfacc80879164
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Enable reporting of EBI errors to the kernel log to aid in
diagnosing problems related to memory access.
Change-Id: Iac8f29f560c59e4e9229959603c317e7242f165d
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add the devices needed to support EBI error reporting on
the APQ8064 target.
Change-Id: I99eb49fd916fda318c67a3153f9b5a1c03f672fa
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add the devices needed to support EBI error reporting on
the MSM8960 target.
Change-Id: I97d2338c15db281dba01dd2a9de0d7e737f4c089
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
The timer is started after flashless boot is completed but before
the mdm2ap_status gpio is pulled high by the external modem. If
the mdm2ap_status gpio does not go high within a period of time
a subsystem restart is initiated.
CRs-Fixed: 358868
Change-Id: Iba410a38a0b21fea8425c7e5a47bfec5f3a203e7
Signed-off-by: Joel King <joelking@codeaurora.org>
Fix error message seen on kernel log after suspend/resume
Change-Id: I908efec9fde6e9de838e28d2c778fa4b3567e4f6
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Add the BIMC and NoC register interface to control
bus arbitration and configuration settings for copper.
BIMC (Bus Integrated Memory Controller) and NoC (Network
on Chip) are new types of interconnects for Copper.
QoS registers on both NoC and BIMC are used for
bandwidth arbitration. Apps owns the QoS registers for
Krait masters on BIMC and for MMSS masters on MMSS
NoC.
The generic QoS register interface for BIMC and
NoC has been added in this patch.
Change-Id: I13ce2bf5936255440f0e863b92b2d597127329fb
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Report VFP instruction bounce statistics in procfs to aid
in detecting userspace applications that use deprecated VFP
instructions.
Change-Id: Id32387cc6ced399ef6be9c827a9b9c7d52e83e77
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Turn on all the ocmem memory regions by default
until power control features are supported.
Change-Id: I0444c8f296dd555a86455b76bab5b50c6c2e7b9d
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
Adding bus bandwidth options for the crypto driver improves
the performance. The driver requests for bus bandwidth when
loaded.
Change-Id: I8e68de8e3c1778faeaf3b3d9776f98acf333ba84
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
The encoded output was corrupted for wvga and lower resolutions
during HFR. Moving the prediction scratch buffer from MM Heap to
FW Heap avoids this corruption.
CRs-Fixed: 353979
Change-Id: Ife3be7ccd9f19bb285c6c348721a1d54bbbd4734
Signed-off-by: Arun Menon <menon@codeaurora.org>
Prop bit is checked in userspace and must be set in
driver in order to be recognized correctly, since it defaults
to mouse pointer.
Change-Id: Ibdc78547e6376e6db54db75b1423718d13afaaa7
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
On the MSM Copper, the RPM processor does not support
the ability to query the state of a resource. Return
the cached rate in the clock struct instead of attempting
to query the RPM. This will also allow debugfs to become
useful again for RPM clocks.
Change-Id: If3e0cde516a96130ac63b5e6b832852940fe5764
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Prop bit is checked in userspace and must be set in
driver in order to be recognized correctly, since it defaults
to mouse pointer.
Change-Id: I8432716573a365c11b6837d1ce756364d2b98946
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>