Add code to set the backlight level to zero for blank event
and restore the backlight level to its previous value during
unblank event. This will fix any unexpected panel flicker
that might show up on the screen during panel ON sequence.
CRs-Fixed: 608091
Change-Id: I871a067b0cc40d893b8b7e5a25103ebb914f9b7a
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Benet Clark <benetc@codeaurora.org>
While calculating source and destination rect of a pipe for the
programmed ROI, consider FLIP flags set for the pipe.
Change-Id: I631453c26f443b08a23556f83195d9914e05b41d
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
For better analysis, time stamp of xlog should synchronize with
the time stamp of printk. Use local_clock() to log time stamp.
CRs-Fixed: 673350
Change-Id: I00e456fdc35f5a85d8029d12f4507990444e2821
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
During panel unblank a kickoff is done to turn on the panel so that the
first update is not delayed. It is also used to give buffer to command
mode panel prior to enabling backlight prevent junk data from appearing.
In order to prevent release fence timeline from being signaled too
early we will increase the commit count. This allow next sync point
to be added to the appropriate point on timeline, instead of relying
on frame done being called before sync/commit calls.
Change-Id: I566f90b3013b59dedbe42bbb9fdf6fa37d65e779
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Make sure the MDP clocks are turned on for register read
and write access when device comes out of power collapse mode.
Change-Id: Ibbfba8b33b85b247c82d2938322c09853528deba
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
Notify post-processing features whenever there is a backlight change, so
that PP feature can update accordingly.
Change-Id: I2317088752444478bcfd9cf4f6acfa8553e85d30
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
With source-split feature, a pipe can be staged across two layer
mixers (LM) and/or two pipes can be staged on a LM same stage. Current
implementation stages source split pipe into incorrect container index
for right LM. Similarly while un-staging it calculates incorrect index
if more than two pipes are staged on a single LM. Fix this to resolve
MDP pipeline hangs.
Change-Id: I89e0f5946cb330dc918641486728baea856de574
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Print error code when file node allocation fails within
fence acquire logic. This helps to find the root cause
for file node allocation failure.
Change-Id: Ib6adb9f612f13cb56d8f43549722b78440f689f8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
msm_ion_client_create doesn't actually do anything with its heap_mask
parameter. Remove it. Also remove the extra argument from an audio
function that wraps msm_ion_client_create.
The following semantic patch was used to generate this patch:
@@
expression E1, E2;
@@
msm_ion_client_create(
- E1,
E2)
@@
expression E1, E2;
@@
msm_audio_ion_client_create(
- E1,
E2)
Change-Id: I403a125a1715b29a3db1f27c993abe0bc6d3fb11
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Previously, the ad_info completion structure was initialized every
time ad_input was called, which reset the completion wait_queue. A
completion structure should only be initialized once, in order to
prevent any corruptions of the wait_queue. Instead, we initialize
the completion during dt probe so that the wait_queue is only
initialized once, and during ad_input, we use a safer INIT_COMPLETION
for resetting complete count.
Change-Id: If1fb7c9a9dec2ad1ec1f07b022bdeabe1af41b22
Signed-off-by: Benet Clark <benetc@codeaurora.org>
The bl_updated variable requires the BL lock. Otherwise, it can be
corrupted and cause backlight issues.
Change-Id: I55eb4b8d525765ede4f27a404f5c3f1f0b446719
Signed-off-by: Benet Clark <benetc@codeaurora.org>
There are potential deadlock between irq handler and
mdss_mdp_irq_enable() since both can acquire mdss_lock
before trying to grab local lock. Add koff_lock for kickoff
related function in addition to original clk_lock which used
for clock related function to reduce unnecessary lock contention.
CRs-Fixed: 665524
Change-Id: Iebc5023eb9dc99f2a2709379bfac67ec275046a7
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
In the current implementation, contiguous memory allocation
during bootup is removed and related changes were made in
frame buffer driver which is not backward compatible. With this
change, add backward compatibility to map to physically contiguous
memory when available which is allocated at bootup.
Change-Id: Ib1a595f2426dda8d3e1c5e50c71c35d3f45854b6
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Allow user to specify the type when requesting an overlay pipe.
If field is set the pipe type indication in the flags will be
ignored.
Change-Id: Iee51d24b96c7a2a987dc70a439342e6548dfc8fa
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
When MDSS is idle power-collapsed, any events that require hardware
programming should result in exiting idle power collapse. Currently,
this is only done whenever a screen udpate happens. However, it is
possible that other APIs may be called prior to the actual screen
update. To address these cases, add the exit sequence call at the
interface level as well.
Change-Id: I162e1c1c4137a2ba20ed0b76f0c182c2c931cc87
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
DSI Ultra Low Power State (ULPS) mode is property of the DSI data
and clock lanes. Current implementation requires the MDP command
interface to send explicit events to the DSI controller to config
ULPS mode. However, it would be a lot more efficient if the DSI
controller would independently decide to enter/exit ULPS based on
whether the link clocks are enabled or not. This also ensures that
if any DCS commands need to be sent when ULPS is enabled, the DSI
controllers will exit ULPS accordingly.
Change-Id: If8d5b7039b5e104bcee5304c7c0ddb3cdd5bbcbc
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
RT/NRT feature splits the AXI traffic over two AXI ports.
By diverting RT/NRT traffic to individual AXI ports, NRT
traffic can be throttled by NOC at SoC level based on AXI
port#. Having this capability can help tweak QoS based on
use-cases.
This change adds support to identify real time and
non-real time clients and acocrdingly program HW to take
care of routing the RT/NRT traffic to respective AXI ports.
Change-Id: Ic5d94423f125226539db9e21bc095dba803cc63e
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
Unstage pipe from right mixer also if pipe staging
fails due to any error. This removes the invalid pipe
usage on right mixer when source split is enabled.
Change-Id: Iac8365025630b71808ea3e0f6ec849964ef52b9c
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
For left+right partial update case, both pingpong_done are
enabled. The last pingpong_done will do the notification to
signal timeline to release buffer.
Change-Id: Ibfe115d3c9cc05cdc7f9171b9421e85f1cc56157
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
This patch adds l_roi and r_roi fields to display commit struct to
support partial update for dual DSI panels. Panel side
frame buffer's column, page address and DSI controller's
stream size are updated based on the ROI requested.
Change-Id: I70957c9ee1546448416441a8d0608fb00c3b92ca
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Add a frame buffer reference count check before calling
null commit to release the free list pipes. This avoids
unnecessary flickering on screen if a process tries to open
and close the fb node without performing any operation.
Change-Id: I96b824edccf27f0ddb796c420ef1feb49f65ddea
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Add support for switching between dsi command mode and
video mode and vice versa at runtime. If the panel is
configured in video mode, it would be power efficient to
be able to dynamically switch to command mode on need
basis. This change adds the support by providing an IOCTL
to switch between video mode and command mode at runtime.
Change-Id: I573c063556d68d631fe27cc2d1447522eceb7f2a
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Each VBIF client can be configured for its number of outstanding (OT)
transactions. Currently we can have as high as 13 of these VBIF clients
within MDP. OT configuration for these clients is spread across multiple
registers. Current implementation of rotator OT limit is not considering
these multiple registers which leads to incorrect OT limit configuration
for WB1 WR VBIF client. Fix this by adding logic to select correct
register offset.
Change-Id: I7b4f7ac37ff5c8a85f35dbeb6a6c450b157c4b3a
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Frame buffer releases all allocated control nodes by calling
blank when its reference count reaches to zero. In error
case, caller might call prepare ioctl and lead to null
pointer dereference to calculate the layer mixer width. A null
condition check prevents such dereferencing call.
CRs-fixed: 664517
Change-Id: I3b65b48a67ab2efb9654457ca7901da6ef0d57be
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
BW calculation for single layer requires iterative search on how many
pipes are staged on a layer mixer. In the current implementation,
starting source split, container used to store staged pipes has two
entries per stage. Based on this maximum entries to search for single
layer has also increased. Update single layer iterative search based on
this new changes.
Change-Id: I2e65567fd795d71ca5ded0fa56c602267fe46768
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Adding a performance flag in perf_tune params to run the
H/W at its peak. Useful for debugging from the user side.
Give following command in adb shell to turn it on:
echo 1 > /sys/kernel/debug/mdp/perf/perf_mode
To turn off:
echo 0 > /sys/kernel/debug/mdp/perf/perf_mode
Change-Id: I11d86b840952b9f1d167e426997d50caa35b35cf
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
Max mixer width supported varies for different targets.
Add support for max mixer property in the device tree.
Change-Id: I2cbbb947eada13b89349702065d732dd54ed6ba3
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
In the case when ESD status check fails with DSI ACK
errors, there is a chance of unclocked register access when
DSI_INTR_CTRL register is being set.
Change-Id: I629b4ec642a86369b6ed693bdc6f8b4260ec1f5d
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
If there is some pipe to clean up, need wait for it be done to
make sure the pipe can be used for the second cycle and recover
mode can be executed.
Change-Id: Ifb3fdb152bc4bbf367b3d272aa0c88b1a0650c19
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
ESD feature may need to check the status of the panel by reading specific
panel register depending on the panel. Add support for ESD status check
through status register read and to configure the method used for checking
panel status through panel dtsi entry.
CRs-Fixed: 660805
Change-Id: I13b11362722eb2ad379162944eafff04ec01d1cb
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Split display configuration requires that lower and upper pipe
control registers get programmed accordingly. This change fixes
a missing configuration bit in one of the control registers.
Change-Id: I17c71c004dbf6807483f132cb22271230b27960c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Time out condition was hard coded to 60 fps. If dynamic fps
feature was used, an invalid timeout might occur.
Change-Id: I0abe52416c10ef4ae0af6f541d22c66f6c8a6b5e
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
In the current implementation, pm runtime status for the framebuffer
device changes to active when the overlay session is started. With idle
power collapse feature enabled, it is possible that the MDSS core could
be turned off prior to starting the overlay session depending on the
duration of the idle timeout. This may result in an invalid hardware
configuration leading to various target instabilities. Fix this by
holding a reference to the pm runtime when mdp overlay is turned on.
Similarly, when the userspace process is killed, wake up MDSS from idle
power collapse before shutting down the fb device.
Change-Id: Ie7748732fe76f9b2766da32b972e1e9fe7ff8751
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Remove use of this mutex to allow multiple msm_fb ioctl calls.
Mutexes within the individual fb_ioctl calls already provide
the necessary locking.
This is based on android-msm-2.6.35 commit:
a809819d (msm_fb: display: Add delay kickoff to MDDI)
which in includes this change among others.
Change-Id: Iee68bf3556ab913f916868988f4adbad1ed6b2a0
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
FB clients are tracked using process id. The process id does
not match if open and close API callers are different. Track
the fb clients using file descriptor node id in such cases
and release all resources associated with that process id
gracefully.
CRs-fixed: 652449
Change-Id: I09c965a421197c6464a64684e9706f30df327882
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Currently chroma sample is calculated after calculation of plane
size and stride in case of rotation in H2V1/H1V2 formats. Fix
this to correct chroma sample before plane sizes and stride are
calculated.
Change-Id: I851d61034b465d48fd21bb4a015c103457dc7936
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Adding trace points for systrace at various points in
the driver.
Change-Id: I4783fd2982bddb7f111de9e064bcaff153eb1ce1
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
Add events to observe when bandwidth is requested,
when bandwidth is needed and when bandwidth is released
for command mode panels.
Change-Id: I56b8ce28683696bee50e9cd10351076c49e4a84c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add tracing points in key points in driver.
Change-Id: Ie31e27be4890e2e7cd573c00dbf3f66fa9c62060
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Moved mdss_mdp_trace.h file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Change the pingpong read and write Apis to accept address,
inorder to support multiple pingpongs accessibility
via same mixer
Change-Id: Ia21ee21fbb8d4334d6cdc8b7b659f6f263222a69
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Add support to enable or disable esd check through panel dtsi
entry. This will help in enabling the feature only for those
panels which support BTA.
Change-Id: I4ef85bb2e78b133dd9577ac3d6788e46b34fe761
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
[cip@codeaurora.org: Resolved new Makefile location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Do not check if the clocks are on when sending the ULPS event from
the worker thread. This check is not needed since the work is only
scheduled after the clocks are turned off and would be cancelled
anyway when the clocks are turned on if it is pending. Removing this
unnecessary check avoids acquiring a shared lock which can potentially
lead to a deadlock.
Change-Id: Ib9760221f044dded50a38a32b59d0158c2f6b50e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
When mdss idle power collapse is enabled, panel suspend and resume
events should not be sent to ensure that panel drivers remain active.
Change-Id: Ifbcdee69432cbd0d30f16c86af9c126d9443e269
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Add support for a new configuration entry to enable mdss power
collapse for idle screen use-cases, when a command mode interface is
active. Currently idle power collapse happens only if the Ultra-Low
Power State feature of the DSI controller is enabled. Adding a separate
configuration entry provides the flexibility to enable this feature
independent of the state of the DSI controller.
Change-Id: I4732a95a9f3d0db3e7ecc96a36414349ac6b5604
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
For dual dsi panels with broadcast mode enabled, the two dsi
controllers work in a master-slave configuration. Add support for
enabling ultra low power state (ULPS) mode in this use case.
Change-Id: I9e4383ca60174d6ffa599ce6caa47676a5eea216
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
It is possible for the DSI controller to be active when MDP is
power collapsed. DSI controller needs to have it's own vote for
mdss gdsc to ensure that gdsc remains on in such cases.
Change-Id: I37f98c6e4f6d30908373b812fc50e29ba001b752
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Regulator supplies in the DSI driver are used for two different
purposes. One set of regulators is used as a supply for the DSI
controller while another set is used to supply voltage to the
panel attached to the DSI controller. To support advanced power
saving features, it is required to be able to power down just the
DSI controller while keeping the panel on. To enable this,
organize the supplies into logical power modules.
Change-Id: I54f3ccba1c5ad1fe5c66e8700a012d22ab2684d6
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Currently there is a deadlock when wfd and rotation is done
simultaneously and trying to acquire the shared lock. To
prevent this, acquire shared lock after rotated frame is
ready for wfd.
Change-Id: I3865f02c345ddadd985ee35134454a789936a79a
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Moves rect data type to a common header. Add helper macro
to compare rect values.
Change-Id: Icc499e11cac61463b9f279a7de0e71685cf706e8
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>