tspdrv: add userspace vibration strength control (1/2)

Change-Id: Ie0941223f07a5df6baadad6b8228cc91710040c9
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>

Code clean-ups & vibration strength over stock 126 value
Signed-off-by: Jean-Pierre Rasquin <yank555.lu@gmail.com>
tspdrv: Move vibrator sysfs node

Change-Id: Ia5ab68694b6829d88ff7be5c2729c2e0396495b9
WLAN subsystem: Sysctl support for key TCP/IP parameters

It has been observed that default values for some of key tcp/ip
parameters are affecting the tput/performance of the system. Hence
extending configuration capabilities to TCP/Ip stack through
sysctl interface

Change-Id: Ia92fc229c0a4a8c3f7e4e02cf7e3c8849719ddff
CRs-Fixed: 507581

Signed-off-by: Kiran Kumar Lokere <klokere@codeaurora.org>
msm: Create shadow files under /sys/kernel/ipv4

The TCP delayed ack parameters can be configured from user space
application which runs with non-root credentials and does not have
direct write access to /proc entries. This commit creates shadow
files under /sys/kernel/ipv4 which maps to /proc/sys/net/ipv4.

CRs-Fixed: 628139
Change-Id: Ib7242aaae930dbc02133e44c04e182ebc52bc89f
Signed-off-by: Ravi Joshi <ravij@codeaurora.org>
hlte: Fix probing of the ram_console (taken from mondrianwifi)

This fixes the last_kmsg.

Change-Id: Ibedeb4595c50ce68c65f4f40dd34288b5132bb05
msm: mdss: Perform bandwidth check before applying any fudge

Earlier the bandwidth check is done after applying an ib_fudge.
This causes some valid use cases to fall back to GPU. Perform
bandwidth check against the actual value without considering
any fudges.

Change-Id: I09d10724c473c76ade8cf2a2b8d1bda9862816a2
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
msm: mdss: MDP clock optimization for single layer video playback

MDP core clock bumping is not required for single layer video
playback in 8x26 targets. Hence add revision check to avoid fudge
factor.

Change-Id: I1b0ccb4ef50514f705845b0218fa6ca0d28c1779
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
msm: mdss: Fix mdp clock rate assignment when apply fudge is false

When apply fudge is false, currently mdp clock rate can take
garbage values, hence assign the calculated clock rate without
applying any fudge factors.

Change-Id: I7c9d34024ab94b05160b50560ab136c0c8b7781d
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
msm: mdss: add real time debug log

To analyze issues like underruns and other timing issues
add xlogs. Add debugfs entry for xlog to enable or disable
logging and register dumping at run time.

Enable xlog: echo 1 > <debugfs>/mdp/xlog/enable

Enable register dump:
echo 1 > <debugfs>/mdp/xlog/reg_dump

Enable panic on error:
echo 1 > <debugfs>/mdp/xlog/panic

Get xlogs and register dump
cat <debugfs>/mdp/xlog/dump

Change-Id: I10c2993d9dde6ef16a37256928fff1239e6370ff
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
msm: mdss: protect command mode BW votes by tracking HW/SW states

Track two states where the BW is needed for the command mode panels
and prevent the BW vote to be released during any of those two states:
1. SW Commit State: This state is the time when the SW has requested
a BW vote, and it will be processing it; it starts at the beginning of
Commit and finish once the kickoff is issued.
2. HW MDP State: This state is the time when the HW is busy
doing the actual transaction, so bandwidth must be kept until
HW finishes; it starts at the beginning of the kickoff and finishes
once the ping pong done interrupt is received.

Change-Id: I2e56128be3ab25a1b065692ae76387a3cd383df3
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
msm: mdss: add property to set from device tree the overlap BW fudge factor

Current calculations apply one fudge factor to the final bandwidth
regardless if this is a result from the overlap or prefill calculation.
With this change the final bandwidth can be tuned up to apply a different
fudge factor when the bandwidth depends on the overlap calculation.

CRs-Fixed: 635005
Change-Id: Iaa9718bda3264a47bf70a2facba0d23e4b2414f3
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
msm: mdss: ensure retire fences are signaled during panel off

When turning off command mode panel, if retire fences are still active
and suspend sequence goes through some fences may remain active.
If fences remain active command panel off sequence would stop signaling
vsyncs and would throw off the timeline. To fix this clear the retire
timeline when turning panel off.

Change-Id: I32a5fe0f81b16fa2ef959c7f05e484fb9f9f8598
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: Prevent modification to image roi when scaling

If pixel extension is enabled by scaler, and layer content is
deinterlaced, the modifications to the layers region of interest
to be used by mdp hw has already been modified. We should not
further changing these values.

Change-Id: I2c528b54ce07e90b66b56ef008b73b78e4227c9d
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: mdss: remove unnecessary mutex lock.

Remove additional mutex lock at the time of releasing retire
fences.

Change-Id: Ibd2f05ce057ae7370cce14245303f83ef228b432
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
msm: mdss: Fix check for highest of overlap and prefill bw calc

This check is supposed to be used to get the max between overlap and
prefill bandwidth value. This value is used when calculating the ib
bandwidth value to request when bus bandwidth is updated. Having a value
that is too low results in mdp underrun.

Change-Id: Ie1302737f004d8e030f8d61c75d4301fe99b1069
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: mdss: apply BW fudge factor to all controllers when video mode present

If there is a video mode controller enabled and other
controllers non-video mode, current display driver apply
the bw fudge factor only to the controller that it is
video mode.
This change will apply the fudge factor to all the
controllers enabled if any of those it is video mode to
fix some of the underruns observed in the video interfaces.

Change-Id: I0d01477dc45edbef2a25ccd540aa06b3c43073a4
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: mdss: move MDSS revision macros to /linux/msm_mdp.h

Currently kernel driver and user mode libraries keep their own
copies of HW revision numbers. This strategy is prone to errors
and usually frowned upon. Fix this by moving revision information
to sanitized header which is shared by kernel drivers and user mode
libraries.

Change-Id: I59d1256ffd98e07f4ef9ae2b534f04b67abd2119
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
video: mdss: Cleanup Samsung bits after merge

Change-Id: Ieb1115bad9706adcbb82ec26c6bbc8250f4f648a
msm: mdss: Notify userspace of idle screen case

Expose two new sysfs nodes - idle_time and idle_notify - that
are used to notify userspace whenever the display is idle with
no screen updates. The idle_time node needs to be configured
with the duration in milliseconds to detect no screen updates.
The userspace app can poll on the idle_notify node to get
notifications of the idle state.

Change-Id: I7435a084ad2c928d952c5d106ff9ef92aaa385b9
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
CRs-Fixed: 637403
mdss: display: use local_clock() instead of ktime for xlog

For better analysis, time stamp of xlog should synchronize with
the time stamp of printk. Use local_clock() to log time stamp.

CRs-Fixed: 673350
Change-Id: I00e456fdc35f5a85d8029d12f4507990444e2821
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>