msm_fb: display: get mipi frame rate from panel file

If frame rate value for mipi video panel is coded in panel file it can
be directly used to avoid calculation error.

Change-Id: I6ad86226c81da4bcf36196385f9ff4bea0bef0ca
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: Create sysfs nodes during frame buffer initialization

During boot up, create two sysfs nodes and write the xres and
yres details of the panel used. This is required to support
dynamic DPI value setting based on panel resolution.

CRs-fixed: 443699
Change-Id: I5b85c95653e6cb7aba2aea103c23b587ac01795e
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: skip one vsync event after enabling mdp and vsync clk

Both mdp and mdp_vsync clks are disabled for command mode panel when
no new frames are being played. When they are re-enabled if new
requests come in, the first vsync event which is signaled by read
pointer interrupt arrives in a random time due to the sync between mdp
and panel, so skip it to maintain correct vsync timing.

Change-Id: I683b765e4a16d3d152b9270f5982234b94921f1e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: wake up system before vsync for cmd panel

Add this feature for cmd mode panel. The feature is to avoid frame
drops due to power collapse and it is already present for other
display interfaces.

Change-Id: Ic68f41cd59931294b592577475ed7480459f2cf8
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: add panel's late_init

Some panels need to be initialized after panel is on.
Add late_init to support this feature.

CRs-fixed: 433011
Change-Id: I73c623d1fe52363f070af79ce4bf7774cd84689e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: allow backlight update after first update

bl_updated is set to non zero at pan_display if unset_bl_level
is not zero. And unset_bl_level is not updated unless bl_updated
is zero. There is a situation that bl_updated stay as zero after
first pan display due to unset_bl_level is still zero which
prevents back light from being changed until next pan display
even though unset_bl_level changed. This patch break up this loop
and allow back light being changed right after first pan display.

CRs-fixed: 471983
Change-Id: I75504206853517672f968e8ea8fc6782a282e326
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: msm_fb: remove mmio access through mmap

Disable access to mm io and add
appropriate range checks to ensure valid accesses
through framebuffer mmap. This prevents illegal
access into memory.

CRs-Fixed: 474706
Change-Id: If25166f2732433ef967e99c716440030b567aae9
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
msm: mdp: Update sync pt. behaviour

Add a retire fence and clean up the existing release fence
implementation

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
display: removed the code exhausts file descriptor in mdp overlay and rotator.

Fix the problem crashed while playing video clips and VT camera test.
ion_share_dma_buf is called in pr_debug.
So, it is called depends on build option and makes crash problem.
msm: display: plane alpha support

Clean up the blending rule to follow blend_op set from hwc.
Use modulate alpha for plane alpha when it is not 0xff.
Keep backward compatibility if blend_op is not set.

Change-Id: I02fd3c3c7b5ace2e6eec22b2db0284161404a0fc
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: display: extend mdp debugfs with force blt enable

Enabling/disabling mixer0 or mixer1 blt mode is a critical way to
debug display issues, so add debugfs interfaces to force blt mode
enabled/disabled with adb shell commands.

CRs-fixed: 390953
Change-Id: I96a568f22398867571a796a863c098f749f5618b
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay.c
msm: display: Allow MDP clocks to use Max clock.

Allowing the MDP clock to use its Max clock in order to avoid the blt
mode switch issues for both MDP mixers, as blt mode switch resulting
in HW hung

Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c

Change-Id: I697445c38df92b57aad54e991e006948c3254f48
msm: mdp: Fix clocks

The max supported clock was wrong

Conflicts:
	drivers/video/msm/mdp.c

Change-Id: I12b9889b3c4273a2dd1edd748f5a78e4a1da9db1
msm_fb: display: Add support to YCBYCR MDP format

Add support of MDP_YCBYCR_H2V1 interleaved YUV format to MDP
for a-family targets.

Change-Id: I5afb84a95693d1ced114152364782a10c4d56bc2
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb : display : Change fps level dynamically.

This change lets the user modify the fps level dynamically using
sysfs interface.

Change-Id: Ie99bbca5ec1a0b5ff5fa3570874b254e3fb7235c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm_fb: display: add early_off during panel off

Some panels need to send display_off command before
dsi controller turned off. This patch add early_off
feature for this purpose.

Change-Id: Id377120e9d6972c5f773760369ec056be37e93ff
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c
msm: display: Limit dynamic fps feature only to MIPI video panels.

As dynamic fps feature is supported only for MIPI video panels,
return -EINVAL if sysfs node is written for panels other than
MIPI video. This change also removes world writable permissions
for sysfs node.

Change-Id: I72260e6032cb8a758b0457c36a808263a981260f
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm_fb: display: no native frame buffer memory operations

Since we don't use pan_display, the native frame buffer memory is not
necessary any more. This is driver change, mainly disabling memory
operations that are associated with native frame buffers.

CRs-fixed: 458938
Change-Id: If33bff32ee1d9228ff8a74ca09961a0f10f1fcdd
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: mdss: refactor mdss color formats

Add missing color formats and reorganize color formats to have better
code reuse and make it easy to add new formats if required.

Change-Id: Ic7c6bb6f35a9c282d9ef99bd5e1d18b0b8033971
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: add color format for venus core

Venus output format expects luma and chroma components to be aligned to
32 bytes, add new color format to support this type of input.

Change-Id: I1fc9a61a0c8cfa8244460105fdab02d019d31556
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>