Commit graph

3798 commits

Author SHA1 Message Date
Rashi Bindra
9e8ba0aa51 msm: mdss: Call regulator enable/disable for both DSI controllers
There is ref count mismatch in number of enable/disable calls for
regulators with low power mode allowed flag which is resulting in
random system crashes. This change makes sure number of enable/disable
calls are same.

Change-Id: I0c1906df8c3a83e8740412c272179d3d9c514c0e
Signed-off-by: Rashi Bindra <rbindra@codeaurora.org>
2017-05-23 18:03:23 +05:30
Xu Yang
cf1e29d56a msm: mdss: remove wait for vsync in display commit
Remove wait for vsync in display commit if both PCC and DDIC
need to update for external backlight feature.

Change-Id: I57aeb48acba24e0ca3fff21b1117e48fe452028b
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
2017-05-22 06:04:34 -07:00
Sandeep Panda
c9a6f09f10 msm: mdss: remove client from device list if failed to register
If there is any failure while registering a DBA client with MDSS
driver, then remove the client from device client list first and
then free the client. Otherwise driver might crash when
traversing the device client list in later stage, because of an
uninitialized entry in the list.

Change-Id: I60666f4c3dea5c7ea7b7c77bcb14b080ee25b54d
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-05-22 12:08:31 +05:30
Sandeep Panda
d70fb72fed msm: mdss: do not print error in case sync_trigger is enabled
In case sync trigger is enabled, then DCS commands are only
sent for both the DSI controller when transfer call for the
second DSI controller happens. So in that case do not print
error log for the first controller if DCS command is not sent.

Change-Id: I5c302f55f15735970cd5f6c8d0b31c55b447433f
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-05-19 15:58:14 +05:30
Yunyun Cao
bbc34fd84c fb: msm_dba: add post-on-sleep support for adv7533 vreg
For some platforms, after turning on the VREG for ADV7533 bridge
chip, need to sleep some period of time before doing any
I2C transactions with the bridge chip.

Change-Id: I6f7c45f3561f996507613a7a6eb0bcd8922caed5
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
2017-05-19 16:13:05 +08:00
Ashish Garg
44aa99c220 msm: mdss: add recovery if TE is not coming from the panel
Enable TE irq for the panel when there is a pingpong timeout.
Wait for TE to come for five vsync cycles before starting the
recovery for panel dead. If the TE comes from the panel during
the wait, call panic for pingpong timeout.

Change-Id: I88d06562e3e19880bb327b5f347ed79057f0e8c3
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2017-05-18 23:46:32 -07:00
Benjamin Chan
a2931ccf96 msm: mdss: Correct MDSS display wakeup time calculation
With DSC enabled in the panel interface, the horizontal pixel count is
smaller than the panel width due to the compression. Correcting the
time_of_line and total_line calculation by calling the proper macro.

CRs-Fixed: 2048339
Change-Id: I36c1b9d30d5a440dfef4b4638f4f3ebf807782c8
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-05-17 13:42:04 -04:00
Sachin Bhayare
10fe78d772 msm: mdss: disable AVR for msm8998
Disable AVR as dynamic fps is enabled for msm8998.

Change-Id: I4d96984c45de83868f2ea4d324a598edf6d30e94
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2017-05-16 22:34:33 -07:00
Linux Build Service Account
ec43abcb48 Merge "msm: mdss: fix display port crash caused by hpd_irq attention event" 2017-05-16 06:49:35 -07:00
Rajkumar Subbiah
ef8e3cd458 msm: mdss: Fix potential dereferencing of null pointer
During atomic commit on a writeback panel, there is a possibility
of deferencing a NULL pointer if the configuration changes before
the commit. This change adds a NULL pointer check to avoid it.

Change-Id: I56d0efad40992b6f87c81e5eab93cf0f24f6f524
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2017-05-16 03:11:13 -07:00
Benjamin Chan
76abd2b2fb msm: mdss: Use 64-bit math for bandwidth calculation
For larger panel with longer vertical pixel count, it is possible that
bandwidth requirement is much higher during downscaling usecase. Current
bandwidth calculation for compression ratio adjustment only use 32-bit
and it is shown that overflow can happen, and is required to change to
use 64-bit variable as input and output.

