Skip to content

Cm 12.1#2

Open
ench0 wants to merge 273 commits intoench0:e3from
CyanogenMod:cm-12.1
Open

Cm 12.1#2
ench0 wants to merge 273 commits intoench0:e3from
CyanogenMod:cm-12.1

Conversation

@ench0
Copy link
Owner

@ench0 ench0 commented Sep 7, 2015

No description provided.

Sree Sesha Aravind Vadrevu and others added 30 commits September 13, 2014 13:26
BWC src width is segmented into 16 aligned RAUs. The segmentation
into 16 RAUs needs to be rounded up for corner cases.

Change-Id: Idbf675d7adfb45cb28e6c456dd4fd7c7f41ea280
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
During continuous splash screen need to ensure clocks are properly ref
counted once and released once handoff has happened. Doing it in
different places can lead to improper order and cause clocks to be
disabled. Fix this by centralizing this into footswitch ctrl which is
called when continous splash screen is enabled.

Change-Id: I17f3d5517d9a0583221fdb5c354bf1992ddeddbd
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
Expose properties to enable ignoring and appending of
EOT packets for DSI panels.

CRs-Fixed: 575875
Change-Id: Ib1ad4fedf7bea7f47b5468621793c6845c4d1180
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
LUT read is not supported by hardware in the case of msm8226.
Adding property to dtsi file to denote the absense of support
for read in hardware.

Change-Id: I29cf869af4135e1199bc0feb4369700b994520ec
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Currently ARGC read write is done for DSPP0 irrespective of
dspp_num, as the dspp_num corresponding to the block provided
is not calculated.

Added the calculation of the dspp_num to get correct address
of ARGC registers.

Change-Id: Id787e76debb26d23d75d3cdb859a697b6f0016f5
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
During IGC read operation, IGC LUT's data was copied to
userspace incorrectly because of swapping color components.

Fix component data swapping during IGC LUT data copy to
user space to provide the correct IGC LUT data to user space.

Change-Id: I301a3500f0e0c4bbf9f52affa66373585c72d987
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Certain targets like msm8226 do not have capability of reading
IGC and PGC LUT from hardware registers.
Adding functions to read the LUT values from software cache.

Change-Id: Ifd0f5f131b7ff1fd7d1fb122425241a0e0cec328
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Turn off the backlight while shut down panel as it
could show white flicker depending on the panel.

Change-Id: Ic5d4e97e70c87e5b6e956e27a766136610d6f345
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
Time out condition was hard coded to 60 fps. If dynamic fps
feature was used, an invalid timeout might occur.

Change-Id: I0abe52416c10ef4ae0af6f541d22c66f6c8a6b5e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
The histogram completion structure only needs to be initialized fully
once, and this can be done when the pp resource structure is created.
Otherwise, when enabling the histograms, it is sufficient to use the
reusable INIT_COMPLETION, in order to avoid any wait_queue errors.

Change-Id: Id4bfb19c91bd5ab07c01a5eb347ba50621fe8a97
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
If there is some pipe to clean up, need wait for it be done to
make sure the pipe can be used for the second cycle and recover
mode can be executed.

Change-Id: Ifb3fdb152bc4bbf367b3d272aa0c88b1a0650c19
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
During panel unblank a kickoff is done to turn on the panel so that the
first update is not delayed. It is also used to give buffer to command
mode panel prior to enabling backlight prevent junk data from appearing.
In order to prevent release fence timeline from being signaled too
early we will increase the commit count. This allow next sync point
to be added to the appropriate point on timeline, instead of relying
on frame done being called before sync/commit calls.

Change-Id: I566f90b3013b59dedbe42bbb9fdf6fa37d65e779
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Hardware cannot support decimation and bwc together.
The use case should be failed.

Change-Id: Ic7547340eb08d542a296aa9cfdd150e7eb0bea4b
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@quicinc.com>
Program scalar registers for both RGB and VIG pipes
when requested by the user. The scalar factors are
also computed by the user.

Change-Id: I6854a9ff3acdef07bb6a964f2f3686612230eff3
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
In use-cases where scaling is required in one direction
and not on other, scalar extension parameter will be set
to update the scale register. Add proper check to this enable
scale bit only in the required direction.

Change-Id: I5527f22c83fe456d0124af12516c5bdb240e80a9
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Allow the check_status interval time to be
configurable via /sys interface.
Allow the dsi_check_status function to be
enabled or disabled via /sys interface
Combine MDP3 & MDP5 code and separate
the platform specific code.

