include: linux: msm_vidc_enc: revert HTC's weird pbuffer definition
ville: update defconfig to build modules into kernel
msm: rotator: reset at "Initial Contribution"

Reset msm_rotator at commit id: 3f2bc4d6eb5a4fada842462ba22bb6bbb41d00c7
msm: rotator: add support for H2V2 planar input

Add support for H2V2 planar input, output is still in
pseudoplanar.

CRs-Fixed: 295113
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: Don't control rot_axi_clk explicitly

It is now controlled implicitly along with the rotator core clock
for all SoCs.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm_fb: display: replace task_tgid_nr with current->pid

rotator session is not be shared by threads with same parent.
Therefore repalce task_tgid_nr(current) with current->pid.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: rotator: fix the rotation issue on 8960 V2

8960 V2 contains different version from V1, until we
have the proper soc check in the board file to modify
the rotator device version disabling the check in the
rotator driver. It won't have any side effects.

Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
msm: rotator: Add YV12 support in the Rotator

Added changes to support YV12 input format in the Rotator.
Output will be Pseudoplanar in this case.

Change-Id: Ic77ad2b6a3aaa66ad923494fb6c96e07738d674b
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
msm: rotator: add check for buffers boundaries

check that offset is within the range of buffer to avoid possible
access to other memory regions.

Change-Id: I37f49b0c95cc9bf79a09c7b0fa04f1135b691a5d
CRs-Fixed: 308058
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: rotator: ion support in rotator driver

Add support for ion memory heaps in the rotator
driver

Change-Id: Id844050871e4aaa7fa0e0fc9d69646d6d9875b85
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: rotator: Replace clk_set_min_rate() with clk_set_rate()

The rotator driver requests exact rates.  There is no need to call
the clk_set_min_rate() API, which will soon be removed altogether.
Call clk_set_rate() instead.

Change-Id: Ica9cb30f85132e92a00b0000eea498c47645b697
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
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: add rotator ref count to cleanup code

Perform cleanup of rotator sessions only if reference count reaches 0,
this avoids closing rotator sessions from sibling threads.

Change-Id: I83add90cc04faa90c372dde09a096c7a07be528a
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit cea80ac8448ded8bbba56f1eb219857526270874)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
msm: rotator: update user session parameters for all rotator start calls

Session parameters hold the dst format of rotator output, this is
currently passed to userspace only on new session, if session is reused
with different format session not updated and can cause incorrect
display output configuration.

CRs-Fixed: 349903
Change-Id: I5dd3f277b0d5fac145c805f4898c799ef4fb1b94
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit c56399542e5a015f2f10cdc443365167a5f17f2a)