msm: rotator: add downscale support in rotator

Rotator is capable of performing 1/2, 1/4 and 1/8 down scaling. Add
downscale_ratio parameter to provide support for this feature.

CRs-Fixed: 315874
Change-Id: I57dc3456ccc9bec2a125750b3e9909ffcbaf45f6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Fix rotator YCrCb planar formats unexpected output

Rotator expects planar input in YCbCr order, wrong color can be seen
on ouput image when given YCrCb because the chromninance planes picked
are not correct. Swap Cb and Cr plane addresses to output correct image.

Change-Id: Ia05ab704d18da4aac49e63fb805c40a95ea51a33
CRs-Fixed: 327956
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Add bus scaling support

Add bus scaling support to rotator driver

Change-Id: I53faf6070a9dc6d6359b6d58cb7cb618217ee8c0
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
msm: rotator: Add pseudo-planar output for interleaved format.

Rotator gives pseudo-planar H2V1 output for interleaved
H2V1 input format.

Change-Id: I2a7af3243dfb1175ea14d6649b4cec87029fec38
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
(cherry picked from commit 732dcd668ffa9c2160fca0c34d21107be7a37cda)
msm_fb: display: decrease file->f_count when play

Frame buffer's (fb0) f_count needed to be decreased after both
overlay play and rotation so that fb0 can be closed and display
will be blanked out after system suspended.

CRs-fixed: 336254
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit beaa9356713db6949eefa32ed329bf87a3461842)

Change-Id: Ibaeb537bffedc473b6ce49531385aed3b791710d
Signed-off-by: Yen-Pin Hsiao <yphsiao@codeaurora.org>
msm: rotator: provide dst format based on src format

Some rotator output formats differ from input, these mappings used to be
handled in userspace, but to avoid issues this is now done in driver.

CRs-fixed: 339114,337040
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit fd81fe0e21ae87f38d7afcf4bb8ce7d5ca8101ff)

Change-Id: I7b7f36d97d3bb2fb04e89d57b8f11e8aa65b18c1
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Add rotator hardware version check for YCrCb planar inputs

For YCrCb planar inputs chrominance order is dependent on rotator hardware
version. Add hardware check to swap Cb and Cr for 7x30 and 8x60 rotators.

CRs-fixed: 339114,337040
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
(cherry picked from commit befc1d5dbb5fd0698faad15ef57180f670533f0e)

Change-Id: I0930143a2d78ae45e3e9bbf80ed533286d28fb7f
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Call S/W reset on AXI bus error interrupts

Call Rotator S/W Reset when AXI bus error interrupts are
seen during a rotate request

CRs-fixed: 341947
Change-Id: Iab64a79829ca93019cfd54505014ed168cf74464
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
(cherry picked from commit 30cf3eba95df9c6bf90f77b7f4ce40307d106e5d)
video: msm: Update CONFIG_MHL condition

Replace generic CONFIG_MHL by a specific define
CONFIG_FB_MSM_HDMI_MHL.implemented in Kconfig

Change-Id: I3a8393518ca4f3adc1d74a62cb615ca629269af2
Signed-off-by: Eugene Yasman <eyasman@codeaurora.org>
msm: pil-dsps: Assert peripheral reset in addition to proc reset

Failure to assert the peripheral reset in addition to the
processor reset causes state to be maintained across reboots.
Assert the peripheral reset to fully reset the dsps.

Change-Id: I737271a9ffa42253894f83dfd856fb3419ef8275
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
gpu: Move GPU driver files to match msm.git
msm: display: Add rotator bus scaling vectors for 8660/8960

Add rotator bus scaling vectors for 8660 & 8960 targets

Change-Id: I9590fff72a57687b110355e3862d5ac5cf61e0cc
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
video:msm: Fix histogram error check logic

Current error check logic is incorrect. Starting the histogram should
throw an error if the histogram current state (mdp_is_hist_data) is
already true.

Similarly, stopping the histogram should only throw an error if the
histogram current state has already been set to false.

In the cases of suspend/resume the mdp_histogram_ctrl calls should only be
allowed when the histogram desired state (mdp_is_hist_start) is true.

Change-Id: Idef307293a7e4fb70807e9cea53078bf3cc67f15
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm: kgsl: flush device workqueue before stop

Make sure the irq is off, the idle timer is
stopped and the workqueue is flushed before
stopping the device for early suspend, suspend,
last release or hang recovery. There is one case
where the workqueue cannot be flushed, which is from
kgsl_pwrctrl_sleep() when going into SLUMBER
state. This codepath can be called from the
workqueue itself so flushing would deadlock.

Change-Id: I19bcd192845401ac0d94aa60a9252970b634c1ea
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm_fb: Handle static screen update case in CABL for MDP3.0.3

Avoid histogram bin collection and copy during static screen update.
Histogram ioctls are also returned early in this case.

Change-Id: Id75a2a61e018f683e2ec2d23c0fb78e1c7605a7d
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
net: wireless: bcmdhd: Update to latest version
Revert "msm_fb: Handle static screen update case in CABL for MDP3.0.3"

This reverts commit af62e1f457b0438b3770fe030b31d1baffc06b39.
msm: kgsl: Allow userspace processes to turn off/on power features.

Primarily intended to allow Adreno Profiler to turn off the features
that confuse some of its metrics.

Change-Id: I22e0bd68147ef1631e3bd3f579e777866fb894c4
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>