Commit graph

3798 commits

Author SHA1 Message Date
Linux Build Service Account
2a5717e16e Merge "msm: mdss: Clear pp dirty flags based on program stage" 2018-03-15 05:43:03 -07:00
Linux Build Service Account
2d31100a1f Merge "msm: mdss: hdmi: modify audio event notification sequence." 2018-03-15 05:43:01 -07:00
Linux Build Service Account
e0cfc87421 Merge "msm: mdss: hdmi: reset basic_audio_support parameter" 2018-03-15 05:43:00 -07:00
Linux Build Service Account
fdbb476754 Merge "fb: msm_dba: fix local variable not initialized issue" 2018-03-15 05:42:41 -07:00
Krishna Chaitanya Devarakonda
18dd0531c7 msm: mdss: Signal outstanding fences when panel is dead
When the panel is in dead state, we early return from
the commit. So, the fences wouldn't be signalled till
the next Blank call. Handling this case by signalling
the outstanding fences when panel is in dead state.

Change-Id: I48a5e04707e32de0d1cdccf0592c981e30b618fc
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2018-03-15 14:32:11 +05:30
Sachin Bhayare
b725d52ad5 msm: mdss: release retire fence during commit failure
In existing implementation on commit failure release fence are signaled.
But retire fence is not signaled. Which block the framework from
submitting next commit. And result in UI freez.

Add logic to signal retire fence along with release fence commit fails.

Change-Id: I84774280a110339450a1c5ef50eab68168e9bd20
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2018-03-15 14:27:54 +05:30
Sandeep Panda
83b4c67e68 msm: mdss: serialize wait for pingpong with kickoff
Serialize wait for pingpong with kickoff when autorefresh
feature is enabled.

Change-Id: Ia51889dd86561e7513b4e7123a9fefb77a26d1ea
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2018-03-15 11:22:23 +05:30
Narender Ankam
8eba91adf8 msm: mdss: hdmi: fix HDCP1.4 authentication issues
After part I authentication, SW DDC is not disabled and because of
this, we observe arbitration issues during part III authentication.
Disable SW DDC before starting part III of HDCP authentication.

Fail part II of authentication with repeater if its device count is zero.

Change-Id: I72f5b1115c094d4a72ae2b324f3903cdb195e5fe
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 21:12:50 -07:00
Narender Ankam
2cc1946a7a msm: mdss: hdmi: add SRM support for HDCP1.4
Extend HDCP1.4 SRM support for fb based hdmi driver as well.

Change-Id: I3d6597503d95b066d1fcfa71218cdda70965fbd0
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 21:11:05 -07:00
Narender Ankam
1a51baa68a msm: mdss: hdmi: add SRM support for HDCP2.2
Extend HDCP2.2 SRM support for fb based hdmi driver as well.

Change-Id: I39bef2a814c2a2404a0a03584f23c58c69c10909
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 21:09:40 -07:00
Narender Ankam
a62924520b msm: mdss: dp: do not include VICs from YC420 VDB
Display Port driver never supported YC420 formats.
Also w.r.t to display quality, 4K30 RGB 8bit is
better than 4K60 YC420 8bit.
So, do not include edid modes(VICs) from YC420 Video
Data Block while parsing EDID.

Change-Id: I77f2c45c22beceb7f554a4c063f6e6947dc4ba8a
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 21:07:50 -07:00
Ch Ganesh Kumar
72f550f73d msm: mdss: Clear pp dirty flags based on program stage
Clear PP features dirty flags only when they are programmed, based on
programming stage, i.e. clear dirty flags of features programmed in
early stage after early stage programming and clear dirty flags of
features programmed in deferred stage after their actual programming
is complete.

Clearing the flags in one go is resulting in missing programming of
features designated to be programmed in early stage, if the dirty flags
are updated in between the stages.

Change-Id: If65a5982254a7421c6f0ec32018361c651964e4e
Signed-off-by: Ch Ganesh Kumar <chganesh@codeaurora.org>
2018-03-13 21:05:53 -07:00
Narender Ankam
a5e82de8cd msm: mdss: hdmi: modify audio event notification sequence.
Audio event is wrongly notified during pre_panel_off event.
Modify HDMI Audio event notification sequence so that audio
events are notified as expected.