CRs-Fixed: 2045602
Change-Id: I817e9d55fb6e24e686513327d00f7efd08ac717f
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-05-11 10:31:14 -04:00
Linux Build Service Account
00ddc986bb Merge "msm: mdss: fix null pointer dereferencing" 2017-05-10 23:03:53 -07:00
Linux Build Service Account
69f3e161f1 Merge "msm: mdss: set HDMI max TMDS clock rate" 2017-05-10 23:03:52 -07:00
Jayant Shekhar
826fab1e02 msm: mdss: Avoid dfps update till unblank is complete
There can be cases where MDP is resuming at default fps
and in between dfps update comes before unblank is completed.
This might result in mismatch in fps and blanking
settings in MDP and DSI. Hence avoid any fps update until
unblank is finished.

Change-Id: If4fed28b1d706f38c39fba06fa786eac6d9ed8c8
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2017-05-10 15:24:47 +05:30
Ping Li
98d457b3d7 msm: mdss: Update AD last strength during AD mode switch
Currently AD last_str is updated only inside pp_ad_calc_worker
thread which is trigged by backlight or ambient light changes.

If the number of screen refreshes is too small or user suspends the
device before it finishes the scheduled screen refreshes, last_str
will be different from the target strength for the current inputs.

And when device goes into idle power collapse mode and exits, AD
will switch to manual strength mode with last_str for two frames.
After that, AD will go back to auto strength mode with the target
strength. Since last_str and target strength may be different,
flickers will be seen every time AD mode switch happens.

This change fixes this above issue by reading the AD strength register
and updating the value to last_str when AD mode switches from manual
mode to auto strength mode.

Change-Id: If68f84a4781230afe21b58c73ff88e59e7e9d416
Signed-off-by: Ping Li <pingli@codeaurora.org>
2017-05-09 11:16:37 -07:00
Jayant Shekhar
e39f42cc76 msm: mdss: Correct source and destination buffer rectangles
In case of 180 degree panel flip using pan display for commit,
correct source and destination buffer rectangles as mixer swap
is no longer supported.

Change-Id: Ifd31732ace6ebefd865933b6be359374e4a9fa63
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2017-05-09 11:44:11 +05:30
Animesh Kishore
3a69977d0e msm: mdss: Disable traffic shaper in command mode
Disabling for msm8998 and derivatives.

Change-Id: I944b7f31533c0c697c7c53684e6ad28eb1e36622
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2017-05-08 11:23:34 +05:30
Linux Build Service Account
3d82d66409 Merge "msm: mdss: Retrict use of DMA Multi-Rect for FB pan_display" 2017-05-06 14:24:21 -07:00
Linux Build Service Account
0cd28ee7d9 Merge "msm: mdss: add additional debug code for timeout issues" 2017-05-06 14:24:20 -07:00
Linux Build Service Account
1bf879ca47 Merge "msm: mdss: Relocate timing flush for avr vtotal setup" 2017-05-06 14:24:19 -07:00
Linux Build Service Account
a2f35f2de9 Merge "msm: mdss: Initialize buf array elements" 2017-05-06 14:24:18 -07:00
Linux Build Service Account
76e08ee8fb Merge "msm: mdss: add support for mdss throttle clock handling" 2017-05-06 14:24:17 -07:00
Linux Build Service Account
01ecd15b9d Merge "msm: mdss: fix memcpy source and dest memory buffer size mismatch" 2017-05-06 14:24:15 -07:00
Linux Build Service Account
b74085afd8 Merge "msm: mdss: Add multi-rectangle validation support" 2017-05-05 18:10:27 -07:00
Linux Build Service Account
cd42f16f98 Merge "msm: mdss: Set LM flush bit for DE/Scalar reg update" 2017-05-05 09:10:05 -07:00
zhaoyuan
1db7368215 msm: mdss: set HDMI max TMDS clock rate
Need consider both SINK and SOURCE max supported TMDS
clock. For the devices, if we set TMDS clock larger than
device caps, it could not display well. SINK max TMDS
clock could read from HDMI VSDB and HF-VSDB in EDID.

