SCM call to unlock the registers is not required for
msm8996 target. However, such call during resume
prints multiple error messages when GDSC is toggled. This
change adds mdss hw capability option to handle the
case.
Change-Id: I6084d0e1e2b7d08c853e44ee2c6e276cc47f1244
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Remove extra print for function name in debug module.
Change-Id: Ic7327bcedb2254b2bc4b7655138289a19605f935
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
"vdd-cx" is optional regulator and usage of incorrect API
returns the dummy regulator. Display driver tries to
enable/disable this regulator on each suspend/resume and
prints error based on return value. This change uses
correct API for optional regulator to avoid unnecessary
error messages on each suspend/resume.
Change-Id: I51df98fd32702e4de83c5ecc5311f176f82818e1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
MDSS hardware on msm8996 target supports RGBX UBWC format
because it handles the RGBA and RGBX formats in same manner.
This change adds the RGBX UBWC format support with
compression ratio information.
Change-Id: I674d136496910e017d4c21d56b62def7eff0562e
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
When source split is used, pipe can be staged on two mixers or it can
be staged on right blend of a mixer. It is also possible that same pipe
is used at different z_order in consecutive frames. When pipe's z_order
is changed and it goes from two mixers to single mixer or right blend to
left blend or any other such variations, pipe needs to un-stage properly.
Fix issues in current code by correcting order of state assignments.
Change-Id: I5b26cc98186183713b7a187673bcb30440d14145
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Buffer lists are protected by list_lock to prevent multiple threads from
modifying the list. Locks are missing in a few places which may lead to
potential concurrent access and lead to corruption. Add proper locking
to prevent this.
CRs-Fixed: 806684
Change-Id: I95c5ebbb5cd9c11c38ea9be0826f3b8748632a5b
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Overlay buffer allocations are marked as kmemleak because the base
pointer is not being tracked, rather these are tracked as part of a
list. Add kmemleak_not_leak to prevent false positives.
Change-Id: I3c54c15b6d73d3aece8e28b7723e0cf9c4953be5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Uninitialized panel_name array can cause the invalid string
comparison between "NON_PANEL" and uninitialized value. Fix this
by initialized the array with null string.
CRs-fixed: 790201
Change-Id: I18486db909e5d41e39b5e6052c8c7c760ae8d4b4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Change Ic07deab12aa43bc4f61762303ed367fe3131389f,
msm: mdss: enable source split with dual-dsi partial update,
introduced the problem of only half screen getting updated for
4k HMDI. Since HDMI does not have a slave controller, it was not
configuring the src_split_req flag correctly. 4k HDMI uses both
left and right mixers controlled by a single ctl. Fix the issue
by setting the src_split_req appropriately.
Change-Id: I333afd85ae5dc88610c352b557a834526bafcdfd
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Enable mode switch to occur if atomic commit is being used.
Previously feature was implemented for prepare/commit pairings.
Change-Id: I5eb1b5512a695fd6412e30728eabe129159d7d96
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
It is possible for rotator to drop alpha value from RGBA8888
or to add don't care to RGB888.
Change-Id: I17b6ba7a4d793c4f77be5cb5e98a3b9aa59e90f4
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
The writeback block in the rotator supports ubwc output.
This change enables the client to specify ubwc input and
output format.
Change-Id: Ic9aee90b0edd2128383ecb03cdf7882cd8c8e3e1
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
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>