CRs-Fixed: 2131442
Change-Id: I5fb5d28cb0162f0c4bf97e29556b15d12e1ea8f1
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 21:04:01 -07:00
Narender Ankam
b5f217c787 msm: mdss: hdmi: reset basic_audio_support parameter
Add changes to reset basic_audio_support parameter
before parsing EDID on every new cable connection.

Change-Id: I52fef059830d950d4858d5bee3f76774426e6863
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 21:02:04 -07:00
Narender Ankam
e050b3a0e3 msm: mdss: dp: fix wrong parsing of sink count
Current Display Port driver is incorrectly parsing sink count
register (0x200) of DPCD. Made changes to parse it correctly
as per DP specification.

Change-Id: Ic858485f19f226f7b2d84f74c97170db8bebf822
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-03-13 20:59:54 -07:00
Guchun Chen
e053381117 fb: msm_dba: fix local variable not initialized issue
Local variable in function should be initialized before using it.

Change-Id: I132033fa650cdacae3c8b2a98b8a593d159fe967
CRs-Fixed: 2202957
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
2018-03-13 11:30:26 +08:00
Linux Build Service Account
6086791d00 Merge "fbdev: msm: Set the commit_in_progress flag after sync_fence_wait" 2018-03-12 02:47:12 -07:00
Linux Build Service Account
307aaed1e4 Merge "msm: mdss: Fix scalar LUT handling" 2018-03-05 14:12:21 -08:00
Animesh Kishore
4c2dad03b7 msm: mdss: Fix scalar LUT handling
Add lock to serialize access between userspace
and kernel. Fix error handling for LUT allocation.

Change-Id: Ie86a8eb3e2a11852ae16d87ebc851afb6566732f
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2018-02-28 12:12:16 +05:30
Camus Wong
d61aa3623d DBA: add VREG sequence in power on / off sequence
VREG was enabled during init and never turn off until the bridge chip
unregister.  We need to add VREG on/off sequence into bridge chip
power on/off in order to reduce platform current draw.

Change-Id: Ib8d59665c55035c36d10d868fb256fcfaa243f84
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2018-02-25 16:54:44 -08:00
Camus Wong
def1bee62a DRM: DBA: Adding hardware power sequence to DBA power off code
Adding power off register sequence to reduce power in power off.
Adding switch GPIO sequence in power on/off call.

Change-Id: Ifbe57852a43e1b1d0f05594a84a10540cfeb6be7
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2018-02-12 19:36:58 -05:00
Krishna Manikandan
2f6b566fe6 fbdev: msm: Set the commit_in_progress flag after sync_fence_wait
The commit_in_progress flag is set only after waiting for the fences
in the current composition cycle. This will ensure that the
release fence of the previous composition is signalled, even though
there is a fence timeout in the current composition cycle.

Change-Id: I06653c922f195bb5936530ddeaa5a9fcb291fb3f
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2018-01-08 16:17:41 +05:30
Krishna Manikandan
4dab8ddb3c msm: mdss: Trigger idle fallback when no update due to touch
Trigger an idle fallback with a reasonable timeout value when
there is no update despite of a touch event and idle_time is 0.
This will reset the refresh rate to minimum fps.

CRs-Fixed: 2003247
Change-Id: I4a2964038f23984bf1ea39c63bf679d80ad12cba
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2017-12-15 14:49:50 +05:30
Narender Ankam
ae5cb0939c msm: mdss: hdmi: reset hdmi max supported TMDS clock
In current HDMI driver, SVDs and DTDs derived from EDID
of a DS HDMI sink are checked for supportness based
on previous connection's max TMDS clock.
Always reset the max TMDS clock supported by source
before reading EDID from DS HDMI device.

Change-Id: If5f58562f186634b1ed066fdebfc9fa6b55c6e8a
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2017-11-26 23:21:02 -08:00
Yuan Zhao
20a606c128 msm: mdss: hdmi: clear deep color bits in the HDMI controller
Clear the deep color bits in the HDMI controller in case
the mode does not need OR support deep color.