CRs-Fixed: 2035529
Change-Id: I1f31f2a05d0502367b877c4d324cbc131b2366d5
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
2017-05-05 15:29:53 +08:00
zhaoyuan
0b85a93fae msm: mdss: do not apply AVMUTE for non-CTA format
AVMUTE is applied when HDMI power off. However, when HDMI power
on, we just make AVMUTE false for CTA format. For non-CTA format,
AVMUTE is still applied, if we want to show premium data(highger
quality, such as enable deep color), HDMI could not display, just
black screen.

CRs-Fixed: 2033800
Change-Id: If0de6052e98cb9cfcf88ae21d8c19d39ae8abd14
Signed-off-by: zhaoyuan <yzhao@codeaurora.org>
2017-05-05 14:40:20 +08:00
Harsh Sahu
663e995012 msm: mdss: fix null pointer dereferencing
Current driver checks if the address of start pointer is zero. But
in cases when start pointer is NULL this check will result in null
pointer dereferencing. This change adds an additioanl check on the
start pointer to avoid null pointer dereferencing.

CRs-fixed: 2035100
Change-Id: Ic86c9e73cd676cbf8680f5b7266ee3829f4ccbd2
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
2017-05-04 11:21:11 -07:00
Rajkumar Subbiah
9cf8bad48b msm: mdss: Relocate timing flush for avr vtotal setup
The AVR vtotal setup is done during ctl start. Since the slave
ctl is not yet setup, currently the master and slave controls
get flushed independently even though it is a split display
setup. Instead, just set a flag and then do the actual flush
as part of commit when the controls are properly setup.

Change-Id: I8eb1693c9a3a6404d28a82cab9a9f0ce58d1bb03
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2017-05-04 10:32:25 -07:00
Linux Build Service Account
8a82f9c18a Merge "msm: mdss: Add plane_count range check in mdss WFD" 2017-05-04 08:45:11 -07:00
Linux Build Service Account
af19d5218d Merge "msm: mdss: Add plane_count limit check for mdss_rotator buffer" 2017-05-04 08:45:10 -07:00
Sachin Bhayare
c25dba2a0b msm: mdss: add support for mdss throttle clock handling
Update mdss throttle clock status based on status of display.

Change-Id: Ife21df0c570240c075f039b8d49514bb323021da
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2017-05-04 02:07:22 -07:00
Harsh Sahu
ad8e758d30 msm: mdss: fix memcpy source and dest memory buffer size mismatch
Currently memcpy is copying from a bigger memory size to a smaller
memory size. This change corrects this issue by performing the
memcopy restricted to the smaller of the src or dest memory buffer.

CRs-fixed: 2028228
Change-Id: Ibbe5665083799a4262d3cfbb06f94f3e35e03748
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
2017-05-03 13:58:09 -07:00
Raviteja Tamatam
dc897f9c11 msm: mdss: add additional debug code for timeout issues
Added debug code to analyze vbif and display data path
for debugging pingpong timeout issues.

Change-Id: Ice4b9dbeab96edeb90f665747479243dad55351a
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2017-05-03 14:26:59 +05:30
Jayant Shekhar
8a8d068044 msm: mdss: Initialize buf array elements
In bandwidth limit read function, 'buf' array
elements might be used uninitialized. Ensure
the array elements are initialized.

Change-Id: I210c73b14327436296a844fc5ebd47ccc02bf5fb
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2017-05-03 12:39:26 +05:30
Linux Build Service Account
3939f41b22 Merge "Merge remote-tracking branch 'remotes/quic/dev/msm-4.4-8996au' into msm-4.4" 2017-05-02 09:07:39 -07:00
Zhiqiang Tu
b15484bc06 Merge remote-tracking branch 'remotes/quic/dev/msm-4.4-8996au' into msm-4.4
Conflicts:
	arch/arm/boot/dts/qcom/msm8996-auto-cdp.dtsi
	drivers/gpu/drm/msm/Makefile