Change-Id: I0a6be25b6974ff8dafa472febbdbde517d35cbbc
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Display can be turned off by using different ioctls. Make sure that
in all the cases ESD workqueue is cancelled.

CRs-Fixed: 626835
Change-Id: Id14992665e4a86941386a8269600d322c3500a70
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
The recovery handler is used in the dsi event thread, and
the recovery handler variable was configured from a different
thread.  Earlier, there is no synchronization between the two
threads accessing the recovery handler, causing kernel panics.

Change-Id: Iee990276fdabd65e2e1f2e3c21ad574fc0d8a7bc
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Change-Id: I72854711acb8462b1581395396906744edaffc62
Change-Id: Ice36c8d67de988f93fd59d72e11d99324894cd58
Currently there is a deadlock when wfd and rotation is done
simultaneously and trying to acquire the shared lock. To
prevent this, acquire shared lock after rotated frame is
ready for wfd.

Change-Id: I3865f02c345ddadd985ee35134454a789936a79a
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Default priority for writeback is set to lowest, which can lead to other
clients' requests to come before MDP writeback. Change the priority to
P1 to match the rotator fetch QoS settings.

Change-Id: Ia703d1688581a0811502ce00863d1c973d53e749
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Change-Id: I1f38f1aff1c5f410529ba788fa0980cced44b297
  Fixes JIRA CYAN-4607 and CYAN-4229.

Change-Id: I060b2fb178bb24e145e86a56c3c89f316e8748ac
  Fixes issue of stuck orientation sensor introduced with last patch.
  Maintains the operability of the temp/humidity sensor.

Change-Id: I5f55527b728a2a15345cd2dfc0e01cbda08877ff
Change-Id: I3fe9ea6cf195611a6599485a557cf7544722c4e0
Add new operation request to share ion fd to userspace
for mapping to the frame buffer memory.

Change-Id: I404c73c19e3fffec593ffd32c34e7b1a74a500d8
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
 * "make mrproper" failed due to missing files.

Change-Id: I604d3e8fcc029b05a86438b0eb0540ad8fab87aa
Put CP_STATE_DEBUG_INDEX and CP_STATE_DEBUG_DATA under protection
to keep it from being written from an IB1. Doing so however opens
up a subtle "feature" in the microcode: memory read opcodes turn off
protected mode in the microcode to do the read and then turns it
back on regardless of the initial state. This is a problem if the
memory read happens while protected mode is turned off and then we
try to access a protected register which then complains and goes boom.

To account for this irregularity explicitly turn back off protected
mode in all the places where we know this will be a problem.

Change-Id: Ic0dedbad1397ca9b80132241ac006560a615e042
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Add VM_DONTCOPY to the default set of mmap flags to keep VM objects
from being copied on fork() and causing issues.  KGSL file descriptors
copied to a child are not expected to be usable.

Change-Id: Ic0dedbad85c07118a931ccb9f7a6fd0507da3e5a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Manikanta Sivapala and others added 30 commits January 14, 2015 00:44
0x8080 is gray color concealment, changing it to
black color, which is 0x8010.

Change-Id: I50897d771913ee33a5b2c2ea486996dfc0c294bf
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
New dts files for SM-N900S/K breaks the recovery build due to overweight recovery.img.

Workaround this by using LZMA instead of LZO.

Change-Id: Ie449945c23e023ed3d2fcb15242444a84d24fdff
Signed-off-by: arter97 <qkrwngud825@gmail.com>
This change flushes any queued work related to power collapse,
once the device is power suspended.
There are applications which do not destroy video instance
on suspending the device. For such applications, if the device
is power suspended, video driver does not prepare venus for
power collapse.
Considerable power saving is observed by power collapsing
venus before the device goes in suspend state.

Change-Id: I11252e45b10d0d3d3eefb38994acd083c847bbb8
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
In dynamic buffer mode, if flush was received before
stream-on, driver would have incremented the ref count
for output buffers, but not yet sent to firmware. So,
after flush done, there would be no fbd from firmware
and the reference to these buffers would not be removed.
So when the buffers are dequeued, driver fails to
unmap and free the output buffers.
Subsequently, after flush done, when client queues
the same output buffers again to driver, the ref
count is increased and becomes 2. This results in
the driver holding the buffers with itself, thereby
entering in to a deadlock situation and starving the
firmware of output buffers. This results in a video
freeze.

