msm_fb: display: configure dsi control as free run

Configure DSI controller as free run instead of software
trigger.  At free run, DSI controller is triggered by
MDP directly when output of blending is ready. No extra
register write to trigger DSI controller is necessary.
Therefore it reduce latency during MDP kickoff.

Change-Id: I630cc47be806a8de383648aa80804b4d65210d4d
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add dcs read parser

Parser byte stream responsed back from dcs client base on
the dcs command type.

CRs-fixed: 306936
Change-Id: I0e3776c7ca86f7c4a0f0d090da108599753b9997
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Fix-up
msm_fb: display: Add support for HDMI as primary

Add support for using HDMI as primary. Includes changing number
of framebuffers to 2, using RGBA format, enabling HPD by default.

Change-Id: I7a01ee3cf981b08d05eed13cd0fb7a41983211b5
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Fix dsi read packet size for LiQUID

The toshiba DSI-to-LVDS bridge supports only packet size of 4
for reading its registers.
The DSI host should avoid changing the bridge packet size.

Change-Id: I08a4cb5921c90e9fa07db62e0310fcdb6155f131
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Fix DSI WSVGA Toshiba panel PLL control settings

Fix DSI WSVGA Toshiba panel PLL control settings to avoid
over-write on reset values from phy table

Change-Id: Ia4b3a4a409a4601a3a2c9132ff66c164f1f8c9fd
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Change the backlight PWM freq to 66 KHZ for LiQUID

Change the backlight PWM to 66 KHZ,
according to the backlight driver HW spec.

Change-Id: I67bc02b7863d7e8721841edfb4cfe3a4414a1bab
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: CSC Matrix update support is added

CSC Matrix update support is added for MDP4 VG pipes
to convert  Ycbcr -> RGB format

CRs-fixed: 313601
Change-Id: Ib6fb8f2eab4b1e871a406a3a2d7274fcfdcdd9d1
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Add YV12 support in the MDP

Added changes to support YV12 input format in the MDP.

Change-Id: Id8344af1a1607cbf4a6c01ad35441bbdd4fcbd49
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: Fix suspend/resume for HDMI as primary display

Fix suspend/resume for HDMI as primary display by setting
solid fill for RGB pipe connected to DTV

Change-Id: I2f6bf1892137ef40c55e26498c03cfb7a439219b
CRs-Fixed: 310198
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: HDMI: Support for clock stretching

HDMI Sink may hold off the DDC transaction by stretching the SCL line
during the SCL-low period following the Acknowledge bit as permitted
by the I2C specification. All HDMI Sources shall delay the DDC transaction
while the SCL line is being held low. HDMI_DDC_SETUP register field
<TIME_LIMIT> should be set.

Change-Id: If58ee3f81b5f89ab22c5e74104ba5ad07ff6094d
CRs-Fixed: 296256
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: enable hw cursor for dsi video panel

fix hw cursor updates not coming for dsi video panel defining callback
during driver setup.

CRs-Fixed: 309515
Change-Id: I12586e813c19ff4dbe1e3877eaf14b5a396b273a
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: check BLT mode within overlay_done isr

At dsi video mode, overlay_done isr return immediately if blt mode
was not enabled. Aslo, since time between overlay_done interrupt and
dmap_done interrupt is very close, both may be serviced within same
ISR. In this case overlay_done is serviced first.

CRs-fixed: 310918
Change-Id: If8b6220c26ea8d08857f87f33609b1673238b2ec
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add no_max_pkt_size flag

Add no_max_pkt_size flag to allow toshiba dcs to lvds bridege chip
work.

Change-Id: Icaed4bc749dec96f12e3e0e78c098294658a2c46
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: update busy flag before check blt_addr

dma_busy flag is set to TRUE on every vsycn push and set it
to FALSE at overlay0_done ISR. When blt disable, dma_busy need
to be set to FALSE before return due to blt_addr == NULL at
overlay0_done ISR.

Change-Id: If2622631a7cd03276ae7fbd8326155d0e9c7b66b
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add mutex to dsi_on

During resume, backlight dcs commands to client may be issued
before dsi_on completed. Add mutex to dsi_on and check dsi state
to make sure dsi_on is completed before sending backlight command
to panel to avoid conflict on dsi link. Otherwise screen will
stay blank if confliction happened.

Change-Id: Icfba079b228f02aeb89949befb10cca29bf6d744
Signed-off-by: kuogee hsieh <khsieh@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Fix-up
msmfb: display: support for overlay wait ioctl

this adds supports for overlay wait ioctl and it allows the
userapce start overlay play and HDMI and can call wait
later point of the time

Change-Id: I8000cc52a497861e0a5fdfe58c0c049219724ab6
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
video: msm: Writeback support in mdp for WFD.

Adds writeback mode in mdp for wifi-display(WFD).
This mode can be used to get the captured
frames from mdp. This is added to support
wifi-display capture device.

Change-Id: Iae30cac65af181d8df4b514a128cd876fe7dda1c
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Fix-up