Existing code uses workqueue for DVR input work which constantly waits
for new data written to the input buffer. This causes the kworker
executing DVR work to be fully occupied by DVR device and does not
allow other drivers using workqueues to use that kworker. To solve
this switched to kernel thread which is solely used for DVR device.
Change-Id: Ica740965aceec63e95eb2be4b3c20e242a8301fe
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Enable TSIF status interrupt to expose the following
information in debugfs:
- stat_rx_chunks: Counts number of TS packets chunks received from HW.
- stat_overflow: Counts number of times buffer has overflowed.
- stat_lost_sync: Counts number of times TSIF lost sync with input.
- stat_timeout: Counts number of times TSIF reached timeout
waiting for packets.
All counters can read and reset by writing to the respective file.
Change-Id: I42e71d072d8b92bdc8ecf941daef4ac0faa94de6
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Different filters may have different output format, therefore
the ts packet output format should be per feed. It should also
allow outputting real time-stamp if available.
Change-Id: Id174610d50c94f24abae5637ae052aeee92eeec4
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Expose demux filters settings and status on debugfs to
improve debugging of demux devices.
Change-Id: I08df8a4c6a21a80bda7d0c6712edfdebef70ff0c
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
When DVR buffer mode changes between internal/external, the DVR
buffer pointer gets updated with the new allocated memory.
This overrides the existing pointer to the memory allocated
previously. The code was changed so that when switching between
internal and external modes the currently allocated memory
is released.
Change-Id: I07690cc3aa86827114419b1d47ee40f47338766b
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Section and PES/recording pipes had same descriptor sizes,
notification rate from BAM for both types was the same. Since
sections are lower-bitrate than PES/recording data, the descriptor
size for sections pipe was reduced to allow better responsiveness
to this kind of data.
Change-Id: I8b99a1b4c38bb9a9fdfa8d3fb4d1864b133d954a
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The TSPP driver can allocate its output buffers internally or
externally. External buffer allocation is required when Demux wishes
to use the ION driver to allocate a physically contiguous buffer
(e.g. to pass to TZ).
This commit improves the TSPP driver support for external buffer
allocation and implements the external memory allocation and free
functions in the Demux driver.
Change-Id: Id7e815fa56b76401ed593a786eb61d97735deba9
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
In PULL mode demux should stall when output buffers are full until
there's free space for new data. The demux data events queue could
also get full and overflow if user is not reading data fast enough.
Added checking the fullness of data events queue when working in PULL
mode so that demux stalls in case it is full.
Change-Id: I3d2cb89a2e3c5fb8e1be4b1df9d7efbb8ca458e2
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Demux parameters were unified to have same semantics across
different demux plugins. Extended the parameters to add option
to invert the tsif clock signal.
Change-Id: I1b253d27353feb0b9c9214fcfafb8b257da6528e
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
TSIF signals (clock, data, enable and sync) may be configured
to be inversed at TSPP unit input. This is useful in case
TSIF signals from external units need to be inversed.
Change-Id: I4f0bfdc58fb8658dbf10fe3805b8787f9d36aeca
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
ION API was changed and the calls from dvb demux
needs to be updated accordingly
Change-Id: I8582d4cf544cf8fa4e52252bc8614f4866d6f774
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
demux input/output buffers were allocated internally by the driver,
for MPQ use-cases there's a need for user-space MPQ player to
allocate the buffers through ION driver and set them to demux
similar to the way other kinds of buffers are managed
in android multimedia stack for video
Change-Id: Ic28a279c0841fee12008cea7beac58f82409b9f9
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
CMA features may ifdef out parts of the code with
CONFIG_CMA. Older code uses CONFIG_DMA_CMA. Switch
to using the newer CONFIG_CMA to ensure the code gets
compiled when needed.
Change-Id: I3cae639797787b4926a6c5e057de973b66196707
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Both patches needed, second patch (among other things) fixes
a bug in the first.
commit 2139cbe627
Author: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date: Mon Oct 8 16:32:00 2012 -0700
cma: fix counting of isolated pages
Isolated free pages shouldn't be accounted to NR_FREE_PAGES counter. Fix
it by properly decreasing/increasing NR_FREE_PAGES counter in
set_migratetype_isolate()/unset_migratetype_isolate() and removing counter
adjustment for isolated pages from free_one_page() and split_free_page().
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[lbassel@codeaurora.org: backport from 3.7, small changes needed]
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
commit d1ce749a0d
Author: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date: Mon Oct 8 16:32:02 2012 -0700
cma: count free CMA pages
Add NR_FREE_CMA_PAGES counter to be later used for checking watermark in
__zone_watermark_ok(). For simplicity and to avoid #ifdef hell make this
counter always available (not only when CONFIG_CMA=y).
[akpm@linux-foundation.org: use conventional migratetype naming]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[lbassel@codeaurora.org: backport from 3.7, small changes needed]
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
Change-Id: I7d4f5fe0b6931192706337e0b730f43e7cccd031
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The current code allocates a new Rx buffer in Rx completion handler.
Rx buffers are freed after user space consumes them. This results in
allocating larger buffers in atomic context which may fail some times.
Don't queue the Rx buffer immediately. Defer it till user space consumes
it and reuse the same buffer. The test results indicate no throughput
degradation. The Rx buffers will be freed when interface is suspended
or disconnected.
CRs-Fixed: 430595
Change-Id: I8e69e27df2e11b38497e0384a8edd87ecedcb24b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
(cherry picked from commit 5c915c1949b79bc59d2b222bfcce02cd429619b2)
Borderfill pipe need to be kept as baselayer which is not
suppose to be freed at suspend. It only be freed when
ref_cnt reach 0 by "adb stop".
CRs-fixed: 429196
Change-Id: Ibffe7960cc194162d1ba71e8dc8636393938483f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
All calls of rpm_vreg_set_voltage() now take place in process
context. Clock driver code on all targets has been written so
that atomic regulator control is no longer needed.
Refactor the rpm-regulator driver so that a mutex locks are used
in place of a spinlocks for sleep-selectable regulators which are
controlled via the rpm_vreg_set_voltage() function.
At the same time, move clk_prepare() and clk_unprepare calls in
the TCXO workaround so that these functions are correctly called
during each workaround invocation. This is needed so that TCXO
isn't kept on forever after a single clk_prepare() call.
Change-Id: I07caed041dac6da073a0644271df2227b6c5a96e
Signed-off-by: David Collins <collinsd@codeaurora.org>
It is necessary that the L2 level computation and the setting
of the L2 rate happen atomically, so that the computed level
is still valid when the L2 rate is set. A spinlock protected
critical section is needed for these operations. However, the
votes for the HFPLLs necessitate invocation of the RPM
regulator APIs from a non-atomic context.
To solve this, we must first note that the problem only exists
when:
1. The L2 frequency is being switched away from an HFPLL source
to a non-HFPLL source, or
the L2 frequency is being switched away from a non-HFPLL
source to an HFPLL source.
--AND--
2. The CPU frequency switch (the cause of the L2 switch) is
being performed as a result of cpufreq invoking the switch or
hotplug onlining/offlining a core, since HFPLL regulator
voting does not take place in the power-collapse and resume
paths.
The solution is to pre-emptively vote for the L2 HFPLL regulators
if the target CPU frequency's required L2 level is sourced off of
an HFPLL. These votes are only removed after the spinlock
protected critical section completes, and only if the previous
CPU frequency's required L2 level was already sourced off of an
HFPLL source.
One further optimization is to disable only pre-emption, and
not interrupts in the afore-mentioned critical section.
Change-Id: I7b01f274f773ce513300ed3e4b074bae63e84c64
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
The HFPLL regulator votes are active-set-only votes. This allows
us to get away with not voting for the HFPLL regulators in the
power collapse path by allowing the sleep-set <-> active-set
transition in the RPM to take care of this for us. Thus:
1. In the power-collapse path, if a CPU or the L2 switches from
an HFPLL source to a non HFPLL source, the regulator votes
remain in place, but will be removed once apps transitions
to its sleep set.
2. In the power-collapse path, if a CPU or the L2 switches from
a non HFPLL source to a non HFPLL source, the regulator votes
are already not present.
3. In the resume path, when apps transitions to its active set,
the HFPLL regulators would be turned back on before the HFPLL
source is reselected.
Change-Id: Ifc66aaf23d601654367792ff2fb2cc35580db241
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
(cherry picked from commit 3a78830598a34f67b48780b7e9e0f25f4448fd66)
Some panels need to be initialized after panel is on.
Add late_init to support this feature.
CRs-fixed: 433011
Change-Id: I73c623d1fe52363f070af79ce4bf7774cd84689e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Both mdp and mdp_vsync clks are disabled for command mode panel when
no new frames are being played. When they are re-enabled if new
requests come in, the first vsync event which is signaled by read
pointer interrupt arrives in a random time due to the sync between mdp
and panel, so skip it to maintain correct vsync timing.
Change-Id: I683b765e4a16d3d152b9270f5982234b94921f1e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit a4567ac320abe5d74b3c7decdbddba4bd8c57463)
There is a possible race condition which could happen in the following
scenario:
Core 0 PC: lock_hrtimer_base
lock_hrtimer_base
hrtimer_get_remaining
get_next_event_time
msm_pm_idle_prepare
msm_cpuidle_enter
Core 1 PC: generic_exec_single
generic_exec_single
smp_call_function_single
setup_event_timer
mdp_update_pm
If core0 idle thread runs before core1 has had the chance to make the
smp_call_function_single, then idle thread could end up spinning on
lock_hrtimer_base() since setup_event_timer adds an event to the event
queue but the smp cross call is the one that initializes the event timer.
So Core0 could spin on lock_hrtimer_base() since CPU1's SMP call won't be
handled as idle thread runs in noirq context.
To prevent this scenario make a change to the code flow to do the queue
operations and the timer operations on the same CPU. Meaning
setup_event_timer will only make an SMP cross call to re-organize the event
queue and reset the event timer all of which will be run on CPU0.
CRs-fixed: 425587
Change-Id: I53fc551d18f350c47e05a94976b56a5fd2e9050b
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
(cherry picked from commit e73869cb18ee79bd0b951fd7effd6565ce7ccfb4)
Redesign the output ping pong mechanism to support
upto 64mp encoding using gemini hardware.
Change-Id: Id7801861e0fe119f61a02fb3409155f312a85d21
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
Currently only current cpu load is considered when frequency scaling.
As a side effect of this when scheduler migrates a thread to a slower
core, the execution time increases unexpectedly.
The new algorithm not only considers current cpu load for frequency
scaling, but also takes into account load of other online cpus. The
treshold for this can be controlled using up_threshold_any_cpu_load.
When the up_threshold_any_cpu_load is crossed in any cpu then the
current cpu is set to sync_freq.
Also, when more than one cpu is online a two step ramp-up mechanism
is used. When the up_threshold_multi_core is crossed the cpu is ramped
up to optimal_freq which is less than policy->max and set to a power
friendly value.
Change-Id: I64bed1b142cde1f239e73aa1f78981c78aaf59ce
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
(cherry picked from commit d3ca78370df00ec7a5b6816321ea1a1a371f2850)
With the recent split of functions to calculate and report state of
charge, the faking battery feature broke, it remained in the calculate
function.
Move the fake battery feature in the reporting function, where it really
belongs.
Change-Id: I6a3fcc3b233792d87ea4ac8fe2e155e10ca24e21
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
adb device file closing and config disabling can happen in
parallel during composition switch. If adb device file
is closed prior to config disable, adb function driver request
android to disable configuration. But this is not undone later
when adb device file is opened. Due to this bug config remains
disabled after composition switch completion. Fix this bug.
CRs-Fixed: 414360
Change-Id: Ia7b352c63d860028c02b8dd7a52522460557e6fd
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
To turn off droop detectors in glitch free mux, the krait PLL clamp
is set permanently for secondary cores in platsmp secondary boot path.
Set the pll clamp for primary core as well.
Change-Id: I4d59864e32c9b5e221275ba780b449f21d727254
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
We setup identity MMU mappings across the entire 4GB of space, which
are permissionless because the domain is set to manager.
This unfortunately allows ARMv6 and later CPUs to speculatively
prefetch from the entire address space, which can cause undesirable
side effects if those regions contain devices.
As we setup the mappings with read/write permission, we can switch
the domain to client mode, and then use the XN bit for ARMv6 and
above to control speculative prefetch to non-RAM areas.
CRs-Fixed: 415757
Reported-by: R Sricharan <r.sricharan@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Change-Id: I30c4769173b7524dd0fcef6c784f8a8d1a53c68f
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The SMP CPU initialization code incorrectly applied the
KPSS 2.x CPU reset sequence to Krait Pass 3, even on
targets using KPSS 1.x. Modify the SMP code to apply the
KPSS 1.x reset sequence where appropriate, regardless of
the CPU version. Also incorporate updated register settings
to avoid having to later reconfigure the Krait PLL clamps.
CRs-Fixed: 431744
Change-Id: I41b07fa96e95bdc23ba742f6f4a9fcea70a10a7a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The Droop detector mechanism present in Glitch-Free (GFMUX)
goes to nondeterministic state during frequent
standalone power collapse operation. It affects
Krait PLL output so that the PLL won't lock to
required frequency.
Since Droop detector isn't used, set sc_pdn (PLL_CLAMP)
permanently high to ensure droop detector is off and it
does not affect Krait PLL.
CRs-Fixed: 381144
Conflicts:
arch/arm/mach-msm/Kconfig
arch/arm/mach-msm/Makefile
Change-Id: I69a0dffeccaa3837302d6e3dd53f6b62fa683368
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
325Mhz will not be supported anymore and has to be replaced
with 320Mhz.
Change-Id: Ibdb678215749d0e57b66e6e6416c5cb978b45b66
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The diag implementation of dci does not properly
handle the closing/re-opening of the dci channel.
Add support for closing/re-opening of the dci channel
including appropriate handling of client dci requests while
the channel is closed and resumption upon re-opening of
the channel.
Change-Id: Ied29fe99be5fee34cfe27cc5bdeacd4365fa136b
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
The diag kernel code has some large files that are
becoming unwieldly. Separate out existing debugfs and mask
related code into their own respective files to allow easier
functional access and reduce file size.
Change-Id: Ifde0963a3682f787dc892fb136d9d7d7ae1b7c01
Conflicts:
drivers/char/diag/diagfwd.c
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
QDSP can be used as modem and does not always mean LPASS. This variable
is used for LPASS functionality, thus renaming it to LPASS.
Change-Id: Id4ca0ff57deff5605836d3e215496138287308d5
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Clearing the DCI Log and Event Masks did not change the cummulative
masks properly. This fix updates the masks whenever there is a change
in the log and event masks. Also, this fixes a NULL pointer issue
when there is more than one DCI Client
Change-Id: Ia92751ffb7a12b65fd81725257746d732804d6ae
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
1) Fix an issue where after running a DCI app and exiting it,
second app does not receive any DCI data. Issue was due to
incorrect state of a flag used by SMD channel.
2) Add a mutex around shared data structures like cumulative masks.
Multiple clients may want to change DCI mask at the same time, so
mutex will prevent any corruption
3) Add support for health commands. The client request how many logs
were dropped and received.
Change-Id: Ica12b3c93aa4dda9b04aa13cd5a9f8dbc412148c
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Diag driver is adding a new feature to stream logs & events to a
user space application on Linux processor. This will eliminate
need to connect QXDM to receive diag traffic.
This is known as Diag Consumer Interface (DCI).
Change-Id: I7983bb7d9b8a0429ebbee290868c8bd0e562953f
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
We have always allowed the user to specify a timeout in waittimestamp
but we never obeyed it. Reorgaize the function to be less convoluted
and support a user specified timeout (or spin forever if 0 is passed).
Change-Id: Ic0dedbadbc368336d05b14d66829205631046515
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
Sometimes a write to CP_WPTR fails to latch on A20x GPUs. In the past
we worked around this by writing to WPTR numerous times in the various
loops that waited for GPU activity. Consolidate these disparate calls
by moving the poke into the hang detect function. If the core is idle
but the RPTR != WPTR, then rewrite the WPTR and go back through the
loop again.
Change-Id: Ic0dedbad474c7884c2467fe050d8afe673588add
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
If the userspace calls the waittimestamp ioctl with an invalid
timestamp for a context then set a flag indicating that the ioctl
was called with an invalid ts. If the flag is set then do not
print error message about this ioctl being called with an invalid
timestamp. This is required to prevent the kernel log from
spamming with error messages and causing a watchdog.
CRs-fixed: 374586
Change-Id: Iffa5c13d74ed90b78f88aba5c4c0e0f908eeaa19
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
Use timestamp from userspace instead of incrementing context's last
issued timestamp. This allows userspace to defer submissions to KGSL.
Change-Id: I2a104f97420f73dac3bbd23464e92e6ea9d92869
Signed-off-by: Vijay Krishnamoorthy <adivarah@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
Check to make sure that there is a valid context pointer before
dereferencing it when adding commands to the ringbuffer.
Change-Id: Icf9824de8f62a28cdeeef4378246d9fb334d39fa
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Use BIT to define all context related flags. This ensures
that these flags are unique and is easier to maintain. Also,
fix spelling of CTXT_FLAGS_BEING_DESTOYED to
CTXT_FLAGS_BEING_DESTROYED
Change-Id: I866c67b9c5d59d6117e31714756af3106018f9cb
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
When we map ion buffers as uncached we want to map them as
uncached but still be able to use buffering of transactions
since turning off buffering has a severe performance impact.
Change-Id: I5a09ac34bd3ce3f001d10d9efd71d140f632564d
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
When allocating pages for IOMMU heap it is advantageous
to try to allocate pages from highmem in addition to
lowmem since clients using the IOMMU heap can use
either highmem or lowmem.
CRs-fixed: 430457
Change-Id: Ifc794fc344c67dd53d8f7cebf86536ab9d44ed6c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
When a frame diverted to daemon for postprocessing is being
sent to user, copy the frame_id from the diverted frame along
with the timestamp information.
Change-Id: I268148e28f8b055fceb13acf57336ce671c0c3d0
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
When a frame diverted to daemon for postprocessing is being
sent to user, copy the frame_id from the diverted frame along
with the timestamp information. Otherwise user will not be able
to match this frame with other frames based on its frame_id.
Change-Id: I1d2ed83361ca90e89d27925830cae08226d05483
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Signed-off-by: Ninad Patgaonkar <ninadp@codeaurora.org>
Camera may run in a low power background mode. Configure the sensor
to run at lowest clock and vfe to request minimum bandwidth.
Change-Id: Idf6e5fb069c5a3cdbbbddb760614fee4510d81dc
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
diag_bridge_open/close should not be called multiple times, as it
would incorrectly increase/decrease the internal reference counter.
This could respectively lead to either a stale device structure when
HSIC is disconnected, or a NULL pointer when HSIC is reconnected.
Fix this by adding a check in the bridge open routine to disallow
further calls if the bridge is already open, and similarly in close
to no-op if the bridge isn't open. Also add a mutex to the diagfwd
driver to serialize access to the various state variables such as
hsic_device_enabled and hsic_device_opened and to prevent near-
simultaneous calls to diag_bridge_open. In particular, the platform
device probe (or remove) and the callback for cable connect
(disconnect) could potentially execute concurrently; only one should
"win" calling diag_bridge_open (or close) successfully.
CRs-fixed: 395637
(cherry-picked from commit fbd2255d98381e473c1438848ade2572acd5fa46)
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Change-Id: I8322148b7c32a64e9bccbc2e4dc99f1e650335c4
Signed-off-by: Neha Pandey <nehap@codeaurora.org>