Histogram read and histogram LUT writes vote for additional
bandwidth on mdss ahb clocks for speeding up the register access.
This is not required on 8916 and 8939 targets.
Restricting the call for vote based on dts property.
Change-Id: I944e07c80c678ef75bd7e4e0270be6a23becce00
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Fix potential null dereferences and buffer overflows in driver.
Change-Id: Ibce1bb120207e0a54ac9bd53de9952bd6ac8d0fe
Signed-off-by: Charles Bin <cbin@codeaurora.org>
Setting up vsync_retire_handler needs accessing hardware, move it into
commit thread so that buf_sync ioctl has no hardware related operation.
Change-Id: I646b5fa5f103bf07e409c41842b59ac2ed204c83
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Currently, MDP fetches only at the vertical backporch.
All through the vertical front porch, hardware sits idle
doing nothing. Starting from MDP v1.5, hardware has the
capability to fetch at the programmable line in the vertical
front porch.
Change-Id: Ib2482fa610acdfc5cbf944415a344c11f313bc81
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
In use-cases where scaling is required in one direction
and not on other, scalar extension parameter will be set
to update the scale register. Add proper check to this enable
scale bit only in the required direction.
Change-Id: I5527f22c83fe456d0124af12516c5bdb240e80a9
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
mdp_busy flag is used to serialze kickoff operations by ensuring
that any pending kickoffs are first completed before issuing any
new kickoffs. This avoids any potential mpd_busy_wait timeouts.
Therefore, for normal operations (partial update disabled), mdp_busy
flag should always be set. However, when partial update is enabled,
width and height of panel's ROI need to be checked before setting
mdp_busy flag. Otherwise mdp_busy_wait will timeout since no update
will be sent to the panel. In addition, perform roi merge from both
panels if roi-merge is enabled to decide whether column and page address
has changed. If it was changed, then new column and page address need
to be sent to the panel.
CRs-Fixed: 692382
Change-Id: Ib0070b84a626afffd4c51a65f59bc97aae1d8994
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Move bandwidth control to panel on and off functions
to speed up the clock control.
CRs-Fixed: 673613
Change-Id: Ib3828687ab54fb7a5aad7e97dec46c6e76a7311a
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add parameter in debugfs to avoid using prefill
calculations for the bandwidth vote.
Change-Id: I7e1d748128335e6ced4d094d77544005e393e218
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
MDSS_XLOG_TOUT_HANDLER() is for debug purpose. It acquires
a mutex and thus should not be called from an interrupt
context. Move this call to a thread context instead.
CRs-Fixed: 692386
Change-Id: I631ffa4c972b66991eb65ad0de294378e0d3f266
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
If brightness node is written prior to unblank by surfaceflinger
the backlight level being applied would not be correct. The
stored value is also overwritten.
Passing the correct unset backlight value during unblank.
Change-Id: I430bc759e09ecc6dfbc616af47fbc953aa542b9a
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Add parameter in debugfs to disable panic feature
for debug and validation.
Change-Id: Id28288147f549fadea7ac0d038c7466338b08cd8
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Different MDSS hardware variants support fixed pixel
latency ram for each pipe vs SMP (Shared Memory Pool).
Software does not have to handle SMP allocation/deallocation
for hardware with fixed pixel latency ram. This change
enables the driver to handle such MDSS hardware.
Change-Id: Ia55f45d65c3eb19350c7195acd83af8ffc0e9a10
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Start vreg release index from PANEL_PM to avoid
release call with DSI_MAX_PM in error case. This
avoids crash in dsi_probe if panel node parsing fails.
Change-Id: I236f40851d41831fe37eea77aa83e2f4ce031a3b
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
MDSS driver has condition check for 1:1 mapping for dspp to
interface and WB to ctrl. This check is not valid for all MDP
version hardware. It can support less dspp compared to number
of interfaces. It can also support less number of WB paths
compared to controllers. This change enables MDSS driver
to handle such hardware conditions.
Change-Id: Ic08e274c73cc41e80245a0d3d4ae7b854bd5a2d3
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Check the whether partial update feature is enabled or not before enabling
any post processing features.
Change-Id: Ibf2111d5ca8714279903980d14e63bab556bb41f
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
Power on HPD accesses HDMI registers. HDMI AHB clock needs to be
enabled while HPD is being powered on.
Change-Id: I483ac56b41e3bd3794878940fbd0d5242dd5d1cd
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
Add new line character at the ned of the log message
to avoid printing multiple messages on same line.
Change-Id: I7f7127d28c089ae0add172e42295a9d4cfce9297
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Move debug statistics to mdp5 specific debug file and make use of
simpler seq_* calls to display MDP statistics through debugfs file.
Change-Id: I424b9c62e993390670448c9db6d0800e97c830eb
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Add debugfs file to dump complete MDP state and gives a complete
snapshot of MDP state.
Change-Id: I9c3b5ebf9981a7197bff011c13cc3aeea7af5b78
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
[cip@codeaurora.org: Moved new file locations]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Refactor MDSS and VBIF registers ioremap to go through common utility
functions and add API to allow adding any register base which uses
utility structure. Expose VBIF register base through this utility.
Change-Id: I97ca2db07e40b261abf1a46b427a373295886cb2
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
For dual-dsi command mode panels, bandwidth(bw) vote is supposed to be
released once ping-pong done interrupt for both controller is received.
In current implementation, if secondary ctl finishes last, which is the
case most of the times, then bw release is called using secondary ctl.
But bw is calculated/stored using main ctl because of which bw vote is
never released as expected. Fix this by releasing bw vote using main ctl.
Change-Id: Iadbd150ed6a35478da2cb376e29b01e579a526b8
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Add support for intialization and setting pinctrl
states to the HDMI driver. This allows for HDMI
driver to use pinctrl gpio initialization on
msm8994 targets.
Change-Id: I751bdca032772b5ccbd4029d320026ea2ffa7120
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
Add new operation request to share ion fd to userspace
for mapping to the frame buffer memory.
Change-Id: I404c73c19e3fffec593ffd32c34e7b1a74a500d8
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Release kick off and unlock ov_lock before waiting for pingpong
so that next prepare can start.
Change-Id: I92b62272777b3734e2c7dc44add8a49fb96911f5
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Add edp support functions so that edp can be enabled through
dtsi.
CRs-Fixed: 661151
Change-Id: I6d29f39b836075c59a691ab27904dbe9ea0df28a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Enable the AD backlight attenuation calculation every time the
mdss_fb_set_backlight function is called, so that the backlight
sent to panel can be properly attenuated if AD is enabled.
Change-Id: If751b69fe5f927c15580332645e7e26fe6cb778c
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
Secure display state is MDP hardware state instead of
individual interface state. All interfaces should push
only secure content data when MDP hardware is in secure state.
All non-secure content should be rejected to avoid XPU
violation. DSI hardware should also avoid DCS command
communication in this state to avoid non-secure VBIF access.
CRs-fixed: 686451
Change-Id: I3beb6c24361e3c42e18107d2a2ebebafc5da1b52
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
To support partial update, different dcs command should be
sent to individual panel at same dcs cmd kickoff while
sync_wait_broadcast mode is enabled.
CRs-Fixed: 667682
Change-Id: I1959a5c6576f2608b6926dccc12df3c883bc9937
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
At DFPS, to avoid flickering at right half panel, right dsi controller
needs to be configured along with left controller at same time when split
display enabled.
Change-Id: Ibbe451bd72e9740d5902d664a5e9e73db90bba5a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
There is an ioctl for userspace to update the variable
parameters. Frame buffer driver has to update the shared
memory length according to the new variable information.
Change-Id: Ic24ee3e4b1101b4e1ef4e9db2182602aa5175812
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Update HPD and CEC with debug messages. Reduce the
level of debug messages that say only that interrupts
are being ignored due to the feature not being
enabled, and add messages saying that HPD is enabled
or disabled. Also adding dynamic ioremap of addresses
based on dtsi configurations as phy init/shutdown
is not needed on msm8994.
Change-Id: I25d9d7a6737f84e7dd0c653326a37b0046accfb9
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
MDSS 1.8.0 supports split mux with which we can
support resolution of 2k driving both the interfaces
on single control path.
Add support for both video mode and command mode
interfaces
Change-Id: I40b6a66a9cb0b7a62fb269e31300df22e9b7cff9
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
The DSI phy init sequence differs based on the hardware version and
the driver needs to execute the corresponding sequence appropriately.
Commit I0564216737cc6e98c1e8658862cf7af5dabd363c introduced a bug which
removes the hardware version check resulting in the incorrect phy
init sequence being called. Fix this by adding the required version
checks back in the driver.
kernel 3.14 upgrade conflicts:
drivers/video/msm/mdss/msm_mdss_io_8974.c
Change-Id: Ia48f5dd7986920b9064b66c1de7c6abe10bcd365
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Currently there is no way to identify if a pipe is used for
real time or non real time traffic. Adding debug prints to
identify the same which would be helpful for debugging.
Change-Id: Id24bbe029ead66924c897ba81cfed50d4ce6217d
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
Crashes are observed during bootup due to unclocked access of Panic
control registers. Take care of the same by enabling appropriate clocks.
Change-Id: Ic8df1f9c3c3928b9a3e9b21d63a5d9bba4f2152c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
For 8939, the DSI_1_PHY_DSIPHY_GLBL_TEST_CTRL register setting
is different when compared to other chipsets. Update the
register settings for this based on the DSI_HW_VERSION check.
This enables dual DSI panel support on 8939.
Change-Id: Iebf8015d4a4c978283e74b104bd955a6bf7004c2
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Ping-pong registers are used for tear check when command mode panel
is used. They are used for frame buffer compression configuration if
panel supports it. But if video mode panel is used, like HDMI or eDP,
those registers should be at their reset value otherwise it can cause
unpredictable hw state and results in under-runs. To avoid this, reset
ping-pong registers when panel is turned off.
Change-Id: If792c71ac584550a24fd3424481b34179fbf1d77
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
The req->src.format field should be changed to the destination
format and propagated to the user so that appropriate buffer size
calculations for the destination buffer can be made. Note, this
only changes the user copy and the driver fetches the source buffer
based on source format.
CRs-fixed: 686496
Change-Id: I590829796c00aeea8e3d9b10578126dd7afe9c82
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
Add MDP Version check for 8939 to fix MISR register
offset calculation
Change-Id: I77f7ea8f63ef2599f64f619bf89d77849806a87d
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
Add support to check ESD status by register read for
DSI v2 based platforms.
Change-Id: I013d31c67b3e5c61b7723ecb234be06c2fd5a451
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Update sysfs_node for MDP capability with max blending stages
supported for individual revisions.
Change-Id: I5c7feebb6c4a99c1604cb67e200ded44dd443580
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
In current implementation, it is possible that user-space tries to
configure pipe beyond its bandwidth (BW) limits. When driver detects this
condition, in few use-cases it can return -EINVAL which is not the proper
representation of the error and can lead to incorrect behavior from
user-space process. Correct this by always returning -E2BIG error
whenever per pipe BW check fails.
Change-Id: I90f429ad0bafd5bb5ec6da66d75d44ec48c0f299
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
During first borderfill commit in splash cleanup, wait for vsync
before iommu attach to prevent IOMMU page faults during bootup.
Change-Id: I68b7162d090513b082cbd4c0013731cedc0ebdbe
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Enable more checks and add more debug logs for AD BL attenuation
functionality tests.
Change-Id: I088657bdbed553970c3550aab5bdc399970d9b23
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
If unable to map a buffer, set the pipe in a non-buffer mode which would
cause it to go to a black solid fill. This is better than fetching from
a stale address or a buffer with a different frame configuration.
Change-Id: Ia5b281e695a096c885a2eae0f96126cd3b4da828
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
When turning off command mode panel, if retire fences are still active
and suspend sequence goes through some fences may remain active.
If fences remain active command panel off sequence would stop signaling
vsyncs and would throw off the timeline. To fix this clear the retire
timeline when turning panel off.
Change-Id: I32a5fe0f81b16fa2ef959c7f05e484fb9f9f8598
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
While applying dynamic refresh rate, there is a possibility of
failure to apply new refresh rate and has to release all resources
acquired. Remove the clock vote in the case of failure to
apply new refresh rate.
Change-Id: I882b51a94499b1984b10b176ed9dac3daf595d81
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>