msm: kgsl: Properly record the size of the sglist in the memdesc

It was possible to fail out of kgsl_sharedmem_alloc after a sglist was
allocated but before we saved the size of the allocation which caused
problems when the sglist was freed during cleanup.

CRs-fixed: 464289
Change-Id: Ic0dedbadd57ec4d9422b5e3a873243d0ffed51f7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm_fb: display: wait4vsync before set suspend flag

Since wait4vsync checks suspend flag, wait4vsync needs to
be executed before suspend flag set to enforce wait happen.
Also, when timing generator is turned off, wait4vsync can
not be used anymore since the last vsync may have passed
before wait4vsync called. This patch fixed commit_comp
timeout cause fence timeout happen on hdmi plug and unplug
cases.

CRs-fixed: 449027
Change-Id: I0f5520538bb290643a648c937296b6bc097fe051
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_dtv.c

Signed-off-by: Vivek Panwar <vpanwa@codeaurora.org>
Merge "msm_fb: display: wait4vsync before set suspend flag"
Merge "msm: kgsl: Properly record the size of the sglist in the memdesc"
mmc: msm_sdcc: fix the sdcc version check

MCI_VERSION register has the couple of fields like "major"
and "step". Driver should be checking these fields individually
but at one place we are checking the complete value of MCI_VERSION
register where we should have just checked the "step" field of it.
This change fix it by checking just "step" field instead of entire
MCI_VERSION register value.

(cherry picked from commit 034a94a2fc227e88fd00a43ed910a9a7d24b3037)

CRs-Fixed: 406684
Change-Id: Ida992cce7aba72cba083bdd2a53db57431ee2ad6
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm: avs: Restore core voltage when disabling AVS

AVS changes the core voltage to match the current operating conditions
on the part. Not all frequencies supported by the target have characterized
AVS delay synthesizer (AVSDSCR) values. For frequencies that do not have
AVSDSCR set, AVS is not enabled and so need to operate at the
characterized voltage for that frequency. Disabling AVS does not
however, restore the operating voltage to the value the rail was
configured to. This may cause frequencies that do not have AVSDSCR to
run at lower voltage than prescibed.
Set up the core voltage back to the last known good value when disabling
AVS.

Change-Id: I5389996288fa49e45c469d2a8917e00900261de7
CRs-fixed: 457772
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: camera: Add NULL check for stats_buf

Return error in case stat_buf is NULL in the list

CRs-Fixed: 436229
Change-Id: I42b2f61dc8e6c9e9883d0bd5d7531d62b5f0fb99
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
Merge "msm: avs: Restore core voltage when disabling AVS"
Merge "mmc: msm_sdcc: fix the sdcc version check"
Merge "msm: camera: Add NULL check for stats_buf"