Change-Id: I77a5cd74bc90c249d8902437a7b87a07259a2c35
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2017-11-19 18:44:19 -08:00
Linux Build Service Account
ac25624726 Merge "msm: mdss: dp: fix programming of DisplayPort SDP registers" 2017-11-19 07:45:14 -08:00
Benjamin Chan
9b0c877cd1 msm: mdss: adjust mdss_mdp_get_plane_sizes parameters init order
Parameter mdss_mdp_plane_sizes must be cleared to 0 before returning
under an error condition, otherwise caller function will use the
uninitialized mdss_mdp_plane_sizes values and caused incorrect
operation.

Change-Id: I856b17ce9e917cc450040463ec34b7309d34b9b5
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2017-11-15 08:28:05 -08:00
Padmanabhan Komanduru
6254597c2b msm: mdss: dp: fix programming of DisplayPort SDP registers
Fix the programming of DisplayPort SDP registers primarily related
to Audio enable sequence. This would fix potential issues caused by
read/append/write operations on SDP registers which might corrupt
the parity/data bytes. This would lead to audio issues since the DP
controller would treat the corrupt SDP information as invalid data.

Change-Id: I55db6a70be0fdf94a60fd7cc8bf0d30702febef8
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-11-13 19:18:40 +05:30
Yuan Zhao
a634cb0591 msm: mdss: do not do phy reset when HDMI power off
Do not need to do HDMI PHY reset here, because will do
that when HDMI cable connected again in HDMI mode setting
function.

Change-Id: Ifae7c35f72a9008980c207e0806ab7aaa57dfe07
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2017-11-08 15:51:18 +08:00
Ashish Garg
0d030ecce2 msm: mdss: add support for dma scheduling for dsi v2.1
Dsi controller v2.1 and above supports scheduling of dma
commands. Schedule dsi cmds at the starting of blanking
region to avoid sending of commands in active region
resulting in dsi overflow errors.

Change-Id: I658b7d7008eb9071148820c0ea949ae9ba593ed9
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-10-31 10:32:59 -07:00
Linux Build Service Account
6d08baec31 Merge "msm: mdss: dp: fix no display issues during cable plugin/plugouts" 2017-10-16 13:07:08 -07:00
Linux Build Service Account
f70b7ebdec Merge "mdss: dp: fix the NVID parameter calculation for Display Port" 2017-10-12 05:07:48 -07:00
Linux Build Service Account
ec03d77318 Merge "ARM: dts: msm: add the dtsi entries for DP PLL clocks for msm8998" 2017-10-12 05:07:46 -07:00
Padmanabhan Komanduru
72cdcba926 mdss: dp: fix the NVID parameter calculation for Display Port
The NVID programming for Display Port needs to be set to twice
the 'n' divider of the pixel clock RCG for 5.4 GHz link rate.
Add change to take care of this in Display Port driver.

Change-Id: Ied31f67372d9738e96d1d908acd96a02b82d4630
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-10-10 19:01:20 +05:30
Padmanabhan Komanduru
54d865e483 mdss: dp: set the proper parent for dp_vco_divided_clk_mux
The DP VCO divided mux clock has two parent dividers div_two
and div_four. The parent for this needs to be set based on the
link rate frequency as per the hardware programming guide and
not based on the auto PLL calculation logic. Add support to set
the correct parent for this.

Change-Id: Ia2d340a4e8790d90161c1f4a7c8273449fa3f53c
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-10-10 18:20:13 +05:30
Ashish Garg
5cf73b4ac4 msm: mdss: read active line count before triggering ESD read
In the current implementation before triggering ESD read,
DSI SW waits for extra time to skip display blanking period.
Add an additional check for active line count to ensure that
ESD read is always triggered during display active region only.

Change-Id: I5893daf7cdfb8c1d0a0e962eb2e37d7cd053a6a5
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-10-09 16:51:17 +05:30
Vishnuvardhan Prodduturi
6995e0f6d7 msm: mdss: hdcp_1x: call HDCP 1x APIs only if HDCP 2.2 is not present
HDCP1x module is initialized only if HDCP 2.2 is not present either from
the source OR sink side. Make sure to call the HDCP 1x APIs only if
HDCP 2.2 is not present. Otherwise this leads to a crash.

Change-Id: Id66dec10ffd585630a2e4c1e5c75bee99ce515de
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2017-10-08 23:09:11 -07:00
Vishnuvardhan Prodduturi
251d5d7b3e msm: mdss: hdcp_1x: enable HDP irq only for DP client
HDCP driver provides a common interface for both Display port
 and HDMI clients. As HPD IRQ enable  API is valid only display
 Port, make sure it is handled gracefully when called
 from HDMI client so that invalid resource access can be avoided.

