msm_fb: display: add ioctl for mixer info

Add new ioctl to allow user to query mdp mixer detail configuration.

Change-Id: Ibd6b88e8509ddcae403558f235b624a304713b15
msm_fb: display: Use __va instead of ioremap for framebuffer memory map

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm_fb: display: Add panel vertical porches into TE logic

Panel vertical porches are not considered into tear check logic
which cause TE can not tolerate panel vsync frequency variation
after panel heating up. This cause mdp to hang up and no screen
updated after that. This patch will have panel vertical porches
considered in during configure TE registers.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm:display:hdmi: Fix for EDID read/parse block[1]

HDCP enabled DVI monitors with block 0 and block 1 EDID always
switched to 640x480 even though they supported higher resolutions.
This patch reads DTD data from the correct offset from block[1]
and reads correct bits for interlaced format recognition.

Change-Id: I7ff0ac9a9f904777094fdcfebf4e2e94837bf48e
CRs-Fixed: 290391
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
video: msm: Defining functions for MIPI CMD panel

Defining do_histogram and lut_update functions for MIPI CMD panel

CRs-Fixed: 294029
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm: vidc: Fix performance level computation

The required performance level is rounded off to the incorrect
value due to the order of execution of the operations. Fixed
the issue by ensuring correct order of execution when computing
this value.

Signed-off-by: Deepika Pepakayala <deepikap@codeaurora.org>
video: msm: Block histogram requests with powered down panel

This causes MSMFB_HISTOGRAM ioctls to return an error when they are called
after the panel has entered a powered down state.

CRs-Fixed: 310429
Change-Id: I39c768c62a37ca83df2db2309230971cb6492bab
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
msm_fb: Discontinue use of clk_set_min_rate()

This proprietary API will soon be removed. Replace use of it with a
combination of clk_round_rate() and clk_set_rate() where appropriate.

Calls to clk_set_min_rate() with a rate of 0Hz followed immediately
by a clk_disable() served no purpose and are removed entirely.

Change-Id: I56d680ee36cc6292dcc436eeec7acdc57f3c243a
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
video: msm: Add mhl api header file

MHL API defines an interface for HDMI driver.

The API provides the information of the MHL connection state
for HDMI to transmit the MHL supported video format.

Change-Id: If19e497b7a238eb0465f9fb13b5586d3b9043360
Signed-off-by: Eugene Yasman <eyasman@codeaurora.org>
msm_fb: Fixing Aspect Ratio

Non-standard resolution, like 531*398, is treated as 720*480 instead of
640*480 , as it has non 4:3 aspect ratio.Chanding aspect ration calculation
to be in a range , rather than absolute.

CRs-Fixed: 320022
Change-Id: Ie3b1ebefe48ef648720f06336239af907c3468d2
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm_fb: display: Assign proper destination rectangles to mdp blit

Add check for (90 + Flip Horizontal) and Flip Vertical cases to assign
proper destination rectangle parameters to avoid corrupted frame
buffer content.

CRs-Fixed: 344807
Change-Id: I7e7b0b8d26f08f63a6f9c55eedd37f31cf0348d7
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
(cherry picked from commit 07c82d6ca63c6be28ab897fdb3ccfc1a448c342f)
msm_fb: Fix error in y-offset check logic in FB driver

After 4 KB alignment changes, the frame from 3rd buffer doesn't
get updated since during PUT_VSCREEN_INFO ioctl, the driver
returns -1 to userspace due to error in logic because the hole
size is not considered in calculating the logic for validity of
the y-offset. Change fixes this error.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit d37b52404236bf4cadf530a238cafc5d6499d32a)

Change-Id: Ifccfa25a37fe0f8d86bf5b822d9affe7fa41203a
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: Clean up the fix for error in y-offset check in FB driver

There is a failure observed in yres_virtual offset check and every
third frame gets skipped without an error message. Due to this high
fps is noticed in the test applications. Correct the yres_virtual
offset check.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>

Change-Id: I35af570df2d6d2609562203f30f3caa1506b9b1d
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm:vidc: Fix buffer pool index

While searching for the available buffer entry
in the buffer pool the search should begin from
index 1 as zeroth entry is reserved.

CRs-fixed: 366361
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
(cherry picked from commit 8c7e367a5ccd1c78c728657a14f08d6956b72e50)

Change-Id: I754fac98ce14f28cede1cb590c62784ad303a645
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: Allow panels to specify a second mode

This allows for panels that support more than one mode
to specify the maximum configuration. The framebuffer
size is now based on the larger of the primary and
alternate modes.  The alternate mode is also used to
check parameters when userspace is requesting a change
to the framebuffer configuration.

Change-Id: Icf644b0fb5e54fc95f45ea8c5ed97f6243cb886c
Signed-off-by: Philip Elcan <pelcan@codeaurora.org>
fix up
msm_fb: Correct the chroma offset calculations for Yamato format

In the PPP blit operations, when the source image format is
Yamato, there is chroma offset calculations going wrong in
the case when a frame is split into parts and blit is done
separately. Correct the chroma offset calculations in this
case.

CRs-fixed: 366908
Change-Id: I867024632fda9f64a569150e0b6389d55614cd3a
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Make buffers aligned to 4K page boundary

This change makes the frame buffers aligned to the page
boundary. Improves GPU performance since accessing the
frame buffer from page boundary is faster.

CRs-fixed: 325134
Change-Id: I6ce4477f62536a3cd81064e26dc08f2b199e181b
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Clean up of frame buffer 4KB alignment changes

Remove redundant code from the 4 KB alignment patch
and reduce the overhead of calculation of the hole
size by using bitwise operators in its calculation.

Change-Id: I1706484249bf8e01b250e91fa87e00f6021d9a72
CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: remove #if 0

Cleanup all #if 0s in display driver.

Change-Id: I32473b33ad4dff3e5d3d91aae42d70955836cd52
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>