Change-Id: I0c3d13124bd48b900e56e14666eaed2f0e7ee9d6
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Video driver loads and unloads firmware at the start
and end of each session. Firmware download takes up
to 100 msec. When there are many b2b video sessions
e.g. thumbnail generation, this is an unnecessary
overhead. To overcome this problem, video driver will
unload the firmware 10 secs after the session is closed.
If a new session starts during this period, it will not
be required to download the firmware again.

Change-Id: Ia515c3ed89c75ea9e43852958d1cbb2d77fe4c51
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
When close is called directly without proper state operations,
then driver tries to clean all V4L2 framework memory. When driver
calls queue_release, it tries to call stream_off again. This
causes driver to re-enter the state operations. This change
prevents driver to re-enter the state diagram.

Change-Id: I6df248792fca78fe743bead311fa1cec61a6bb79
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
It's an arbitrary limit anyway.  Increase it to satisfy some clients
that'd like more buffers.

Change-Id: Ia1e0afd09089b6303b6590de804ea509b01626f4
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>
Currently the video driver delays unloading of firmware
by 10 sec. This was primarily done to avoid re-loading
the firmware if we had another video instance starting
immediately. However, if firmware goes in to bad state
and firmware unload is delayed, then any subsequent session
started within 10 sec will fail, as firmware is still in
bad state. We can avoid this by unloading firmware without
delay when video firmware goes in to bad state.

Change-Id: I747d6ce2fa61916cd8a24c180068879b371101a8
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Using the same delay for power collapse and
firmware unload can trigger race conditions in
the power collapse and firmware unload sequences.
Increase the firmware unload delay from 10 seconds
to 15 seconds to avoid this.

Change-Id: I0fbde99e8c7fca93f7b227d351a73c580e244614
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Change the fw load sequence to match the opposite of
unload sequence. This makes sure all clocks are on before calling
iommu attach.