Change-Id: I42e07c6019300b37ea3426347fef571bbb6e278c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2017-10-08 09:07:51 -07:00
Linux Build Service Account
52b59ba4bd Merge "msm: mdss: dp: fix handling of device shutdown with cable connected" 2017-10-05 16:09:59 -07:00
Linux Build Service Account
6963c78e4d Merge "fb/msm: add support for HDR playback control sequence" 2017-10-05 16:09:45 -07:00
Linux Build Service Account
56fee295de Merge "msm: mdss: check the length of the external input buffer properly" 2017-10-05 03:06:35 -07:00
Narender Ankam
37b71d4aac msm: mdss: dp: fix no display issues during cable plugin/plugouts
If DP cable is disconnected while processing HPD or IRQ_HPD,
DP driver may continue with failsafe parameters and notify
connection event and immediately notify disconnection event
which may result in state machine corruption in userspace.
Add changes to avoid reading dpcd caps, edid, link training
or connection events if DP cable is disconnected in between.

Change-Id: I0b59ebdb636c9dc1086673253399b849734d51ee
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2017-10-04 00:02:40 -07:00
Aravind Venkateswaran
04e88e68ee msm: mdss: dp: fix handling of device shutdown with cable connected
When the source is powered off with an external sink connected, it
will result in a call to blank and power off the source. In the
current implementation, sink is not transitioned to D3 power mode
prior to turning off the source. This can result in the sink
reporting signal lock failures as the source if powered off,
resulting in an HPD IRQ interrupt. If this interrupt is handled
after the DP controller is powered off, it can lead to unclocked
register accesses. Fix this by ensuring that sink is powered off
prior to powering off the source. In addition, ensure that no more
attention events are handled once the DP controller is powered off.

Change-Id: I08558229f7c3e603904527de58a39039b3d7615e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2017-09-28 14:17:06 +05:30
Linux Build Service Account
ac9cb81445 Merge "mdss: mdp: Validate null commit for secure display" 2017-09-26 21:49:58 -07:00
Narender Ankam
c93c1652fc msm: mdss: hdmi: add pll_enable property to support clock recovery
PLL_ENABLE property is used to enable or disable the PLL
update function. With this property PLL update function
only works when PLL_ENABLE is set, and all changes done
to hardware will be discarded once PLL_ENABLE is cleared.

Change-Id: I4a6173de22285b37df1b9371ad29e634ef076edc
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2017-09-25 14:26:15 +05:30
Animesh Kishore
315de9a16b mdss: mdp: Validate null commit for secure display
Secure display entry/exit should be accompanied
by null commit in video mode to make sure there is
no non secure access.

Change-Id: I7928a2465de9c46f69e963977931f7a6618f01fb
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2017-09-24 11:53:33 +05:30
Linux Build Service Account
b92301abd0 Merge "msm: mdss: Fix potential race condition in rotator" 2017-09-22 09:13:41 -07:00
Ch Ganesh Kumar
05f00d16b6 fb/msm: add support for HDR playback control sequence
HDR playback needs metadata to be sent to the sink
while the playback is ongoing and needs a proper
teardown sequence when the playback has ended with respect
to the infoframe being sent to the sink.

This needs a state machine to synchronize start/stop of
the playback with sending the right metadata along with
resetting the infoframe HDMI registers.

Add support for this HDR playback control state machine.

Change-Id: I58ff03bc8db99febd17e0a0853acc74668892ea8
Signed-off-by: Ch Ganesh Kumar <chganesh@codeaurora.org>
2017-09-22 16:44:18 +05:30
Ashish Garg
93e91f73b2 msm: mdss: check the length of the external input buffer properly
dchdr->dlen is a short variable controlled by the user-provided data
(a string). If the value is negative, the condition does not pass
and loop continues, also increasing the value of "len". As a result
buffer overflow and overwrite occurs.

Change-Id: I5eacec446c9a8b5b82fc3bc6d1281303f336d4de
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
2017-09-14 14:27:31 +05:30
Linux Build Service Account
a13cc21099 Merge "msm: mdss: disable HDMI block before HDMI core off" 2017-09-13 18:59:41 -07:00