In the current implementation, when the display is blanked, DSI phy
is turned off prior to turning off the supply to the panel. This results
in an abrupt transition on the DSI lanes from LP11 to LP00 which is in
violation of the MIPI spec, and can potentially cause panels to go to a
bad state. Fix this by requesting ULPS entry when display is blanked.
Change-Id: I5c3e422cfdd9a398939a7277cd78ed7adb16d76f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Allow unused SMPs to be allocated in pipe re-use cases and when
there is a change in required SMPs.
Change-Id: I4737b0edf60577f4bec852a63f47412ead653029
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
During pipe setup, if a failure happens, the pipe
is marked as invalid and an error is returned to
the caller; it is the caller responsibility to honor
the failure and avoid an overlay play in the invalid
configuration. Anyways in order to prevent
configuration problems that can lead to underruns
due a wrong sequence by the caller, add a check
to print a warning and return an error if an
overlay play with an invalid pipe is called.
Change-Id: Ib2497b20eb4117bca8a94c30d3ef3b87ddb79fde
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
This feature enables user space to issue ioctl to initiate DSI
mode switch from video to command mode and vice versa. The
mode switch occurs on the next frame that is to be commited
for display.
Change-Id: Id6f187541a773fc52f809b968a6366008da9d4a3
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
(cherry picked from commit 98a936dc8a4b4c94c5220c98a4dfc2b3eb006b1c)
[veeras@codeaurora.org: Resolve merge conflict in mdss_fb.c, mdss_fb.h
mdss_mdp.h, mdss_mdp_ctl.c
Modify mdss_mdp_layer.c due to compilation errors]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Refactor ping pong split programming to make it generic enough to
support the feature on multiple targets.
Change-Id: Ic2a1cad97c354997de81f06e449ab78a1864fda2
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
(cherry picked from commit 472bb7cff9aae26cac323c6cb5d01ffb1de206ab)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_intf_cmd.c
and mdss_mdp_intf_video.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
../../../../tools/gator/daemon/events_xml.h
For cases in which wait for kickoff or wait for panel idle, currently
there is not enough information to debug why it can be happening. Add
more information about current state when it happens by adding XLOG handler
to dump display driver info.
Change-Id: Icc3555c05bfa5603fed965e747857d1d538a9ef1
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
The overflow check for downscaling was added due to bug in scaler for
earlier MDP revisions. The bug has been addressed in MDP 1.03 and newer
revisions, hence keep check only for older revisions.
Change-Id: I2df98f7d23c016472bc4bcf67ce37fba4fb2c40e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit 50fb9e51cea706e81ea7fc31cfb7826d69140918)
[veeras@codeaurora.org: Resolve merge conflict in mdss.h]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Running ESD check during continuous splash will show false
ESD failures. Do not check panel status until the
continuous splash is done.
Change-Id: I14a74feb0b7f5beb7c690d1c4c9a3c37354abe25
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Continuous splash screen needs to be disabled for the slave control
as well after handoff. In the case of pingpong split, there is no
secondary control and needs to be disabled for the next pointer.
This change handles disabling continuous splash screen for slave
control for command mode interface.
Change-Id: I8897a00fc54f71698467fa9c63dca0c2746230d0
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
This change will enable by default the display
driver debugging features in non performance
builds to: dump MDSS registers during failures,
panic during fatal display driver errors and
enable some logging into an internal buffer
(to avoid logging overhead).
Change-Id: Idc5e2dbd6960ee568f3e18a103c248b20faca548
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Resolved Kconfig file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Cleanup the kernel panic within the display driver to
dump mdp registers before driver panics and remove
unnecessary panic during underrun interrupt.
Change-Id: Ia8cb125b2836096b4179463cb4d4e6d1bd6cd804
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add modulated and scaled backlight values to d/mdp/stat sysfs
node so that they can be accessed from user space side.
Change-Id: I4c66978e71bcbce785c7a6ab460eab918b5e3ac6
Signed-off-by: Ping Li <pingli@codeaurora.org>
BTA status check currently is invoked as soon as ESD thread
starts. In some cases, this BTA status check might fail as
unblank is not yet performed and panel is not on. Hence
delay BTA status check start till unblank is completed.
Change-Id: Ic752866cc679438fb2ccffede660c29e9597d01e
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This change adds support to read force clock lane to HS
property from panel dt file.
Change-Id: I20c42e0f7914c8fb91c6cb7ea6fd2802359a6be6
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
If MDSS idle power collapse feature is enabled, MDSS GDSC can get
toggled when exiting idle power collapse. This may require an
explicit call to TZ to restore MDSS security configs prior to accessing
any MDSS registers, which is typically done whenever IOMMU is attached.
For panels where backlight is controlled using DCS commands, it is
possible that a backlight update could be triggered when MDSS is power
collapsed. This would result in enabling MDSS GDSC and restoring DSI
registers prior to sending the DCS commands. For such use cases, ensure
that IOMMU is attached prior to any register programming to avoid any
crashes.
Change-Id: I245d1180cfeedeb938e70b792fd6d627e86c5d14
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Register debugfs nodes to read from and write to the LCM registers.
Give following command in adb shell to read panel register:
echo address feedback_count > /d/mdp/panel_off
cat /d/mdp/panel_reg
To write panel register:
echo address value > /d/mdp/panel_reg
Change-Id: I9ef9fb57dc1b7dea42c7e701c60018f7946ee75b
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
By turning on the blue LED we get a notification that the boot-
process has started. The blue LED will be turned-on in
bootloader and be turned off when HLOS display takes over.
Change-Id: Ia8f97a507a5deda9d692f0a8b53488a684f5efd2
Signed-off-by: Shimrit Malichi <smalichi@codeaurora.org>
(cherry picked from commit f6e38df1b908fdc77bab9c843cb24efb5ce8ee2f)
[veeras@codeaurora.org: Resolve merge conflict in mdss_fb.h,
mdss-mdp.txt]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
In the existing implementation, display driver assumes only one pipe
can be staged on a layer mixer during overlay handoff. Starting from
MDSS v1.03, layer mixer can support two pipes staged at the same stage.
This change handles the case for two pipes on layer mixer at same
staging level. If more than two pipes are staged on a layer mixer, it
is invalid.
Change-Id: Ie6fa42e7a5b555de53fc4a3801e89447c3b1f90f
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Exit cleanly in the case of failure in writeback driver
to support probe defer scenarios.
Change-Id: I8c8b5099ea649e98b99093cf8b9c3a06d55f8b57
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
Some tools like MMI need know whether panel is working
correctly or not, so add a panel_status node in sysfs.
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Change-Id: I2f5da3c850f83230476f0cd66f2bf11b9234ed32
While turning off autorefresh feature, there are some frames
that do not get transmitted causing timeouts. This change gracefully
exits autorefresh feature while new frames are pushed.
Crs-Fixed: 773221
Change-Id: I66ecf13133723ff5fad465755d50c6eb1ec0e52a
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Use ctl mutex offlock to synchronize between control
stop and BTA ESD status check function to prevent any
race condition.
Change-Id: I841e03a066b6e9e193ba9c6deae20d5527d4a20f
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
During DSI data lane recovery sequence, we poll on the MDP line
count to enter the active region before performing the DSI
recovery operation. Sometimes, the overflow error can occur just
when the display enters suspend state. This causes the DSI
event thread to enter a continuous while loop causing watchdog
kill due to kernel logs flooded with the below error.
mdss_mdp_video_intf_recovery: line count is less. line_cnt = 0
Avoid check for the line count in such cases.
Change-Id: I4159ae639edc9b0e2cd0f09b97ba6fbd640737d4
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
When transitioning from LP3 power state to LP2 power state, reset
the flag to indicate that the interface is active again and can accept
updates. This ensures that all the interface clocks are correctly turned
back during the subsequent display update.
Change-Id: Ia3e90a5e9da7432529a9dd5ca3c5690b8d6c2af0
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
For command mode panels, current code configures the HW
to transfer a frame and returns the commit context
without waiting for transfer to finish. As an example,
after kicking off frame N transfer, commit context doesn't
wait for Frame N's transfer to finish. By doing so, it
allows SW to configure/queue frame (N+1) and improves the
performance. But before frame (N+1) is kicked off, SW needs
to make sure that frame N is finished otherwise it may lead
to tearing and/or unknown behavior. This is achieved by
calling wait4pingpong routine. But this optimization has a
side effect when debugging critical issues. If for some
reason, frame N had a bad HW configuration and it had
HW hang then wait4pingpong during frame (N+1) will timeout.
This timeout will lead to HW register dumps but this
register dump is related frame (N+1) and not frame N.
This gives incorrect debug information. To overcome this
side effect, allow wait4pingpong's timing to change using
debugfs.
Setting this node to true will make the driver
to run this processing in a synchronous way,
setting it to false will return the driver to
normal asynchronous operation:
echo 1 > /<debugfs>/mdp/serialize_wait4pp -> sync
echo 0 > /<debugfs>/mdp/serialize_wait4pp -> async (default)
Change-Id: Ief25232b65cf3dfec7c2147120dac57d0f54d22f
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Use debugfs_create_u32 for wait4pp]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Add support to initiate the dump from a work item
so the driver can dump from an interrupt context.
Change-Id: I51a9719884c826713cc4c9abe926205eaac4d721
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add gamma correction support in mdp3 driver via
MSMFB_MDP_PP ioctl. The ioctl has been extended to
program luts corresponding to histogram based
outputs and gamma correction based on flag.
The gain corresponding to gamma correction and
the histogram based output are combined in driver
and applied to hardware.
Change-Id: Ie875b4a9f4f4c752ad9a811ad68aff1c5110d57b
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
MDP3 LUT programming has incorrect RGB order as per HW. The
correct order is to have color0 for green, color1 for red
and color2 for blue. Correcting color order in mdp3.
Change-Id: Ie7b6ab7f83e18495e83a05102e288fee6841e3ab
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Fix ret value for error case in framebuffer
allocation api and use integer instead of
unsigned int for sscanf api.
CRs-fixed: 790640
Change-Id: Ib7fa217334365b8194571e220740a769597636e0
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
For the new versioned PP framework with config payload pointers,
the Disable operation should be highest priority and allow a
feature to be disabled without requiring a config payload. Gamut
Mapping had no check to see if Disable operation was present before
throwing error for a NULL payload. Now, Disable op is checked first.
Change-Id: Ia644316dcd8f86d6f85b06f4a8aed99873c54e4d
Signed-off-by: Benet Clark <benetc@codeaurora.org>
The table size definition was incorrectly defined previously, which
caused the Gamut Mapping tables to be missing values. The table size
definition has been redefined, in order to include the missing values.
Change-Id: I0adf546c52c40f7a251f3aa977864ba116822d93
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Clamp control enable register is different on 8996 target.
Update DSI software to handle it based on DSI version.
Change-Id: Iac61ac0a03397633154d2fe1bf44bcaaeeab1c52
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Fix chroma plane size requirement for bit stream and meta data
for NV12 ubwc format.
Change-Id: Icae966ea296cc34673492d7adae0094303e92a0d
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This header file is required by userspace components for compilation.
Signed-off-by: Ian Maund <imaund@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
smmu v1 is not supported in 3.18. Remove smmu v1 specific
changes in display.
Change-Id: I9deb060b6d3539acb9ee4b3fa05f491e0fc1db43
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
When open session is called, input and output format validation takes
place. In order to properly validate, we need to know if the session
contains rotation. This rotation information is passed using the flag.
Change-Id: Ie8bf4c6639aa0d671ac044a2581132bc97b68242
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Value will be used to validate and identify which rotator
session request item is a part of.
Change-Id: Id62719c4d37c9a2f690cb57fa1ca2826310d1da8
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Change rot_180 and rot_270 flags to be a combination of few other
flags, as those would summarize the respective operation. This
would adhere more to how hardware behaves and also allows more
combinations.
Change-Id: Ib8e6e9e01710b773284e3ec496c689b8d786502c
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Define the new rotation API for the mdss rotation driver.
Change-Id: Ief25e7e6c7716db8183cb49e41cbd447b7cdfbfc
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Fast forward msm_mdp.h file for 3.14 kernel upgrade. Commit
history is not essential for future debugging.
Change-Id: Id9525ef3361c7f73b5c341a29e7a3e91b8037fa7
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Use appropriate SOC name. Also replace all
instances of thulia with kryo.
Change-Id: I3d21e3534fdf113190882c84ee5426ee929da131
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
[cip@codeaurora.org: Always build mdss_mdp_pp_v1_7.c]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Current xlog dumps the entire registers ranges
mapped in memory. This entire range can be
reduced to only the meaningful offsets to help in
debugging and avoid overflows in the debug buffers.
This change adds support to only dump the registers
ranges specified.
Change-Id: Iecf7f5eaa909b0365ea599ae094c7f184c0ae8b8
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit 899cf5dbc528b13bd488038215356c5bea5b591c)
[veeras@codeaurora.org: Resolve merge conflict in mdss_dsi.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
reg dump func is specifically used by xlog, so it should be static in
xlog file.
Change-Id: I14570e174b215d7ea5f77f0b333f65956b549222
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Update obsolete mdss block names to new ones for xlog register dump.
Change-Id: Iae8859c42df45577bfccd5a939669742f8395ca2
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
When MDSS_XLOG_DBG entries are inserted into code, these entries are
always logged regardless enable status. This helps use xlog in quick
debugging and none of these entries should be merged.
Change-Id: Iebcf6cb7fc32bc77281e2f02a354f35357ff6d88
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add iommu xlog flags and handlers. MDSS_XLOG_IOMMU is dedicated to
iommu issues. The fault handler, if installed, dumps mdp registers to
ram, dump xlog entries to kernel log and panic the system.
Change-Id: I7d703c5958104fb3dc2c30a7fc1e59508c8d0ca3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit a3cfbff0abb7ff9f906df76a7ff68007d7f1fc3f)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
xlog entries may be called before debugfs nodes are created, so
spinlock intitialization should be done during compile time.
Use ktime APIs to avoid other crashes during early boot time.
Change-Id: I5dc8e066b56d26934fd4c324c03e5f1ec3b4a6f3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>