include: Add new histogram IOCTL parameters

Change the histogram IOCTLS to accept new data structures as well as read
from userspace when required. These changes are required so that other
histogram blocks can be read instead of the current DMA-P only
implementation.

Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 97c98688ca5549db24685ef87cd14aab21f86322)

Change-Id: Ief0f1984aca3f2d5b5c2032c700c9aa01092cdbb
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: msm_sdcc: defer device resume until next transfer request comes

If SDCC device runtime status was RPM_RESUMED before system suspend
happens, during next system resume SDCC will also be resumed
synchronously. As SDCC resume is happening as part of system resume
path and it may take around 150ms to resume for SDCC slot which have
SD card connected. As this resume latency is too high, it may impact
overall system resume time and can effect the user experience.

This change makes sure that during system suspend, device runtime
status gets set to RPM_SUSPENDED. So when system resume happens,
SDCC resume can be skipped which means SDCC resume is deferred
until next SDCC transfer request comes in.

CRs-fixed: 344459
Change-Id: I579030b3759fee2c566ab06daad10ff4dd4c0085
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
msm: rotator: Squashed revert of msm_rotator from 3.0 kernel
Revert "msm: rotator: Add rotator hardware version check for YCrCb planar inputs"

This reverts commit e46d6117f7bdac6b4faeaa134969c7f9b84f89e9.

Revert "msm: rotator: provide dst format based on src format"

This reverts commit b1a1a3c9abf5c0b417c6198560a8997b668c62f8.

Revert "msm: rotator: Squashed update to version from msm 3.0 kernel"

This reverts commit 27c02e8fbb585da3677ca1a9405255baecc15613.

Revert "msm_fb: display: replace task_tgid_nr with current->pid"

This reverts commit dfba2f8dfa6f08d5c8821f4364d7132a9ce006ab.
msm: rotator: Squashed update to version from msm 2.6.35 kernel
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>

Conflicts:

	drivers/char/msm_rotator.c
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: 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>

Conflicts:

	drivers/char/msm_rotator.c
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>

Conflicts:

	drivers/char/msm_rotator.c