Change-Id: I1113357c37158da5889f26da8fd4a74d0d170c07
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>`
1. Move OCMEM handling to venus_hfi from msm_vidc layer
and refactor all its calls. Only allocate/set ocmem
in two places: after we recieve sys_init_done and
when resume from power collapse. Similarly only
unset/free on core release and when we go into power
collapse.

2. Rename "has_ocmem" to "ocmem_size" and update
the same in dtsi file.

CRs-Fixed: 716899
Change-Id: Ib95bc0526afbb66c41850f9f1f821b53bfe18d9b
Signed-off-by: Shalaj Jain <shalajj@codeaurora.org>
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>
There is a race condition if client queued an ETB between
RELEASE_RESOURCE (OCMEM) and PC_PREP commands in power
collapse sequence where the client will never receive
ETB_DONE because the clocks are already turned off.
Avoid the problem by counting the number of commands
queued to video hardware to skip power collapse sequence
if client queues any commands.

Change-Id: I0bb908e11308cfc4f8bdbdc01fd92dac67b78eac
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Previously, when the hfi session creation failed, the hfi session was
left intact.  So, in case of timeouts, if the core responded beyond the
time out, the driver would handle the message thinking that it's a valid
session.  This commit cleans up the hfi session in case session_init
fails (or times out).

Also rename msm_comm_recover_from_session_error to msm_comm_kill_session,
as the latter was a misnomer, as the function was used to abort a session.

CRs-Fixed: 762541
Change-Id: I9ec4337014f012b6c0f677c5c4844bf9b28c9899
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>
Use instance "lock" instead of "sync_lock" variable for
mutex lock/unlock for video instance state change operation
else session init will be timed out due to dead lock when
max clients error is received from video hardware because
"sync_lock" is already acquired before session init.
At the same time do not free the session when any error
is received from video hardware, if freed results in
dangling pointer access when video driver wants to send
any commands to video hardware after session error,
leading to device reset. The proper way of session cleanup
is already being done upon receiving any errors from
video hardware.

CRs-Fixed: 762541
Change-Id: I689dd255681826508069fa86fb5a87f92fc775b5
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>
Change-Id: I49db1c785f6f5288c1218c93e923800bbf8c0701
Right now, input buffer size is calculated based on
maximum supported height and width returned from FW.
These values are not true representation as they are
calculated for rotation usecase. Driver needs to use
max MB supported from FW. This change fixes the same.

CRs-Fixed: 599818
Change-Id: I5b5f7d0db1088a4bc16ec7a32b31e1f763d5da7c
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
During CORE_INIT, driver votes for bus only if core->instances list
is not empty. Since the current video instance is added to core->instances
list after core init, driver fails to vote for bus. This causes ion_map to
hang and resets the device.

Change-Id: Ia68a953572852db63737f30998cf10c5db151292
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Take the minimum of the size calculated by driver using
max width and height supported and the size set by client
for input buffers. Change interface to get input and
output buffer sizes.

Change-Id: Ia3eb4cc7ae7bb38e2650fff1b694623e2aab62ef
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
* fixed in userspace

Change-Id: I99e8f5f95a3404bceef8954f8f0bb997f94e789e
Change-Id: I8ac0830e4a6dab4c4c0ed15be42edfa2af502a31
Change-Id: I795b679910ad3e08b038eb993d93558940a059ef
Change-Id: Ied6e75788a69e2315bc3ba7dbc4d55d19c8a112a
Change-Id: I0a72eb78f3eeb6a547259182ea5a50694e0b9afa
There is a race condition between offload callback thread
and HAL thread which can cause an eos ack notification to
be overwritten by a stop command request. Fix this by
using separate status vars for commands originating from
different thread contexts

Change-Id: Ibb845c72cd7765d50da0abd6ca13cda21545712a
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
This change ensures drain sequence is executed even if
a pause/resume commands are sent from userspace while
the control thread is waiting for all buffers to be consumed
by DSP.
CRs-Fixed: 711920

Change-Id: Ic763c5cee78f51719b0fb13e417d504e875bcf27
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
When device switch happens, ASM might return a 0 length
buffer. For MMAP style capture cases, buffers need to be
re-queued at the event handler for this case, otherwise
ASM will have no buffers to read data into after the
device is over successful.

Change-Id: I1dc925089f332fbdd830873c3d01ba74023b1f1b
CRs-fixed: 700614
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add support for matrix mixer command. The render window start and
end are set up before RUN CMD for ASM loopback is issued. This
will ensure that audio data is not dropped and audio quality
is good.

CRs-fixed: 667925
Signed-off-by: Damir Didjusto <damird@codeaurora.org>

Conflicts:
	include/sound/apr_audio-v2.h
	include/sound/q6asm-v2.h

Change-Id: I3cc2d9ee6c3abe5aeacf1182f8ede1e66f0434e2

Conflicts:
	include/sound/apr_audio-v2.h
 * MDSS5 supports Polynomial Color Correction. Use this to implement
   a simple sysfs API for adjusting RGB scaling values. This can be
   used to implement color temperature and other controls.
 * Why use this when we have KCAL? This code is dead simple, the
   interface is in the right place, and it allows for 128X accuracy.

Change-Id: Ib848d6c9dbdf41f61cc7539a61138d6632ceba94
Add a sysctl that causes an interface's optimistic addresses
to be considered equivalent to other non-deprecated addresses
for source address selection purposes.  Preferred addresses
will still take precedence over optimistic addresses, subject
to other ranking in the source address selection algorithm.

This is useful where different interfaces are connected to
different networks from different ISPs (e.g., a cell network
and a home wifi network).

The current behaviour complies with RFC 3484/6724, and it
makes sense if the host has only one interface, or has
multiple interfaces on the same network (same or cooperating
administrative domain(s), but not in the multiple distinct
networks case.

For example, if a mobile device has an IPv6 address on an LTE
network and then connects to IPv6-enabled wifi, while the wifi
IPv6 address is undergoing DAD, IPv6 connections will try use
the wifi default route with the LTE IPv6 address, and will get
stuck until they time out.

Also, because optimistic nodes can receive frames, issue
an RTM_NEWADDR as soon as DAD starts (with the IFA_F_OPTIMSTIC
flag appropriately set).  A second RTM_NEWADDR is sent if DAD
completes (the address flags have changed), otherwise an
RTM_DELADDR is sent.

Also: add an entry in ip-sysctl.txt for optimistic_dad.

[backport of net-next 7fd2561e4ebdd070ebba6d3326c4c5b13942323f]

Signed-off-by: Erik Kline <ek@google.com>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bug: 17769720
Change-Id: I440a9b8c788db6767d191bbebfd2dff481aa9e0d
The use_optimistic sysctl makes optimistic IPv6 addresses
equivalent to preferred addresses for source address selection
(e.g., when calling connect()), but it does not allow an
application to bind to optimistic addresses. This behaviour is
inconsistent - for example, it doesn't make sense for bind() to
an optimistic address fail with EADDRNOTAVAIL, but connect() to
choose that address outgoing address on the same socket.

Bug: 17769720
Bug: 18609055
Change-Id: I9de0d6c92ac45e29d28e318ac626c71806666f13
Signed-off-by: Erik Kline <ek@google.com>
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.