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>

Conflicts:

	drivers/video/msm/external_common.c
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_fb: HDMI: Fix for HW reset issue on HDCP Reauth

On HDCP reauthentication, the HDCP link status register does not
get cleared unless the HDMI app clock is deasserted and asserted.
Stale values in the link status registers can potentially lead to
the HDCP HW block getting locked up resulting in a device reset.

Change-Id: I4952c64d4087e4303cbc75dbb61f66510b0a0798
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>

Conflicts:

	drivers/video/msm/hdmi_msm.c
msm_fb: hdmi: Give proper buffer size

Need to give proper buffer size for snprintf function calls.

CRs-Fixed: 378343
Change-Id: Ia4df74c9871b26255572bb3ba226317c3076b5b6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm_fb: hdmi: Fix parsing of audio capabilities

Fix bugs in the parsing of the Audio Data Blocks and the
Speaker Allocation Data Blocks in the EDID data.

Change-Id: I666cf82d149c8ebb02d3bca3a053e494890870c0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: hdmi: Add support for HDMI Audio caps

Add sysfs nodes to export the data contained in the
audio data block and the speaker allocation data block
from the EDID of a connected HDMI sink.

Change-Id: Ie558e930cc5790965d46eb2c30156a23643fa1f7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: HDMI: Add module parameter to disable HDCP

This change adds a module parameter that can be used
to disable HDCP at runtime by specifying hdmi_msm.hdcp=0
on the fastboot command line.

Change-Id: Ifad5da9fcb86fb4ed663a5ef2bb14fe4dafd241e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>