Change-Id: Ief80c28ff1422fd71a0c3d2041531e2ab078ee7a
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-05-02 08:59:16 +08:00
Benjamin Chan
fd91b55b8f msm: mdss: Add plane_count limit check for mdss_rotator buffer
For each input and output buffer given to mdss rotator, it is necessary
to check the range of the plane_count value against the MAX_PLANES
definition, in order to avoid any plane array out of bound access.

CRs-Fixed: 2028681
Change-Id: I117bf5daead17e5e97c62c6dc8e21d1fcc9d8e74
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-04-28 13:55:26 -07:00
Benjamin Chan
c649c9c11e msm: mdss: Add plane_count range check in mdss WFD
For any given output buffer to the MDSS WFD, it is necessary to check
the range of the plane_count against the MAX_PLANES definition, in order
to avoid any out of bound access.

CRs-Fixed: 2028702
Change-Id: I4f1497a3a2e4ca2d30fc268e68cfdacc0d8539ea
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-04-28 13:48:19 -07:00
Benjamin Chan
2813eebc36 msm: mdss: Retrict use of DMA Multi-Rect for FB pan_display
For non-atomic display commit that use pan_display, it is not possible
to use multi-rect feature from the DMA pipe. This fix is to reject any
multi-rect DMA pipe being used in the commit when all the non
multi-rect DMA pipes are not available.

CRs-Fixed: 2036486
Change-Id: I16722d62650807b5f46ca2bb544653f43a01edf1
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-04-28 14:36:49 -04:00
Linux Build Service Account
8ef51a8fee Merge "msm: mdss: dsi: reset phy during idle screen" 2017-04-28 01:45:00 -07:00
Linux Build Service Account
b22e2a0488 Merge "msm: mdss: enable backlight gpio after commit is done" 2017-04-27 07:06:59 -07:00
Linux Build Service Account
d8a07d98dc Merge "msm: mdss: align the size of smmu domain mapping to 128 MB" 2017-04-27 07:06:56 -07:00
Linux Build Service Account
f19ae4651f Merge "msm: dsi: Turn off supplies in low power state" 2017-04-27 07:06:54 -07:00
Linux Build Service Account
42306cb9b7 Merge "msm: mdss: Add check to avoid NULL pointer dereference" 2017-04-27 07:06:21 -07:00
Narender Ankam
accf510c82 msm: mdss: dp: fix display port crash caused by unclocked register access
Display port main link control clock is enabled during UNBLANK ioctl call.
Due to some error reasons, UNBLANK ioctl call may early return without
enabling DP control clock. Later if any ioctl is called and tries
to access unclocked DP link registers, it will cause noc error.
Add a check to handle these ioctls only if DP is fully powered on.

Change-Id: Ie5a5707f708a0e39d21bf06b8e479b7b95249566
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2017-04-27 17:39:18 +05:30
Linux Build Service Account
d8af252b93 Merge "msm: mdss: wait for pp done when switching from ON to LP1" 2017-04-25 21:48:58 -07:00
Sravan Kumar D.V.N
7d5ebd0ac1 msm: mdss: Set LM flush bit for DE/Scalar reg update
LM flush is required in order to take DE/Scalar register changes
to take effect. Hence set the LM flush bit on the update.

Change-Id: I9b497b8109133d221d7009e9709149146f213c5e
Signed-off-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
2017-04-25 12:09:28 -07:00
Linux Build Service Account
8495c8f056 Merge "msm: mdss: fix a warning for unused value" 2017-04-24 06:47:47 -07:00
Linux Build Service Account
c0eb692e36 Merge "msm: mdss: Populate alpha for compat" 2017-04-24 06:47:46 -07:00