Fix FPS calculation when a new resolution is found in DTD
of EDID of the sink.
Change-Id: I5bb168f269a7328331884591a7d882496a6f6ece
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Update audio routing based on minimum encryption level requirements.
In case current HDCP status is different than what is required, do not
switch audio to sink and set avmute. If required level is minimum,
route audio to sink and unset avmute.
Change-Id: Icef9d4901682d774c3ace95c6dbe6b8fe67eac0f
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Make DDC hardware to poll for rxstatus during link integrity
check and acknowledge corresponding interrupts. Stop polling and
wait for timeout on getting new message, re-authentication required
or message ready interrupts based on rxstatus.
Change-Id: Ie8b1bc1b700589196f41b00ceb759458102f4064
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Validate current hdcp lib state before starting new hdcp session.
Double buffer the sink message and protect its access with mutex
to handle fast re-authentication requests.
Change-Id: I039b1a0c818a2e66eef583afb15420ce8587a75c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Enable both software and hardware interrupts for DDC to
properly check for DDC engine being idle before any new
DDC transaction.
Change-Id: Iaab95483954e76397620a9f708982de060318d8a
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Calculate timeout values in terms of hsync with respect to resolution
timing. For a given timeout value, calculate number of lines that will
take that much of time to be transmitted to sink. Use that value to
program the hardware for timeout.
Change-Id: I9606180d4c9b2d666dbac3d807f5bb61b84af68e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
DSC pkt_per_line is not mapping to register directly.
value 0 is for 1 pkt, value 1 for 2 pkt and value 2
is for 4 pkt. 3 pkt per line is not support.
Change-Id: I43ff34018668feb7a52eaa8f4b2de632fc9ab59b
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
When ping-pong split mode is used, there is only 1 layer mixer is used.
Thus fb_split should be 0. However, current implementation incorrectly
reports fb_split which leads user-space to split layer into 2 pipes. But
in low tier chips number of pipes are less and this leads to display
boot-up failure. Fix this by sending lm_width as 0 when ping-pong split
is used.
Change-Id: Id7feb1a3fd1932e68bc910c7e7ecd3dcdf63cb5e
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
If ctl reset is called from rotator, ctl's mfd is NULL.
This might cause NULL pointer dereference leading to
kernel panic. Fix this by adding required check.
Conflicts:
drivers/video/msm/mdss/mdss_mdp_ctl.c
Change-Id: Icbd3e2e3ffc7cc0521222185d30ae0ca6adad5c4
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
With current implementation, vsync handler is never removed
in case of shell stop if the call doesn't come from HAL. Due
to this in certain cases the vsync ref count is unbalanced.
MDP driver should ensure that the vsync handler is always
removed explicitly during shell stop. Fix this issue by using
separate variable for SLAVE ctx and using MASTER ctx for
removing vsync handler.
Change-Id: I281b9db0623f9760efea5b2ceb978e648083f156
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
This change updates the enable sequence for DSI 28nm PHY
as per HW recommendation.
Change-Id: I9d294e807a40110bfd6c48243fc41b402fcc539d
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
When the phone is in suspend mode, the panel turns ON and
OFF whenever it receives the message for ambient display.
There are cases whenever the Power Key is pressed, it skips
the Panel ON because already the state of the Panel is ON
and the esd_rdy didn't turn to true, which was set to false
during Panel OFF event. This result in ESD being disabled
sometimes when we coming out of ambient mode. Hence set
esd_rdy to true once during bootup and never set this back
to false.
Change-Id: I0cb4d7f02e0018125b6886651be99e93551f3301
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Dsi errors happen at interrupt context while xlog
dumps can only be called at normal priority. This change
makes sure that xlog registers dumps and panic happen
from a work queue during dsi erros to prevent slow
path errors.
Change-Id: Ib9928d653221d0dbb0b87a5965ef3c4b20ebb662
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Most of the DSI panels do not support refresh rate lesser than 48.
So change the default value to 48.
Change-Id: Id47fe3488d7cd85b1eefaea18f3a7b9e6e8b3e31
Signed-off-by: Prashant Nukala <pnukala@codeaurora.org>
Since DFPS mode can be dynamically configured through device node,
shadow clocks used by DFPS clk mode need to be initialized during boot
time regardless the default DFPS mode specified in device tree.
Change-Id: I580a05ed62a2207666ea6569abbdf588a4f8d39d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Allocate buffer for panel register results, which is
to support any length of register reading request.
Change-Id: I67905b3771ecfe5d56fe29928b2953b8435f1d71
Signed-off-by: Yang Xu <yangxu@codeaurora.org>
Bringup 2 instances of ADV7533 for 8996. Change all register writes
from constant to pdata variables. Move the DBA init from
mdss_dsi.c to mdss_dsi_panel.c.
Change-Id: Ib0fc9f7c2348efa04a44bc021cb50973e90d7f22
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
[cip@codeaurora.org: Removed spurious drivers/video/msm/Makefile change]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Prevent accessing memory beyond buffer size. Prior to this check
rotator was page faulting trying to handle invalid requests, in which
offset + region of interest size was greater than the image size.
Change-Id: Ifffed0e908b29fb6e326314ec1eda148bb72db64
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
When framebuffer device is released, the AD status variables need
to be reset.
Change-Id: I7240a43949b429214cc8e0b4fa7c59823aeafb87
Signed-off-by: Ping Li <pingli@codeaurora.org>
During MDSS DSI controller initialization, program the DSI HS
timer value with the recommended value from the DSI h/w team.
This is needed for proper trigger of DSI HS timeout errors.
Change-Id: Ia83a5abd901ec7d632cb9ad8588249a5a64d4d1f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
While exiting ULPS, there are instances where the phy incorrectly
reports an error causing the logs to be flooded with the error prints.
Disable printing such error message during such cases only.
Crs-fixed: 800136
Change-Id: I8fd321f57f5c00910e2b0637d31da0dc7f9d88b2
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
All clients need to call register API exposed by DBA module to check
if the down stream transmitter driver is configured or not. In case
DBA is not enabled, define a null register function which returns
a NULL pointer to let the clients know of non availability of DBA.
Change-Id: I2b6066babe5a7e464a31752720da8f299997e977
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
Add driver for ADV7533 to support DSI to HDMI output.
Configure the ADV7533 via I2C for audio/video setup.
Change-Id: Iec0b922e1257d6974ea1755b49a6087f85eb8499
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
[cip@codeaurora.org: Moved adb7533.c location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Add display bridge abstraction driver to provide an abstract interface
for different types of bridge chips used on MSM platforms. This
interface allows driver development for bridge chips from different
manufactorers while allowing users, of the funcationality provided by
these bridge chips, to re-use the same code across different boards.
Change-Id: I64457e3a44479a3b1be5482691d4727a86dc9b87
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
[cip@codeaurora.org: Moved file locations]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
If userspace tries to set the same autorefresh enable value as before
do not return an error, since it is not, and bail out silently.
Change-Id: If2699817dc5cb06dd8182e5125c1ae868c925ddf
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Currently, RESET event is being issued from commit which
assumes panel power on has been successful. In case RESET of
the panel fails, this error needs to be propagated back to
unblank to avoid display commits.
Move issuing of RESET event to panels to unblank to detect
panel power on failure and stop the display thread.
Change-Id: Id13cc479b6a837e0c28a1504bda9f23e0c251f45
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
If continuous splash screen feature is disabled and ULPS during suspend
feature is enabled, DSI phy initialization does when device is booting
up, due to incorrect checks in the current implementation. Fix this issue
by ensuring that DSI phy initialization is always done when DSI interface
is turned on.
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Change-Id: Icdc90eef8d5f3380b47f67268249eb670f8ca824
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
DSI phy reset and initialization should only be done when as part of
the power up sequence. This can happen at two different places:
(1) During bootup or resume sequence
(2) When exiting idle power collapse in static screen
The checks in the current implementation to ensure the above make use
of the panel blank status. However, it is possible that the DSI clocks
can be toggled even after panel has been blanked. This may result in phy
init sequence getting called resulting in spurious transitions on the
DSI lanes. Fix this issue by modifying the existing sequence
appropriately.
Change-Id: I1f67b24058b3c98fb4472867c0421ae47fdcd9c7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
acquire pipe before overlay start so that splash cleanup
can happen in overlay start.
Change-Id: I1ef3dbabf264925fee2eb903beed183eba335bb2
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Updating writeback through pan_display would be pointless as
there is no output buffer available. So, ignore wb updates
through this path.
Change-Id: Icfb0a8252c707eb5ac72810bc3b213aea95b7373
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The frame done event updates the release timeline
for command mode interface. Avoiding this timeline
update will cause the fence timeout issue for two
buffer clients.
-> buffer 0 submitted with acq fence for N update
-> buffer 0 acq fence triggered because client
holds the buffer 1.
-> MDSS updates the release fence for buffer 0.
-> buffer 1 submitted with acq fence for N+1 update.
-> client wait for buffer 0 release fence before
triggering acq fence for buffer 1.
It ends up in fence timeout situation if MDSS software
misses the last update. Ideally, MDSS software should
update the timeline as soon as buffer 0 is unused by
hardware to allow client for reusing it in next update.
Change-Id: I99bd968d11adc3a52ae6bc761857a6edcedcd785
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Fix crash when read the perf_mode debugfs property
that was accessing memory beyond the size of the
array.
Change-Id: I82c6aaf263ea9f688856eade009008c10ec65e36
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
For single interface video mode displays, the utilization
of the ddr channels is not as efficient as the dual interface
displays, and in some scenarios this efficiency gets reduced
by half. This is valid when display driver is doing an honest
voting and causes underruns in multiple scenarios.
Therefore this change adds a factor that account for those
inefficiencies, specific to single interface controllers.
Change-Id: I925db9defa16346c4400732310dbb679458dd0dd
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Currently secure restore cfg is called in LK and then after every
resume or after MDSS comes out of power collapse. As per TZ
recommendation, ensure restore cfg is called before first secure
session and first suspend resume.
Change-Id: I0cc820636da4f4a137bdaadc737ed71d78940b10
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
The CDM CSC registers for writeback are currently written during the
validate stage of atomic commit. This logic is incorrect, and the
CSC register should be configured during the commit. The CSC table
being used is incorrect as well. This change fixes the tables being
used and when the table is configured.
Change-Id: Ica1e743d5ec70b6f652f37c059db39520d485628
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Currently dynamic fps configuration is checking for the
status of timing generator enable for slave controller in
the case of pingpong split. But this check will always
fail as timing generator wont be enabled for slave controller.
Remove this check to make sure dynamic fps feature works fine.
Change-Id: I097938f2b7b09a31df216c9e4879f12ed783794b
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
During the early wakeup event, current code
cancel any pending Gate or Off work items
pending and only schedules a delayed Off
work if we are transitioning from OFF state.
This is a problem since resources remain
enabled when multiple early wakeup calls
happen and the state is different than off.
Fix this problem by making sure that
early wakeup schedules an Off work item
if any previous work was cancel by this call.
Change-Id: I3c773221b53080443c62a0e7e09ed51ec43028a4
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Additional offset is needed for MISR CTRL and SIGNATURE
registers on 8952. Add the required offset of 0x10.
Also add logic to select appropriate registers for video
and command mode.
Change-Id: I148200bdac98dfb446d7958ab700ed221e3d48d0
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
The name member in mdss_debug_base struct is not a pointer,
so the current method to check whether this name string is
empty is invalid. Use strlen to fix this bug which might
introduce NULL pointer references in some cases if the name
string is empty.
Change-Id: I52b5eeae5f303e5690ce1e6a4ce00debf3435ee2
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Fix to flush any pending early wakeup work item and
prevent to schedule more if we are in the middle of
an stop request.
Change-Id: Id87eb8d37f68584811da5ce9d9dd87f35529689e
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add ftraces to the qos luts, danger and safe per
pipe configuration.
Change-Id: I409ca413e5bf76fcdc6a565ac3c41f4f53aa4f29
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Adjust per pipe qos settings as per
recommendation.
Change-Id: Iec3eefdfbd15ee33607c5fcb0096ae4bf79a24e2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Current code does not reflect the correct panel information
when user space request the panel info and fps data after
the fps update.
This change fix the code, so further calls to get the
screen info have the correct panel data.
Change-Id: I3e0382748cbf8b480c2516223cfe14444d388e29
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Timing generator update cannot happen in the
same frame boundary/vsync cycle where a change
in the mixer configuration is requested.
Enforce this sequence by moving timing generator
programming to the commit thread, so driver can
wait for one vsync cycle when timing generator
has been modified due a dynamic fps update.
Change-Id: Ifac5332f3de45479ebc0a6ab0c1f7cf7b48a41b0
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Starting with 6a55d9204af7aed1c279d6563aba4763ef1b67e9, msm: mdss: add
support to call panel events for one panel, pingpong split with smart
panels is broken because MDSS_EVENT_PANEL_CLK_CTRL event is not sent
for the slave panel. Add support to send event to slave panel when one
control path is driving two panels, like in pingpong split. Also balance
the resource management for smart panels to re-enable pingpong split
based configuration.
Change-Id: Iebe94bdd28af7aa9cb5c35031f3f89a9ab99a7eb
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
In the current implementation, driver makes a decision to use
pingpong-split data path if HW supports pingpong-split and connected
panel is a dual-DSI. However, in the high tier targets like msm8996 it
is possible to use dual-dsi panels in multiple modes, i.e with single
layer mixer + pingpong-split or dual layer mixer. So the correct place to
define if pingpong-split will be used or not is with panel configuration
not with the MDP driver.
In order to support this, MDP device node will continue using its
property qcom,has-pingpong-split to tell driver that underlying HW
supports pingpong-split. Introduce a new panel property,
qcom,split-mode, which will be used to decide if pingpong-split
for a given panel should be used or not.
Change-Id: I210e7f2a8b03d5c8a161241120c7d3c7081fa971
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>