msm: mdss: use panel framerate for performance calculations

Replace hard coded panel frame rate with proper calculations based on
panel size and clock rate.

Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit 0a8020d407c239b15cdad8db781d33863d3d15ee)

Change-Id: I3682212dbd5a81d5333b73fe96db68bbfbb1b3ec
Signed-off-by: Sridhar Nelloru <nellos@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_mdp_ctl.c
	drivers/video/msm/mdss/mdss_mdp_util.c
	drivers/video/msm/mdss/mdss_panel.h
dts: msm8974-lge-panel: Add panel dimensions
msm: mdss: Avoid deadlock in interrupt handler

Reduce the locking scope in irq_dispatch so that
mdss_lock is not held when the irq_handler is dispatched.
The dispatched irq_handler will try to acquire mdp_lock but
another active process can already have mdp_lock and tries to
procure mdss_lock creating a deadlock situation. Not locking
with mdss_lock is acceptable as the calls will be synchronized
through mdp_lock from MDP clients.

Change-Id: I586b7e00c046dd4081b4e838e62e0a0556f4c717
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: mdss: Compensate for low VBP in MDP clock calculations
mdss: display: send multiple dcs commands with one transmission

Packing consecutive dcs commands into one single buffer if their
dcs header's "last" flag byte is not set. The packing process will
stop after packing first dcs command with "last" flag byte set.
Therefore multiple dcs commands can be send to panel with one
transmission.

CRs-Fixed: 486748
Change-Id: I76d2a043788638579a62a7f949309f049fc999d7
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: mdss: Add support for DCS read command for split display

Add code to support DCS read command during blanking when
pixel transmission is enabled. Check for broadcast mode
bit to enable DCS read for split display panels.

CRs-Fixed: 486501
Change-Id: I38d08060ce84fc0fb89777303ee9274a3a8a43e2
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_dsi_host.c
msm: mdss: Add error check for cmds_tx and cmds_rx APIs

Currently in the MDSS DSI driver, there is no error checking
and return for add, dma_tx and dma_rx functions in cmds_tx
and cmds_rx APIs in case read or write operations fails.
So, added error checks and return messages. Also, enable
irq after dma_add in cmds_rx in correspondence with cmdx_tx api.

Change-Id: I0fc2310ae8476510b3f903382988fec25cc2efdb
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_dsi_host.c
mdss: dsi: Add first controller initialization in panel probe

For cont Splash feature for split display panels,
first controller has to be initialized in probe.
Move the first controller initialization from host init
to controller init function that is called during panel
probe.

Change-Id: Ib964877cd345adfc9f52e7ebe5dc59652a2de44e
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
dsi: Back out LG's wait4video changes
gpu: ion: Ensure zeroed memory gets written to RAM