Currently, there is no support for histogram on MPQ 8064. Add
support for histogram ioctls to support histogram testing.
CRs-fixed: 375580
Change-Id: I24ccf73c6ea6d230da4624ea196cba2d8195f8b2
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
When subsystem restart of the modem is triggered, the SSR handling function
disables the disconnect ack feature. Later, when the modem reboots, it
expects the disconnect ack feature to be enabled by default as it was when
the modem first booted. This causes a problem when the modem times out
waiting for the disconnect ack and asserts.
Fix the issue by changing the SSR code in bam_dmux to reenable the
disconnect ack feature instead of disabling it.
CRs-Fixed: 377493
Change-Id: Ibd6ee7770c3ad57fabcf239b0175f2002ca45268
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Audio is not routed to TV after deep sleep and resume.
Userspace is dependent on switch device to indentify audio
route. When HDMI is turned on, this switch needs to be turned
on as well.
CRs-Fixed: 377159
Change-Id: I7faaad5ff772ad2045876cc084aa71d120b77139
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
An ASYNC interrupt is an indication by hardware that some
activity has happended on USB lines in LPM (low power mode),
and USB software should now bring it out of LPM.
Ideally, hardware should give one more interrupt after coming
out of LPM so that USB driver can process that accordingly.
But, sometimes this interrupt is not generated from h/w for
remote wakeup event in host mode. Hence, resume root hub on
receiving the ASYNC interrupt from hardware in Host mode.
CRs-Fixed: 369298
CRs-Fixed: 368948
Change-Id: Ifb166c1f3c749ab8c615308ab52d85ccdc666733
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Core is returning improper header information for H264 128kbps,
level-1b and baseline profile settings. Forcing the setting to
constrained baseline profile for normal baseline profile as
per the updated interface specification resolves the issue.
Change-Id: Ib106b17be9453cfd80264cc2167dda919893b1e2
CRs-Fixed: 371606
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
Running one program that continuously hotplugs and replugs a cpu
concurrently with another program that continuously writes to the
scaling_set_speed node eventually deadlocks with:
=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #37 Tainted: G W
---------------------------------------------
filemonkey/122 is trying to acquire lock:
(s_active#13){++++.+}, at: [<c01a3d28>] sysfs_remove_dir+0x9c/0xb4
but task is already holding lock:
(s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(s_active#13);
lock(s_active#13);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by filemonkey/122:
#0: (&buffer->mutex){+.+.+.}, at: [<c01a2230>] sysfs_write_file+0x28/0x140
#1: (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
stack backtrace:
[<c0014fcc>] (unwind_backtrace+0x0/0x120) from [<c00ca600>] (validate_chain+0x6f8/0x1054)
[<c00ca600>] (validate_chain+0x6f8/0x1054) from [<c00cb778>] (__lock_acquire+0x81c/0x8d8)
[<c00cb778>] (__lock_acquire+0x81c/0x8d8) from [<c00cb9c0>] (lock_acquire+0x18c/0x1e8)
[<c00cb9c0>] (lock_acquire+0x18c/0x1e8) from [<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180)
[<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180) from [<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4)
[<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4) from [<c02d0e5c>] (kobject_del+0x10/0x38)
[<c02d0e5c>] (kobject_del+0x10/0x38) from [<c02d0f74>] (kobject_release+0xf0/0x194)
[<c02d0f74>] (kobject_release+0xf0/0x194) from [<c0565a98>] (cpufreq_cpu_put+0xc/0x24)
[<c0565a98>] (cpufreq_cpu_put+0xc/0x24) from [<c05683f0>] (store+0x6c/0x74)
[<c05683f0>] (store+0x6c/0x74) from [<c01a2314>] (sysfs_write_file+0x10c/0x140)
[<c01a2314>] (sysfs_write_file+0x10c/0x140) from [<c014af44>] (vfs_write+0xb0/0x128)
[<c014af44>] (vfs_write+0xb0/0x128) from [<c014b06c>] (sys_write+0x3c/0x68)
[<c014b06c>] (sys_write+0x3c/0x68) from [<c000e0e0>] (ret_fast_syscall+0x0/0x3c)
This is because store() in cpufreq.c indirectly grabs a kobject
with kobject_get() and is the last one to call kobject_put()
indirectly via cpufreq_cpu_put().
Fix this deadlock by introducing two new functions,
cpufreq_cpu_get_sysfs() and cpufreq_cpu_put_sysfs() which do the
same thing as cpufreq_cpu_{get,put}() but don't grab the kobject.
CRs-fixed: 366560
Change-Id: I23ea50a01793b2b2af0972cde52dba7396925fe3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Adds support to set individual properties to Venus by
calling controls separately.
Change-Id: I4af3176ee009f202e62d566de3ce859b6a8d36c2
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
These configs are needed to support multicast on networks
with colliding subnet.
Change-Id: I395cb7527da1867d439f8e9e0a5d944acc55699e
Signed-off-by: Smita Ghosh <smitag@codeaurora.org>
Remove unneeded idle commands from the command stream when updating
pagetables and doing TLB flushes. Ths cuts down on the number of
commands in the ringbuffer during switches.
Change-Id: Ic0dedbad7a0d64c39518b2dd2bb6322f4ab74ba0
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Incorrect HMAC values are generated in following scenarios.
- In case of a single transfer with a packet shorter than the
block size, the HMAC generated is incorrect. This is due to
the "FIRST" bit in AUTH_CFG register not being set. When calling
HMAC_final for a transfer with a single packet (with no prior HMAC
updates), the "FIRST" and "LAST" bit in AUTH_CFG register needs to
be set. Currently FIRST bit is being cleared incorrectly for all
scenarios.
- In a scenario of a mac key input larger than block size, the key
needs to be hashed. The key hashing operation is crashing. This is
due to a NULL, unintialized pointer to the device handle. This is
fixed by intializing the pointer correctly. Further more, key size
is uninitialized, resulting in corruption of buffer.
Change-Id: Iec736f2130e509fcaf631a2c71c5483514666617
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Enable support for tricolor leds on 8x25 platform
Change-Id: If0a91962d286b054f88a36ebb672f0a2cdf39e71
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add support for red and green leds through tricolor
led driver
Change-Id: I337d5f220be326f4417d714fcfd7eeabca683854
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add support for tricolor leds on Qualcomm's MSM
boards.
Change-Id: Ib05d6129f98cf67e7d208465a13cc6b1300c6277
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Buffer holding video from demux goes to dvb/video which
accesses the data in SW without sending it to HW units,
the buffer can be allocated as cached to improve performance.
Change-Id: I7795f901057c219198d02f340f65e81a2839edfb
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
user-space programs using demux require to be notified
on several kinds of events such new PES event,
new section event, new recording-chunk event and
other error events. demux API was extended to meet
this requirement
Change-Id: I768b6acde346139e194a3e6637b6fc0fc9648446
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Data should be read from the buffer according to the size
requested from the user or the actual amount of data
available, whichever is smaller
Change-Id: I81e6a2c538644417caeba9c19060f58810c1fdc3
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
On 8x25 EVB, during stress testing of suspend/resume, sometimes the
backlight doesn't come up. Fine tune the delay values used to program
the backlight IC into 1-wire mode so that the IC enters 1-wire mode
properly everytime.
Change-Id: I073f0101ddc057a1f3f59028ae171976a6965d15
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
If the vote for pm runtime is done while codec shutdown, it is possible
that the runtime pm vote occurs even before the slimbus port for tx/rx
audio channel is disconnected. This can cause problem in audio playback/
record. Fix by moving the vote for runtime pm after slimbus port has
been disconnected
Change-Id: I959a83be7bc381e80dfc0176c50cb60e59ce227b
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Signed-off-by: Patrick Lai <plai@codeaurora.org>
The operating voltage range was 3.2V-4.2V which was not correct for
QRD Devices. Hence updating this range with correct values i.e
3.5V-4.2V. Accordingly the fail_safe voltage is also updated to
14% of this range.
CRs-Fixed: 377061
Change-Id: I72ab4388295437e728802e8db59d8b31feb65f9a
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
commit c9cb205f (USB: android: Add a new LUN as CD-ROM in mass-storage)
access platform data without checking for NULL. This causes a kernel
panic on targets which don't have platform data.
Change-Id: I4542b0dce81604706f90b7f6e851ed47c04a941c
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Packet size of callback data is currently checked against frame size
corresponding to 20msec data. There are instances where 200msec data
is sent to apps corresponding to total record buffer size. In such
cases, the added condition fails and no recording happens causing
voice memo recording to fail.
Modify condition to check against record buffer size instead of
frame size to avoid such failure cases.
CRs-Fixed: 377529
Change-Id: I77bab73a34d95e823f14f3750550a793540248d1
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Adds Support for Intra refresh by setting
default values and calling right set_property.
Change-Id: Ibc04ec195b5265a1db60befb8109693a41f8fe51
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Add runtime power management support in the driver which allows
putting the hardware in low power state, turning off LDOs
and releasing wakelock.
This LPM (aka low power state) support is currently added as part
of USB disconnect and wall-charger connect. LPM support would
later be extended to USB bus suspend as well. Also, support for PHY
retention mode and VDD minimization would be added later.
This commit also adds debugfs nodes that can used to simulate
cable connect and disconnects as A or B device. Following are
the nodes:
-->msm_dwc3/id : Boolean value
-->msm_dwc3/bsv : Boolean value
-->msm_dwc3/connect : can be set to enable/disable
User should first update id/bsv values before enabling 'connect'.
dwc3-msm device is parent of dwc3-core and its runtime PM is managed
by dwc3_otg driver which is responsible for the state transitions
based on notifications from DWC3 h/w or ext_xceiver (using PMIC) for
cable connect and disconnect. This change also allows dwc3 gadget and
host to acquire PM count for the case when dwc3-otg is not present -
e.g. host and device only configurations.
Change-Id: Idd9a59c1ffd46bd98228c9fd4441f668b763534d
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
The regulators required by the HDMI PLL are now controlled within
the clock driver. Remove the explicit control from mdp.c.
Change-Id: Ia2975a5a83b77cd9e21fc43cabea754b7b040dd5
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Rather than requiring the display driver to enable these regulators
before enabling the clocks which use the HDMI PLL, enable these
regulators in the clock driver. The HDMI PLL is powered by the same
rail as the SR2 PLLs, so re-use that vdd_class.
Change-Id: Ieed938fc06cbd4ec7b6317b956b10d8ee7b4c578
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This allows for a vdd_class, which reference clk->rate, to be used
with the HDMI PLL. It also removes the need to have a .get_rate
op implemented.
Change-Id: I1fd7eba16fa1e1af56513d400e58fdfdaff931e4
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Add a sysfs attribute to configure the runtime PM idle timer value
In some cases (eg. audio playback) the power consumption drops if
runtime idle PM timeout is set to 10sec. So this sysfs attribute
should be used to configure the idle timeout for SDCC per target.
The value must be greater than 5secs or else will have a major
performance hit.
Change-Id: Ia5a9a81ce46e9c66a325fd1ec1ccd2e0f89a981f
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Proprietary chargers pull D+/- to specific voltages between 2.0-3.3V
(VLGC) for identification. The DM voltage may not exceed VLGC due
to pull-down resistor. Hence a proprietary charger is detected as
a Standard downstream port (SDP). Gadget speed is used to differentiate
between SDP and proprietary charger.
In charger detection work, if the connected charger is not SDP (or) CDP
then re-schedule the work again and if it returns invalid charger, mark
it as proprietary charger.
CRs-Fixed: 377915
Change-Id: I4223c0724c00aea7e755cd07b349c9e597d7960d
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Enable generic HID to support USB keyboard and mouse.
Change-Id: Ie889819d51357f9c9b76bfcedd0a5135bb9e079b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The Q6 MSS PIL driver is not compatible with RUMI. Linux
crashes if this driver is probed on a RUMI device. Therefore,
configure the Q6 MSS PIL device node so that it is disabled for
RUMI.
Change-Id: Icf7284a7d13774a8b72deb31c178217c20c737a8
Signed-off-by: David Collins <collinsd@codeaurora.org>
A 32 bit RTC is housed inside PMIC. The RTC driver
uses SPMI interface to communicate with the RTC module.
RTC device is divided into two sub-peripherals:
1. RTC read-write peripheral having basic RTC registers.
2. Alarm peripheral for controlling alarm.
RTC peripherals are children of SPMI device and driver
receives it's configuration parameters (such as alarm
powerup feature to powerup phone using alarm interrupt)
from device tree.
Change-Id: I46a2ffc0f6c9c5ee174cf803de19e656da7ce088
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Doing this avoids having to allocate work structs at runtime. We
also don't have to pass information about which device is calling
subsystem_restart because we have the struct in hand with
container_of.
Unfortunately, wakelocks don't have the ability to reference
count, so we must track if the wakelock has been activated or not
and avoid locking it again. When we move to wakeup sources we can
call pm_stay_awake() unconditionally and pm_relax() if the
workqueue scheduling call indicates the item is already
scheduled.
Change-Id: Ie5cf89aa2ea258a1d521e82b397f05ae1c53ad72
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This isn't any more useful than just testing for the
restart_level directly.
Change-Id: Ic38473be5134f9e0f652b58994d3364f80bde014
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
The main restart function loops over the restart list many times
and repeats the same looping logic each time. Extract that loop
into a function and call it with a function reflecting what each
loop is doing: shutdown, ramdump, powerup, and all the notifiers
before and after.
Change-Id: Ic448367f708e9ddee151511df2be3773e9d4f63f
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Assorted cleanups and fixes:
* A break in a switch statement should line up with the rest of
the statements in the case.
* queue_work() can't return one indicating the work is already
queued if the work is dynamically allocated.
* Remove unnecessary header includes.
* Clean up multi-line comments.
Change-Id: Ie5c544ee34e9f4eaeb9af5ff6d4c39975238cde3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Add a struct subsys_device for the internal stuff we don't want
to expose. Propagate that struct throughout the code. Add a new
restart API, subsystem_restart_dev() that takes the subsys_device
pointer to restart the processor. This saves having to iterate
through the list of devices to find the subsystem (saving a
spinlock for callers in atomic context). Since we still have some
callers of the old string based API, leave subsystem_restart() in
place.
While we're here, remove code that isn't doing anything. We always
know to use the current subsystem if we only have one so the
single_restart_list is useless. Plus, if someone is passing a
NULL descriptor or not initializing the fields of the descriptor
when they register with SSR, they will soon realize that their
code doesn't work. Remove these checks as they'll impede future
patches that don't want to supply all possible ops.
Change-Id: Ia53ffd530982390d1871bd62bfe31e3a0a512fbe
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This initcall was put in place to shut down the processors during
late init to save power. Now that we use the driver model we can
have the affected driver(s) do this in their probe instead and
save calling shutdown for all processor from the core PIL code.
Change-Id: If575589060f1c68177879b6c953f264892e91776
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
If an SSR driver is detached there is no way to free the ramdump
device that is allocated in create_ramdump_device(). Add a
destroy_ramdump_device() function to clean up memory. Admittedly
this doesn't try to solve the race condition in destroying the
device while do_ramdump() is in progress, but it is a good first
start.
Change-Id: Ib46ac8589a9ae7405441328eb9bfa0353362513a
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
When session CLOSE command is sent right before session RUN command
is acknowledged, callback function can mistakenly think that
the next received acknowledgement is for CLOSE command instead of
RUN command. This triggers driver to send memory unmap command to
the Q6 while it is still processing the CLOSE command. Eventually,
this leads to an invalid memory access and causes Q6 crash.
Change-Id: Ib5d560fbcb7e8ced79cc1075a9f6bea3b55a86b6
CRs-Fixed: 377281
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
Add a function which logs the parameters in each request being
sent to the RPM immediately before each request is sent. Also
add a module parameter to control this logging.
rpm-smd debug_mask supports the following bits:
BIT(0) = Show pretty formatting in RPM request log messages
BIT(1) = Show raw formatting in RPM request log messages
BIT(2) = Show SMD message ID in RPM request log messages
Example log messages for each possible debug_mask value:
0 = (no message)
1 = RPM req: s=act ldoa 9; uv=1800000
2 = RPM req: s=act, rsc_type=0x616F646C, rsc_id=9;
[key=0x00007675, value=0x40 77 1B 00]
3 = RPM req: s=act, rsc_type=0x616F646C (ldoa), rsc_id=9;
[key=0x00007675 (uv), value=0x40 77 1B 00 (1800000)]
4 = (no message)
5 = RPM req: msg_id=8, s=act ldoa 9; uv=1800000
6 = RPM req: msg_id=8, s=act, rsc_type=0x616F646C, rsc_id=9;
[key=0x00007675, value=0x40 77 1B 00]
7 = RPM req: msg_id=8, s=act, rsc_type=0x616F646C (ldoa),
rsc_id=9;
[key=0x00007675 (uv), value=0x40 77 1B 00 (1800000)]
Change-Id: If7e0f6128a065396e703a6c9f8708303491ba5fe
Signed-off-by: David Collins <collinsd@codeaurora.org>
Camera IRQ router changes for 8974
1) Add device tree match struct for camirq_router driver.
This is required for 8974 since platform device node is
added in device tree.
2) Probe camera IRQ router before other modules by
changing probe order. This is required since irq router
needs to register irq information with cam server before
other modules update its irq information
3) Assign proper cam_irq_hw for ISPIF during register
subdev. Otherwise, cam_irq_hw will be used uninitialised.
Change-Id: Ida29abb91264a178d45d000fe78c9555b55c0fe3
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Replace the clk_enable() with clk_prepare_enable() and replace
clk_disable() with clk_disable_unprepare() functions.
Change-Id: I63479090eccbeac46f091bf95faeb857139d23a4
Signed-off-by: Joel Nider <jnider@codeaurora.org>
On Fusion 2.2 platform, GSBI9 UARTDM is used for primary IPC
mechanism. GSBI9 can be used on different platform for other
configuration mode (i.e. SPI/I2C). Hence add GSBI9 UARTDM device
only for Fusion 2.2 platform.
Change-Id: I5b4dcd259f7966fcf244b47deb8d603a5728af60
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
TSENS driver needs to be invoked early in the kernel
initialization for clients to read the temperature to
perform kernel thermal mitigation.
Change-Id: I3f6c5a716aa36033676523ce941402fc3032dcfa
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
MSM8974 TSENS block supports 11 temperature
sensors that are used for thermal mitigation.
The TSENS driver is part of the thermal sysfs
framework that allows clients to set thresholds
and receive notification on temperature thresholds
being crossed through thermal sysfs.
The driver provides ability to thermal clients
to set upper/lower thresholds for each sensor
and receive individual notification for each
sensor once the threshold is crossed.
All sensors are enabled by default during
driver initialization.
The driver is initialized early during kernel
initialization to provide capability to the
thermal kernel driver to read temperature
from the TSENS sensors. To support this feature
a kernel API is provide to read the TSENS
temperature.
Change-Id: If17daae81cfb522a9cea786b5db0c920adb5ed2d
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Define the channel and CRCI used by the default TSIF configuration.
This configuration must match the TrustZone image, which is set up
to use TSIF2 on CRCI1 by default.
Change-Id: I86a2e100b29d888c3d6167e4b34b9c4271ada165
Signed-off-by: Joel Nider <jnider@codeaurora.org>
This change fixes a crash when running VCAP in de-interlace mode.
The problem was noticed in the introduction of kernel 3.4. VCAP
was improperly using the videobuf2 framework APIs. Since VCAP is
already reliant on queue structure provided by videobuf2 framework,
we created our own basic version of the qbuf and dqbuf calls that
have some similarities to the videobuf2 framework. This addition
was necessary since we are calling qbuf from a kernel work thread.
Since moving to kernel 3.4 there has been a change in videobuf2
qbuf that dereferences the current process.s mm_struct, from a
kernel work thread this struct is NULL, which was causing a crash.
When we are de-interlacing a captured video we are cycling the
buffers internally in the driver, which is why we needed to create
our own q/dq buffer functionality.
Change-Id: Id51b775ae7f0a58bbac8a581e07fa02417802a30
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Export the epm header files for clients from userspace
to send commands to the driver.
Change-Id: I9b413f461da58cbf92aefeca9285ac6798468ea2
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Split Target based USB-Gadget driver (tcm_usb_gadget.c) into composite
driver (tcm_usb_gadget.c) and Function driver (f_tcm.c). This is
required for other composite drivers like Android to include Target
based USB function (UASP) along with other functions.
Composite drivers can include f_tcm.c like any other function and
register a callback function. This callback function is called
when Target Fabric is enabled via configfs. This callback can be
used to enable enumeration with host.
Change-Id: I36beea07bb3641a224694c157849ecec347d5943
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>