msm_fb : Avoid trying to acquire an already acquired mutex

MDP driver for LCDC is trying to acquire the same mutex after
acquiring it already. This is causing boot up issues on devices
using LCDC interface. This change avoids the problem.

Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
(cherry picked from commit 06abe49ea4b91ea64c8f1e738756e43e0e6a8662)

Change-Id: I0ce0e6d9414d3eb5e3e5c0e4883a39da655922d3
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
lge: HDMI: miscellaneous fixes
msm_fb: HDMI: Support VCDB parsing of EDID data

This change enhances the EDID parser to read the
Video Capability Data Block (VCDB) in order to check
whether a sink supports underscan mode.

CRs-fixed: 388272
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 5066a5f662d0d88ad4c94158fe392bb0fbd61cb4)

Change-Id: I0789bd069228373a1a9ff7177a2528e60c31fdad
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: HDMI: Enable SPD InfoFrame transmission

Sinks use the information in the SPD InfoFrame to get
the vendor name and the product information of the source
device. This change adds the ability to specify this
information and transmit the data as part of the SPD
InfoFrame.

CRs-fixed: 388272
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit fff7a7d207a8791a68706bf8fac3838884981204)

Change-Id: I898473018d446e70cb821a5fc65ce55efb11f379
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: HDMI: Enhance EDID parser to read physical address

This change adds the support for reading the physical address
field in Vendor Specific Data Block (VSDB) of the EDID data of
a sink.

CRs-fixed: 388272
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 226b429d026195ff93b7de8066d8943b58dc65a5)

Change-Id: If421d4c90e57e09e424a93ea15b9da9ea6df7217
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: HDMI: Enhance EDID Parser to read supported 3D formats

EDID Vendor Specific Data Block (VSDB) contains information
regarding all the 3D video formats that are supported by a sink.
This change enhances the EDID parser to read this data.

CRs-fixed: 388272
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 5479cc16a03c6b791daa5eac8f45018ea873cfc1)

Change-Id: I627875f65eb2a0324793e3eb38a90f167ce32c9c
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: HDMI: Fix EDID parsing logic for multiple data blocks

This change fixes a bug in EDID parsing logic when there are
more than one data blocks of the same type in the EDID data. With
this change, the starting offset used to scan for the next data
block, is computed correctly.

CRs-fixed: 388272
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 8b25b2a0b5910befcf0668dc76294f83dccc080f)

Change-Id: I7c6b713344b2282f9341d6fbc27aaf705b686761
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: HDMI: Re-initialize the scan details for every HPD

After disconnecting the phone from TV which doesn't support
underscan, and connected to TV which support underscan,
underscan is not working due to non re-initialization of
scan variables. Re-initialize the underscan variables for
every HDP events.

CRs-fixed: 375862 388272
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
(cherry picked from commit 62d4a8cb1a5a1a98b3a70988de9ff9e2c1368be6)

Change-Id: I4103370d3881f0022aaeacbb8fca1b1930d17f4d
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: hdmi: Correct checksum value

This change writes the checksum value to registers after
doing all the calculations so that the correct checksum
value is transmitted.

CRs-fixed: 388272
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
(cherry picked from commit e5612f210482d39d41966ebe003bc924f079db2f)

Change-Id: I7ccabc07cc1066049d2b02038a9f400eb77e0d44
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: vidc: suppress non-fatal error messages.

These messages are non-fatal and appear frequently
during video session. Hence suppressing them.

CRs-fixed: 389408
Signed-off-by: Arun Menon <menon@codeaurora.org>
(cherry picked from commit 24631e349a3f306cc3b06fb411d5fb1f7ac8f0ae)

Conflicts:

	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_utils.c

Change-Id: Ifb874912ac79c863ed8fc531272d3822d8aebebe
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: display: Add pre-multiplied alpha support for MDP4.

MDP4 blend logic differs from GPU blend implementation as MDP4
does not differentiate between pre-multiplied alpha layers and
non pre-multiplied alpha layers. Check layers for pre-multiplied
alpha and change blend logic accordingly.

CRs-Fixed: 355755
CRs-Fixed: 361729
Change-Id: Id8253d3888f1ebbadba1b6bbd87e7d98bac22da7
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
(cherry picked from commit 3d36e64838fbd064ad4868e1a3770e27c183f83e)
(cherry picked from commit 5eff5c41312dc0ccda3c56865d4654546d7e37c5)
msm_fb: display: free iommu buffers for WFD

Iommu buffers from overlay destinated for WFD (mixer2) are
not freed after kickoff. This patch will free those iommu
buffers.

CRs-fixed: 394270
Change-Id: I6b58b5d1831e7c59c5107641b786730511803557
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit cbd2a940d95056c51f6cef0a1641a716c8ed292e)
(cherry picked from commit 5aff850872964d7bfbb7d31e10de4ee7a58b8d14)
msm_fb : Add option to enable/disable  mixer commit

Adds support to enable or disable mixer commit during pipe
staging operations. Depending on the current activity, this
selection can be made.

Change-Id: Ia2f5dbab58f73ef4de90abf7f278332d8d73df46
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
(cherry picked from commit f9bc16bf6dcb8beb7d5d6405ee5dc767e6decdff)
(cherry picked from commit dfca66d79de4a32af3ece205f97b9ba86d14eb28)

Conflicts:

	drivers/video/msm/mdp4_overlay_atv.c
	drivers/video/msm/mdp4_overlay_dtv.c
msm_fb: display: Fix blend configuration for MDP4.1

MDP4.1 blend operation registers are not double buffered and
take effect as soon as they are configured. Configuring these
registers at any place other than between dma and vsync produce
flickers as new blend values would get applied to previous
mixer configurations. Configure blend operation registers just
after dma is over, before vsync.

Change-Id: I377c11222f7a0cd77e98e90edec6e2e1dc0c17ca
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
(cherry picked from commit e79dde6faab507c51994a8588bebd03dfc5fb57a)
(cherry picked from commit 9bbc4ed761133435dd6897e099100517c6af773e)
msm_fb: display: add blt condition check at video/lcdc off

Blt mode may be enabled during system suspend. Need to make
sure blt overlay done  before turn off video/lcdc timig generator.

Change-Id: Iad54ee544499213bb7c9cfe60d00919f819aacb1
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 4b251d6f0067af78a0a424af5054747cc38a0904)
(cherry picked from commit 922724ddd13d286ceccc074fe1010c81924ccbe8)
(cherry picked from commit ef69dc4211eea1d26901d560f0cbed1128bd8ac9)
msm: kgsl: Do bounds checking on user supplied GPU addresses

Add bounds checking to kgsl_sharedmem_find_region to ensure that GPU
addresses supplied by the user via KGSL_IOCTL_SHAREMEM_FREE and
KGSL_IOCTL_CFF_SYNCMEM are within a valid range for the MMU scheme of
choice.

CRs-fixed: 380296
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit e22e21d93260cee3aff0dff7247635d9624c8aa5)

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit 64faf92b2159ae2505ba35f88df15d9c287d2fe6)

Conflicts:

	drivers/gpu/msm/kgsl_mmu.h

Change-Id: I043038d96a4f6f48e4f3391a9ebbccff1afce334
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm:vidc: add support for pause in eos state

This commit will add support for pause command in
eos state along with run state of the video driver.

(cherry picked from commit da817ebe8a4dea682b2cc9beaa582e0f0f0f0112)

Change-Id: Ia75c7ee43fb13cab5898ded69459469ddec4be54
CRs-fixed: 387562
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>