Left panel stays in sleep-in mode if clocks are not
turned on for both controllers. Enable clock
before sending commands and skip clamp controller
for command mode panel support on msm8996.
Change-Id: I8d6c6f9253407d1b6fd8001a00be4876a006deea
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
In HDMI Tx controller version 4 and beyond, HDCP registers have been
moved out of secure domain and can be accessed directly, in an
address range of their own. Add support to map this address range and
access these registers directly if we are running on HDMI controller
version 4 and above.
Change-Id: I2d790bf60f42055ba3e10d0ec82812be292826a3
Signed-off-by: Alhad Purnapatre <alhadp@codeaurora.org>
[cip@codeaurora.org: Removed arch/arm/boot/dts/qcom/msm8996-mdss.dtsi]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Currently, fb split height and width are calculated before setting
the split mode in overlay init function. This leads to bootup issues
when dual dsi panel is used with destination split is enabled. Hence
correct those values in overlay init while assigning the split mode.
Change-Id: I93108a60be9c6f7a63b6743daafd50743792573f
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Current code does not program the panic luts
for the cursor pipes. Adding cursor pipes to
the panic luts programming.
Change-Id: Id17f5006d5344e8fd9363bcf4ff8bff2fa07cc5a
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Increase the prefetch lines and disable
the bandwidth calculations during vertical
blanking for 8992 and 8996 if the vertical timings
plus prefetch are enough.
Change-Id: I94f72a43c95f0574e2165810b9c20d50af1fecdb
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Adjust prefill BW equations to update the
latency buffer size for 8996.
Change-Id: Iddcd6fad01025dcfd17b41d3ed2f98b03b7b08fc
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
When pipe_assign calls pipe_init_config it determines
if the pipe is for use by real time client based on info
pipes left mixer. This value was not properly assigned
prior to this call.
Change-Id: If5edf449b8e501f9400d81477fcc12a8285e1172
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Add new xlog messages to aid in debugging of MDSS issues. Some of the new
messages include information regarding mixer configuration, write-back
configuration at start and finish of the operation, pipe configuration
and pixel extensions etc. Also remove old mixer reg xlog and report xlog
from mdp_clk_ctrl only once to prevent flooding.
Conflicts:
drivers/video/msm/mdss/mdss_mdp_ctl.c
Change-Id: I11fd63a220b1ccd102dcd48d3878cf96fc91bc5f
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
This change adjusts the qos luts to be configured
depending on the pixel format of the pipe.
Change-Id: I5a7830cf554ddd34aee7415df694674cf1e981a3
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Mixer setup can be called from multiple contexts and not all may call
mixer set roi which sets valid_roi flag. However with partial update
there is a requirement that for a given ctl path, roi is not valid
because there is no update on that mixer. In such cases, valid_roi will
be false and we should ignore setting up the mixer. So to cover all
cases, initialize valid_roi to true when ctl path is setup first time.
Change-Id: I85ae4ce8711f0fcdf771d18b4896a8f61398ead5
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
The ov_lock is meant to protect overlay/display pipeline.
Rotator has a different lock which synchronizes its resources.
Remove the ov_lock for rotator ioctl calls.
Change-Id: Ie38bb796c3430951636f8c6888bca4cfc8194aaf
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Current revision check to enable rotator limit does not
include 8996. Add this target so the ot limits feature
can be enabled for 8996.
Change-Id: I68d552a736158da6d568e556beea91de321111d8
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Current code selects the vbif nrt to program the ot
limits based on the chipset version only. This is
wrong for the real time clients and the writeback
read; those clients should select vbif rt.
This change corrects this behavior and selects the
corret vbif according to the client.
Change-Id: Ie2b640878767d425e430e33942fd17a80b3bf3f1
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
When a VIG pipe is destroyed or reinitialized, the PP related
parameters stored inside the pipe structure are cleared. There
was an issue with clearing the parameters. The histogram structure
was set to 0, causing a problem with histogram-related mutex and spinlock.
Rather than resetting the whole PP structure to 0, this change adds
support to only clear PP config enable flags and dirty flags. The
histogram structure is disabled but not cleared, avoiding a need to
reinitialize the histogram synchronization resources.
Change-Id: I286b528436a457b9580c3a4c2c24cc8a31dacabf
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Due to the increase in the mdp overlay struct size, the stack size
limitation for functions is exceeded in apq8084, when the struct is
is declared as a local variable. Fix issue by using heap memory for
overlay struct instead of stack memory.
Change-Id: I245b96b0a7633fb01d26c464a08a3a1b24e9e084
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Starting with patch Ic07deab12aa43bc4f61762303ed367fe3131389f,
msm: mdss: enable source split with dual-dsi partial update, valid_roi
check was added when doing mixer setup to prevent incorrect HW
configurations. However valid_roi is not set for a ctl path for rotator.
Because of this params_changed value for rotator mixer is not getting
reset which leads to data overflow for variable params_changed. This
overflow prevents prepare_rotation function to be called which in turn
leads to data mismatch errors. Fix this issue by moving valid_roi check
after rotator is serviced during mixer setup.
Change-Id: Iae2585dcf3d593ad9ce22a6c394e17249bc5f1f4
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Display panels can be in a bad state which is most likely caused by
ESD shocks. Display s/w has the ability to detect panel state and if
it is bad, s/w reset and recover the panel from that bad state. For
the testability purpose, this change simulates a panel dead state, for
example:
adb shell 'echo 5 > /sys/devices/virtual/graphics/fb0/msm_fb_panel_status'
will simulate a display dead state after 5 detections, which is about
25 seconds if the esd detection feature is enabled with periodic
detections every 5 seconds.
Change-Id: Ia28e80ffcbfe45a59ae65e0e26b558a467b50863
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
When pingpong split is enabled, single DSPP drives the two DSI
panels and bandwidth needs to be adjusted based on the complete
panel width. In the existing implementation, only left half of the
panel is being considered for bandwidth vote. This change addresses
issue with bandwidth calculations when pingpong split is enabled.
Change-Id: I24ab9dee80c75f25f8c41501f6b635d98de512a2
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
(cherry picked from commit 812bbe33e782cde79f7b56ac417aa11597fecfe3)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_ctl.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Do not retry sending CEC messages from software
as the CEC driver programs the hardware to
retry sending messages in the case of failure and
update software with an interrupt. This is needed
to pass CEC compliance where TE checks for the
max number of message send retries.
Change-Id: I35d4d2b54ced8b98b9681b2df4bf82f03d5f33b1
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
AD stores a backlight level in a variable for its processing
called ad_bl_level. This needs to be initialized to the actual
backlight level at the start.
Missing this initialization and doing the backlight calculation
for AD will cause an error and ad_bl_level will never be
updated to a non zero value. This change makes sure the
ad_bl_level is set to a non zero value in all cases.
Change-Id: I285332613ffcc1d6c94247b7c9bd89f054c80d4c
Signed-off-by: Ping Li <pingli@codeaurora.org>
When pingpong split is enabled, single DSPP output is driving two
interfaces and MDP clock has to be 2x times the pixel clock. In the
current implementation, pingpong split is not considered in the MDP
clock calculations. This change accounts for pingpong split and update
MDP clock accordingly.
Change-Id: I85a86fa747c908f76bd01faf36fe310d502e2121
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
(cherry picked from commit 9aa39bfd928b40fa8f8b87b099dbb39d964be41f)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_ctl.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Current implementation incorrectly handles the transitions from display
low power modes to display off. This could lead to DSI panel and
regulators not getting properly turned off. Fix this issue by ensuring
that DSI interface is correctly shut down during this transition.
Change-Id: I7c20c04d20fd2f443c61b83f229ce4bd2b46f814
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Variable ad_bl_level is used only by AD functions now,
and can be protected with ad_lock alone. Earlier it
was used outside of AD functions as well and protected
by bl_lock. Using bl_lock causing synchonization delays
with display thread hence we now use ad_lock.
Change-Id: I2ec98236c3fedee1eb4d8f8a851256ab66ab3026
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
During transition from bootloader to kernel, make sure programmable
fetch trigger enable status is properly transitioned so that prefill BW
can be effectively calculated.
Change-Id: I30d2827b1b8158799601050560ec41e338855790
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit bebfb67e72a9e503af73833159df360a07c2095d)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp.h,
mdss_mdp_intf_video.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Dynamic refresh rate can be changed using different methods
(modes). This change adds the feature of changing the mode through
device node.
Change-Id: I8c402b535e0e867c5ab80cdf4ec35065828cc637
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
MDP has a HW limitation that when source split is enabled
and two pipes are staged on the same zorder of a mixer,
the left pipes must of be higher priority than the right.
If MDP couldn't find a right pipe of lower priority, instead
of returning EINVAL, it should return NULL indicating its
failure to allocate a pipe.
Change-Id: Ife9dff64bb17f56b22f9a4015f621c70d7e6c735
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Enable source split with dual-dsi partial update. When source split
is used, it is a HW requirement that both layer mixer (LM) width be
of same size. Based on this requirement validate ROIs passed by
user program for the correctness and program the MDP HW and display
panel according to the ROIs. In order to simplify the logic, whenever
source split is enabled, dual-dsi or not, user program will always
sent merged ROI through l_roi during commit IOCTL.
Change-Id: Ic07deab12aa43bc4f61762303ed367fe3131389f
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
(cherry picked from commit fd4a1755aa0c4dceaa68d2df3027e4ec8d22f82c)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_util.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Need to enable/disable partial update based on mode of
operation after dynamic mode switch.
Change-Id: I677a4050162d22f97cbec59d3d13208a026b6483
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
When MDP driver is being shutdown, driver clients can make ioctl calls.
Driver was returning a generic error which results in clients
re-issuing the ioctl. Driver should return ESHUTDOWN error to notify
the clients that it is shutting down and cannot accept any ioctls.
Change returns the shutdown error for ioctls issued during shutdown
sequence.
Change-Id: Ie5a8e557565feb50edd858f9a2ee98637efb55d0
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
This overflow only happens once after device is out of phy reset state
when BTA is triggered, however, data are still transmitted and BTA
interrupt still returns, indicating that there is nothing wrong with
data and panel. After the first overflow is ignored, there is no such
error any more when s/w trigger more BTAs.
Change-Id: Icb861e2232bda22f8fde008cf8e439594aef6732
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
If the interface did not start properly, free the mixer.
This fixes issues where the mixer was allocate but never
used.
Change-Id: I4261d4c2f3bd4bcd4a95b096808e29ea0e3ff82d
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Stop rotator queue if the left mixer is invalid. This avoids
null pointer dereference related crashes seen during reboot testing.
Change-Id: I8d7eee04cbe9a1b6b4fc2593fb1d836e7ef9c941
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
During stability testing, the device can enter and exit the idle
screen use case very frequently. When this happens the fps switch
between the minimum and maximum configured values happens many
times causing the kernel logs to be flooded with messages related
to this. Hence, silence this print statement by changing it to
pr_debug.
Change-Id: If54871c1d27fcc50d901712c5fd5f279a8bd3efc
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
When continuous splash is enabled backlight is
turned on in lk itself. But the pwm_enable variable
is not set till first backlight update in kernel.
In recovery case blank is called even before
backlight update. Since the bwm_enable variable is
not set backlight disable is skipped keeping the
backlight on.
Change-Id: I73c02d8250596e7b6addec4ffc54655bbc8cb53c
Signed-off-by: Ramakant Singh <ramaka@codeaurora.org>
DSI overflow recovery thread has synchronization issues with suspend and
FB shutdown path causing watchdog bark issues due to excessive logging
and NOC errors due to unclocked register access. Add changes to synchronize
the thread properly.
Change-Id: I9e6c4d21803d1bb99349568ac2cca431d5a5d1c3
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Display driver debug feature xlog, allocates some memory
to copy some of the MDP registers that are needed for
debugging and then it panics. Current memory allocation
api has a problem, where data from this memory allocation
is shown corrupted in the ramdump.
This change workaround this problem by changing the
memory allocation to a dma alloc which works fine
to keep the data correct in the ramdump.
Change-Id: I391419095fb7ebfd3eb88faf26d2b473c255f28c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
In current panel ESD feature, there is no way to enable
ESD check at runtime if it is not set in DT property.
This code change allows to enable ESD check feature from
sysfs node dynamically irrespective of DT property set.
Change-Id: Ie44eca60c02dec108eaac562e49cda34b8093b06
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
This adds dtsi property to enable the clock lane recovery
mechanism. This will prevent clock hang issues in command
mode panels.
- To enable this qcom,dsi-clk-ln-recovery property needs
be enabled for that particular target.
- In case commands need to be sent in HS mode, need to add
CMD_REQ_HS_MODE to the commands flag list.
Change-Id: I24d61983de9e2d695084de7c0b5eec860c1c1601
CRs-Fixed: 783621
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
If the bandwidth requested is the same as the
one from the previous vote, skip the call to
bus driver in order to avoid an overhead
due unnecessary calls to bus driver.
Change-Id: I5e90f04a186d9d259e28c70783840294c86fcc98
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit 7337a9e3df25b2ce22005001d95866a51738429b )
[veeras@codeaurora.org: Resolve merge conflict in mdss_dsi_host.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Increase wait for kickoff timeout to accomodate system delays
in display commit thread. In the current implementation, there is
a possibility that unsignalled fences are flushed to display on the
panel. Hence update mixer stage to border color to avoid displaying
unsignalled fences.
Change-Id: I005ac5ccec001d167d65810b6c68f788794985b8
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
When the clock lane is forced to HS always, it is possible that
the clock lane status iS HS and data lanes are in LP mode. We need
not perform data lane HS overflow recovery. Add a check for clock
lane HS setting in such cases.
Change-Id: I2a4cc3bba90ae6a48183810717318fac450775bb
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit d5a33b3bc61303b9c75b827d5a4e1476e1ff66c7)
[veeras@codeaurora.org: Resolve merge conflict in mdss_dsi_host.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
After prepare call is made it should be assumed that all pipes that are
needed for this round should already be set. If there are any pipes that
are still dirty after a successful prepare call, it means that they are
not properly referenced in user land. Thus mark them for cleanup.
Change-Id: I6fea19482129223484b8061eb2917aa8987253e5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit f0fb17bd97c9eb15376c589a65ea0f33174c3856)
[veeras@codeaurora.org: Resolve merge conflict in mdss_fb.h]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Current code only supports to configure the same
read and write ot limits. For newer platforms it is
needed to configure different default limits for
each of the operations. This patch refactors the
implementation so the driver can support a different
default limit for the read and the write operations.
Change-Id: Ie54e4f24d52a561a6bf10de65ab6bce8a98211bb
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit 1b032907f97620955e76cfd0c7a970dd1d697db2)
[veeras@codeaurora.org: Resolve merge conflict in mdss.h, mdss-mdp.txt]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
When dynamic refresh is triggered and DSI sets the video stop signal,
mdp line counter is halted, but not mdp engine unless this bit is set.
Change-Id: Ibfd9b2c6c9ed6635c1ca229f2ad21f800427e760
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Each pipe holds a list with the addresses to the planes
allocated for each pipe. Current code was missing to
populate this list for the cursor and update the global
list with the correct index for the cursor allocated.
This change fixes this issue by populating the list
and updating the global cursors list.
Change-Id: Ib5bdfd5a93802c05643b74a6ebf396d2d9308365
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Currently max target zorder is used to check where hw cursor needs to be
setup since it needs to be setup at highest mixer stage for target.
However max target zorder reflects the maximum number of layers
supported and not the actual mixer stage. Fix by doing proper check and
configuring right mixer stage for cursor.
Change-Id: I6dee63a852126110bdc4953239d5b92b77f12488
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit 8e983248cdc4a00412cddb5e986cc7c6eb629fd1)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_overlay.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
For 4k video playback, video only expects to decode
at 30fps for current target. This means that
rotator is only expected to run at 30fps for 4k
resolutions, this change considers this for the
rotator bandwidth calculation in order to optimize
the bandwith vote.
Change-Id: I416a5f2bda00bdd962fa7d26fba2ed19f4247d81
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
(cherry picked from commit 440c2184e5c29db07de5c5bcf7036bf7b6fc5a3d)
[veerascodeaurora.org: Resolve merge conflict in mdss_mdp_ctl.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Buffer len is currently printed in decimal while
address in hex. Change this to print buffer len
in hex.
Change-Id: I0c90d45806c988e59d6239519544dd80f7b5f306
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
(cherry picked from commit 6d90e7ab009a77159004579006e4c6f2b2a99f04)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_util.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
In the current implementation, driver waits for each fence upto
10 seconds which is too high. This causes other threads to stall
and causes fence timeout. Aggregate all fence waits to a maximium
of 10 seconds.
Change-Id: I086583170cc461609ff426577b4711d78e3eca28
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>