For smart display, dsi command and wfd, since it has its
own buffer, the input buffer can be released once the
display commit finishes, hence the fence threshold for
creation can be smaller. This patch reduce the timeline
from 2 to 1 for samrt panels. Also, it needs to
wait4dmap/wait4ov after kicked off. Otherwise, tearing may
happen.
Change-Id: I9eca871d8d863ef23b1d67b6e1e9cffea40ae4a6
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
As a performance optimization, omit the __GFP_ZERO flag when
allocating individual pages and, instead, zero out all of the pages in
one fell swoop.
CRs-Fixed: 449035
Change-Id: Ieb9a895d8792727a8a40b1e27cb1bbeae098f581
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
The change handles the NULL buffer case for writeback panel.
It avoids the H/W commit when buffer is NULL and also adds it to
free queue.
CRs-Fixed: 448340
Change-Id: I60f5d343d6de0f96353b081aa113f347c73c61af
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Add a pm8xxx-tm subdevice into pm8821-core. The pm8xxx-tm device
can be used to receive an interrupt when critical temperature
thresholds are reached. Since PM8821 does not have an ADC, it is
not possible to read a real time PM8821 die temperature using
this pm8xxx-tm device.
Change-Id: I3720c79a0546e8bc69044166f70dd4c313e84daa
Signed-off-by: David Collins <collinsd@codeaurora.org>
(cherry picked from commit 1604779c47df4bf003211c35e356210e689676d5)
There has possibility that pipes pending at queue and suspend
comes without commit executed. At resume, pipes pending at queue
will be committed with new pipes just added which may cause iommu
page fault due to pipes may had been move to other mixer. This
patch remove pipes from pending queue at suspend.
CRs-fixed: 440254
Change-Id: If6a142d4c55453c0ceacc677399f58570abe47b8
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
This change provides the support for VESA resolution for
monitors, 1280x1024@60Hz with pixel clock of 108MHz.
CRs-Fixed: 438028
Change-Id: I059cd379d4da62f4e5b72be1152dd2fe26d611f1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
This change fixes a case where the length of 3d data is not
properly used which could have resulted in wrong 3d data parsing.
CRs-Fixed: 445505
Change-Id: Id285204bdb8c2d881becaa5b07b973eba4240d93
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
At bootup, if HPD is not configured, HDMI is not in
the state of getting turned on. This change makes sure
HDMI is not turned on/off unnecessarily which turns on
clocks as well.
CRs-Fixed: 447511
Change-Id: I074d9c463943770775b060c4a93b9120dfe9bcf0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
On changing resolution, all information related to display
needs to be updated which helps in calculating the right mdp
clock for each resolution.
CRs-Fixed: 436151
Change-Id: I1ab6e5859491936a7fa8c62247da9ef5a0ff45ef
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
The bootloader memory from which the splashscreen is shown
gets reclaimed before frame update happens from framework.
Hence, copy the splash image to a local buffer as soon as
display is initialized. This will ensure proper continuous
splashscreen functionality.
CRs-Fixed: 378721
Change-Id: I55a7b97eeced56d2f108d34998d58966610c4305
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Conflicts:
drivers/video/msm/msm_fb.h
Signed-off-by: Mayank Goyal <goyalm@codeaurora.org>
USB core marks a device wakeup capable if it supports remote wakeup.
Check this wakeup capable flag before enabling autosuspend.
CRs-Fixed: 449100
Change-Id: I055bf5801859e4d83782916c71e0245c455becbf
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
All the submitted URBs are unlinked during suspend. Abort suspend
if data is received during unlink. This avoids unnecessary suspend
and resume of remaining interfaces.
CRs-Fixed: 449097
Change-Id: Ia4009775ec29df0222b475581649c3a9f4f1899f
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
When multiple channels are used for a session (Rx/Tx), all bits in the
Rx/Tx port multichannel register needs to be Set. If a bit corresponding
to any channel is missing, the channel will not be aware that the other
channel (corresponding to the missing bit) is also part of the same group.
This will create ambiguity among the channels in the same PCM group and
will lead to shifting of Phase/delay in data in those channels.
CRs-fixed: 425803
Change-Id: Ie78ba82eeeb494db73a781e96b835361ef589a67
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
Buffer overflow is handled by flushing the output buffer and
reporting the overflow event to the user, and all subsequent data
callbacks are discarded until user is notified on the overflow.
When buffer overflow is reported by the secure demux and output buffer
is flushed, next calls to secure demux processing report the buffer
as free for new data, but data callbacks are discarded due to being
in overflow state. This causes write pointers of secure demux to get
out of sync.
This patch separates the flushing of the buffer, and now this occurs
when user is notified on the overflow, so secure demux now discards
data during the overflow state.
Change-Id: I20a0bc33b3261fdd4fa6e1f9a543187c1612cebf
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
The demux driver identifies video frames by searchning for patterns in
the video payload. A pattern can be spread over two separate TS packets,
so the pattern lookup mechanism must take into consideration the possible
prefix sizes. Also, when reporting the written data length, the prefix
size (if used) should be added.
This patch fixes issues with not taking all possible prefix sizes into
consideration, and with not reporting the data length properly when a
prefix is used.
Change-Id: I6f4829e860c2d7518964a456a36418be26a06080
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
kernel-thread can be stopped either externally using
kthread_stop or the thread function exits by itself, only
one of the approaches should be used.
When kernel thread-function exits the task is cleaned up,
calling kthread_stop afterwords causes failure.
Change-Id: I3eb36e85fa6a650ebdbf2b34dd2ca434f34f28e6
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Instead of using integer-based IDs to couple bridge instances to the
corresponding gadget ports, assign transport name strings (passed by
userspace) describing the port instance, and match strings to identify
the correct instance when bridge_open() called. This allows multiple
dun and rmnet ports to be assigned without having dependecy of
one-to-one mapping between gadget port instance and bridge driver
instance.
Change-Id: Ia87bd6e9c72d5e98f47dbc2a1cf0b71b48daa1a8
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
From 81df2d5943 upstream.
Some composite USB devices provide multiple interfaces
with different functions, all using "vendor-specific"
for class/subclass/protocol. Another OS use interface
numbers to match the driver and interface. It seems
these devices are designed with that in mind - using
static interface numbers for the different functions.
This adds support for matching against the
bInterfaceNumber, allowing such devices to be supported
without having to resort to testing against interface
number whitelists and/or blacklists in the probe.
Change-Id: I0f991e507d041bbe12aa87403b9c2e1f0de274c2
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
The ADSP heap is intended to be used for post processing
on the dsp. Add the definiton of the heap to allow clients
to have dedicated access
Change-Id: I80040b0cf3311df90970c156aa3329f07fc9a990
CRs-Fixed: 438281
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Enable the compilation of flash driver for 8960.
Change-Id: I0389c733b6b72afd0978d778ffe76994f3135dd5
CRs-Fixed: 450061
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
When a system reboot or shutdown is already underway, ignore
SSR errors so that the reboot/shutdown process is uninterrupted.
However, log the SSR request so that we know that the subsystem
behaved unexpectedly.
(cherry picked from commit 3d58c2f7db89ab01f76e7733922408c5a398d465)
Change-Id: I60387a63dcb728e271cf4a512c6546b3d4bce0c3
CRs-Fixed: 416175
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Previously the WFD driver was reponsible for signalling the
online/offline events to userspace listeners. This led to redundant
notifications due to the manner in which the WFD driver is used. The
signalling is better purposed when done from MDP driver.
Change-Id: I2248de84d57504c2fa9f26e1bfdf0e0d4a02257a
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Updated the last message SSID and the buildtime masks to reflect
the additions on the Modem.
Change-Id: I9a62942f5daf14268b0f61f81cbb53b76901d012
CRs-Fixed: 448735
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
Add variable to check if separate metabuffers can be
enabled in video driver for specific targets.
Change-Id: I0ab3be7077d7d8286bfaa37be63705992939b72d
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Add Fast YUV support in rotator for 8960, 8064 and 8x30 based
targets to improve performance for YUV 420P and 420PP inputs.
CRs-fixed: 415246
Change-Id: Ib4cbbd0fd45a82b8d409e7f52ae8bf8420b2c4eb
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
In cases where the external modem is powered up very early in the
boot up process, user space application is not loaded as a result
mdm2ap_status is never pulled high. In case where we need to shutdown
the phone for charging we leave the ap2mdm_soft_reset_gpio pulled
high which results in leakage. Assert the ap2mdm_soft-reset_gpio
irrespective of the state of mdm2ap_status gpio.
CRs-Fixed: 425684
Change-Id: Icd37ac8eec1a8b9259563f2627ee57340f4e9f59
Signed-off-by: Taniya Das <tdas@codeaurora.org>
When USB operate in host mode, it select SYSTEM scope. PMIC charging
driver disable VBUS comparator upon SYSTEM scope request from USB.
scope is changed to DEVICE from SYSTEM for ID_GND-->ID_A transition.
USB request charging driver to draw current from VBUS. Later when
charging driver receive VBUS valid interrupt, it tries to reset the
charging current as per AICL algorithm.
Add 50 msec delay after changing scope from SYSTEM to DEVICE. This would
allow charger driver to observe VBUS valid interrupt before vbus_draw()
request from USB. Apply this delay only for ID_GND-->ID_A transition.
CRs-Fixed: 417564
Change-Id: Ic505468cddd650d9306568b377b324d523779040
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The completed read buffers are added to to_ks_list in Rx URB
completion handler. The buffer is deleted from this list by
reader process after copying to user space buffer. If disconnect
happens during this copy, the buffer is freed from disconnect
context. Hence detach the buffer from to_ks_list before copying
to user space buffer.
CRs-Fixed: 448142
Change-Id: Ia4484b2709065162b0d32782a30e2b2fd36f5fda
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Driver can add data buffer to the link list of rx/tx
buffers after emptying the list during disconnect.
These stale buffers can confuse efs sync server when
mdm device connects back. Hence free up the rx/tx
buffers again during probe. Avoid further addition of
tx buffers after disconnect by checking device
connection status in write API. Also, move
misc_deregister() after cancelling the work in order
to remove device node early during disconnect to avoid
any write call further.
(cherry picked from commit 2f20bda7837d6f9a172b433af72a02f907b2ed2f)
Conflicts:
drivers/usb/misc/ks_bridge.c
CRs-Fixed: 448142
Change-Id: Ifff58d2adc113257809eb80b7f91c1a0f4a0adeb
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Following scenarios possible for interface disconnect racing
with ongoing IO:-
1) Interface disconnect setting interface pointer to NULL and
rx work is executing on other core dereferencing interface
pointer, causing kernel panic. Cancel a work and wait for it
to finish during disconnect.
2) Interface disconnect setting interface pointer to NULL and
tx completion running on other core dereferencing interface
pointer while calling usb_autopm_put_interface_async() API.
Check for USB_DEV_CONNECTED flag(cleared at the time of
disconnect) before dereferencing the interface pointer.
3) Interface unbound and driver is accessing already freed
interface pointer in tx completion or usb device pointer to
re-submit rx urb in rx completion. Add rx and tx urb pending
counters and wait for them to become zero (or timeout) during
disconnect.
(cherry picked from commit b3779d1e3ed31d10c97094256c6d398af8484faa)
Conflicts:
drivers/usb/misc/ks_bridge.c
CRs-Fixed: 448142
Change-Id: I50341173b94200bcfa60715b4b26b2117fc37c2c
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Added a check for separate metadata buffers based on
the board specific platform data.
Change-Id: I24d51329d93215da75d115ccfa8fc1f3fe260b7f
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Conflicts:
drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
When playing a full scale tone with highest gain in the codec, OCP
(Over Current Protection) event is generated. This is caused due to
lower switching frequency for the class G amplifier on headphone
path. Fix the false OCP event trigger by appropriately setting the
class G switching frequency
CRs-fixed: 415990
Change-Id: I9563ab2d06c970b47693293175fe7ae4a711348c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
From commit 9532021da6 upstream.
when something goes wrong, a flood of these messages can be
generated by usbnet (thousands per second). This doesn't
generally *help* the condition so this patch ratelimits the
rate of their generation.
There's an underlying problem in usbnet's kevent deferral
mechanism which needs fixing, specifically that events *can*
get dropped and not handled. This patch doesn't address this,
but just mitigates fallout caused by the current implemention.
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Change-Id: I708632185ca0b310c4082cab3571a2d6552bf135
CRs-Fixed: 430579
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Cherry picked from c4659d9c5264b569e06c7d5f5a807ce6c3ad47c9
Upon interface suspend driver performs suspend on data channel
first and then on control channel. In case if suspend aborts
due to pending transfer on control channel, driver is not
undoing data channel suspend. This causes stall on data channel.
Fix the problem by performing suspend check on control channel
first. In this case if suspend aborts on control channel, driver
does not have to undo anything to abort interface suspend. Once
data channel suspend succeeds driver performs suspend on control
channel.
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: I405b4797740e1b2aa67c6c28a2f3dcee0c196391
Cherry picked from 16599ec35c3bc8965eb26d33cac044518df88c73
Rmnet control driver is directly killing tx URBs submitted to HSIC
HW if userspace closes the file. When a file is close, all pending
data needs to get flushed. Hence wait for the pending tx URBs to
finish transfer with a timeout before file close. This will complete
all the pending transfers gracefully on tx path so that mdm device
does not miss any control channel information upon file close.
Change-Id: I70942391056e57b0f6dd2cd5c16be2654759eabd
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Cherry picked from 9a8280fab6030abef96ca835ef88f92926ca88bb
After receiving response available notification driver queues
a work to send get_encap response. pm state is set to
RPM_SUSPENDING before interface suspend is initiated. If
interface suspend happens after queuing the work then work
will be executed and blocked until it is done. Work tries to
resume the interface synchronously by calling rpm_resume().
This causes rpm_resume() to wait indefinitely for the pm state
to change from RPM_SUSPENDED to RPM_RESUME which will not
happen until interface suspend returns EBUSY. Hence avoid this
situation by aborting interface suspend if work is pending
or running.
CRs-Fixed: 415208
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: Ib2a079a7107d994f760c0a876736ede3add07ea2
Cherry picked from 673e1f276a71065638da2dd7f431b630e9d414f4
Driver anchors the tx urbs and defers the urb submission if
a transmit request comes when the interface is suspended.
Anchoring urb increments the urb reference count. These
deferred urbs are later accessed by calling usb_get_from_anchor()
for submission during interface resume. usb_get_from_anchor()
unanchors the urb but urb reference count remains same.
This causes the urb reference count to remain non-zero
after usb_free_urb() gets called and urb never gets freed.
Hence call usb_put_urb() after anchoring the urb to properly
balance the reference count for these deferred urbs. Also,
unanchor these deferred urbs during disconnect, to free them
up.
CRs-Fixed: 408145
Change-Id: If37b2f63da4ed20796cc8f3be6e64d15149c6cea
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
From commit 5eeb3132eb upstream.
This patch decreases dev->suspend_count in the -EBUSY failure path
of usbnet_suspend. Without the change, the later runtime suspend
will do nothing except for increasing dev->suspend_count.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Change-Id: I5e1cbd39e4469150de7cc98af9517a4dbdc80780
CRs-Fixed: 404339
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
cherry picked from 148c5323330bf41890392fe23e8983612ecb3580
There is a possibility of interface suspend after receiving response
available notification from mdm device. In this case driver unlinks
the rx urb and do not send GET_ENCAPSULATED_RESPONSE setup packet to
mdm. Response to mdm gets delayed up until interface resumes and mdm
sends response available notification again. Hence resume interface
after receiving response available notification if it is suspended.
Allow interface suspend only after completing
GET_ENCAPSULATED_RESPONSE.
Change-Id: Ib52e64b1cc7b6d5edfe3ada9651ec56526cf4852
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
If the page_alloc loop fails, we changed the length of the scatterlist
for the memdesc to the last good page so we could have an efficient
loop through kgsl_sharedmem_free. Unfortunately, we were also using
the sglen to decide between using kmem or vmalloc memory for the sg
list in the first place. There is a chance that one could start out
with a large sg list from vmalloc, but if it failed early, then we
could truncate the size and attempt to kfree it.
Zero the stlist at init time and use a length == 0 as an indicator
that the list might be truncated.
CRs-Fixed: 443441
Change-Id: Ib48a08c69a7bbfc69b92f09e83fc80f9bdedffe0
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
HSIC data driver is not setting endpoint driver data to NULL
upon disconnect. This causes endpoints to remain claimed at
the time of function driver unbind. Endpoints will remain
unusable when driver bind happens later. This can result in
function bind failure due to lack of available(unclaimed)
endpoints if there is a series of driver unbind and bind
happens. Hence after disabling endpoint set driver data of
the endpoint to NULL upon disconnect.
CRs-Fixed: 449814
Change-Id: I8656e15ac26dfc6f4f6679b7ee2bba0bf935f0d6
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
For compressed and LPA drivers, set pending_buffers flag to 1 only if the client
issues a trigger_start command, not a pause_release command. This flag
is used to initiate writes to the dsp.
Change-Id: I503156863646210b460613a0b9a26a6bfb8854ed
CRs-Fixed: 442269, 449126
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
There is a possibility of race between device disconnect and I/O
completion handler. In this case disconnect frees bridge device
memory in thread context and I/O completion handler uses already
freed bridge device memory in interrupt context. Hence allocate
bridge device memory at the time of driver load and free it
during unload. Also, do not anchor interrupt and read urb and
unlink them synchronously to avoid accessing transfer buffers
associated to these urbs when driver disconnect frees them.
Guard the race condition by:-
1) Adding check for usb device disconnect state in the I/O
completion handler to avoid further processing I/O completion.
2) Unlinking tx urbs synchronously since asynchronous unlinking
results in the same race condition.
CRs-Fixed: 447591
Change-Id: Iae4c2a1920c16fcf3e1728144a7cfe6ca66c7705
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Hardware error is being generated from driver when video
core returns NON IDR frame type error during thumbnail
decoding. This change handles this error by treating
it as BIT_STREAM_ERR.
Change-Id: I16a19eea679d42a22b336d6ebbd0bd1f57c0a8a4
CRs-fixed: 414858
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
We change the frame height in the decoder to MDP_MIN_TILE_HEIGHT
for the videos with frame height less than 96. Due to which these
videos were not being displayed properly. This change fixes the
display change.
Change-Id: I7acc74742a8cfbdfc79b02bd20bb9109f4389fa2
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
In a few spots the ADRENO_IDLE_TIMEOUT value (measured in milliseconds)
was used directly for jiffy calculations resulting in timeouts that were
1000/HZ times longer than they should have been. Use msecs_to_jiffies
for these situations.
CRs-Fixed: 448226
Change-Id: Ic0dedbad33630706d909931bf616bd69399f7ff1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Don't just warn when SSR operations such as powerup
or shutdown fail. Panic the device so that failure-point
analysis is possible.
Change-Id: I09a5ca37d8a7cfaa8fd7ed7025711c6467c20e84
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Delete customer specific code in the subsystem restart
driver.
Change-Id: I6654e986dd67f0f578a71c88a142c565985f5183
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>