Currently RSC timer register programming is optimized for updating
only during timing param changes and not during RSC state changes
with same timing. Static wakeup time computation should consider
panel jitter for RSC clk state too, else it can result in RSC hang.
This change also removes extra logic for video mode prefil lines
computation for rsc config as video mode does not enable RSC solver.
Current issue scenario exposing the hang is in dual dsi display scenario
where RSC is in clock state and static wakeup time is programmed by
not considering panel jitter, after suspend/pmsuspend while waking up
if RSC switches to command state if primary enabled first and vsync
may arrive much early based on the panel jitter. RSC hw can not handle
if TE arrives earlier than static wakeup time causing RSC hang.
Change-Id: I1434fdd71eb04fdbe22b3601500493c818e9126d
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
TUI clients are the display sub-drivers that participate
during the TUI transition. They register with the display
TUI notification framework with a list of callbacks functions
that will be invoked during pre/post transitions and for quering
I/O memory that need to be access controlled. This change
adds RSC to the TUI client list.
In Trusted VM, all the sub-drivers are not enabled to avoid
any re-configuration of respective module registers. But the
TUI framework need to know the sub-driver I/O memory ranges
in order to accept the I/O memory list lent by the HLOS VM.
So, SDE provides them ranges by reading from a custom
devicetree property.
Change-Id: I2c4b254d539d04771339ae4a7bf4d296b7a7f91a
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
In dumping display registers, physical address will be appended after
each block name. This is to support register compare between kernel
and UEFI.
Change-Id: Ic20d3e2bd4c95aa7c71c4b646a149f7e83ad731a
Signed-off-by: Yu Wu <zwy@codeaurora.org>
Currently, SDE_DBG_DUMP takes any number of hw block names along with
few defined strings as arguments. This set of arguments is used to
determine which HW block registers needs to be dumped. Move to a
blk bitmask to avoid passing a large set of arguments. The bitmask is
split based on the clks required to access the HW block for ease of use.
The lower 0-23 bits are used for HW blocks which can be accessed by just
enabling the MDP clks. DP is kept separate as it needs DP specific
clks to be enabled. Add a debugfs node through which the mask can be
modified, which can be useful while using the debugfs dump option to
force a panic.
As part of the change, remove in-log/in-mem enable mask debugfs node
for every debugbus and use a single node to control the logging
mechanism for all the HW blocks debugbus.
Change-Id: Ibb6354b3e3265c9911104bb0f964616eb8a898c9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Setting AMC and WAKE tag triggers AMC only and WAKE+SLEEP
only vote. These dynamic tag switching is not allowed
on interconnect driver. Display SW usecases also need
ACTIVE_ONLY tag for solver enabled and disabled
configuration. ACTIVE_ONLY tag triggers AMC+SLEEP
for solver disabled and WAKE+SLEEP for solver
enabled configuration.
Change-Id: I5abcc104378595724e5b5ae594c4b8c7a7922875
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change skips RSC client vote for clk_state update when
delta vote and update_tcs_content are false.
Change-Id: I4597167c261f06811ffbd84b2eba4e6aa78d1eea
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This patch addresses 2 issues with RSC; 1) internal tracking of
certain state updates, and 2) skipping certain timing updates
in CLK state that are required.
1) With primary in video mode, RSC will override the video mode
state in favor of clock mode on RSC rev3+ HW but this override
is applied after updating the client's state and checking if a
state change is required.
If RSC is already in clock state and the client provides a video
mode state update, the state change check will proceed since the
client request doesn't match the current state, but then the
requested state gets overridden so that it does match and another
switch to clock state occurs. Fix this by moving the state update
and state change check after applying the override. Also update
the event log so the state transitions are logged properly to
help identify similar issues in the future.
2) If continuous splash is still active on a secondary display
and primary gets a mode switch, the timing update is skipped
since the RSC client requests for a CLK state update. When
secondary is then used and goes idle, solver mode can get
enabled with the wrong timing.
Primary is the only encoder allowed to provide timing updates
and it votes for CLK state when splash is active on another
display or if QSync is enabled. In both cases timing updates
should be applied in case of later transitions to solver mode.
To address the issue, add a check which ensures timing updates
are applied for these corner cases.
Change-Id: I54ca0898d2f430b7e8c601de7309fc57d717e0bb
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
SDE RSC and core perf avoids BW vote trigger if current
and previous AB/IB BW votes are same. This may cause
issue if target enters in idle power collapse state
with stale AMC vote. This invalidates the sleep vote
and does not remove disp_drv vote. This change triggers
BW vote on all rsc state updates.
Change-Id: Id738206ade0feeb067dfda3d06cc0c7e19d66df1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Make msm_drm into single module and all child driver
registers and unregisters are handled from parent's
register and unregister respectively.
Change-Id: I017513d1de3b6b25dd5543d7fa7741c0bac1740d
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Msm_drv device node has dependency on sde_rsc device
node for power resource enable if sde_rsc device
device is enabled. This change moves the msm_drv device
to probe defer state during component addition if
sde_rsc device is not probed yet. It also removes
the master_drm device node access from sde_rsc device.
Change-Id: Ibb7457279b3376f45e82e5c9373aabd84a37ed36
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Get the register bus AB/IB vote values for each supported mode
from the device node to allow flexibility in adjusting these
settings for various different targets.
Change-Id: I258320d4847accfa8043f5f9fc4ccc791c16dddd
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Give snprintf the max size posssible to store in buffer or
copy_to_user instead of just truncating in order to ensure
the output string is properly terminated.
Change-Id: Id387e99cd035e39530b2c7de9484c0288efff605
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
RSC is timing out while checking for power control register,
increasing wait times only after a poms, removes this issue.
Change-Id: I4a324eb3c87e7dfb84d9a8b0a11597327d206a74
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Avoid updating the rsc state to solver mode for video mode panels
on targets with rsc version 3 and up.
Change-Id: I238f130c914c8c845c172746cc2025acd37840d3
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
When switching from CMD to VIDEO or vice-versa, HW no longer
requires a vsync wait in between since the vsyncs will be
synchronized. So skip the wait for HW which supports this
feature.
Change-Id: Ia5823495bc7bfc7d590098775b0a5f4b4347b5ed
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Add support for enabling and reading profiling counters via
debugfs. This change also introduces RSC rev 4 (first rev
supporting profiling counters), enabling all relevant rev 3
features as well.
Change-Id: I0326215b069a37c91072965379b0b4843916ee0a
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Combine 2 functions that have identical code in to a single
generic one that can be shared by multiple debugfs nodes.
Change-Id: I053c1c5be7bb8f990ea178df240202c9fab0aa45
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Update RSC to use the register bus scaling APIs from SDE
power handle module.
Change-Id: I90aa9abcdc1e2253f940fc33b51cc7b2a723ee8c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Migrate to icb framework API in drm and sde driver. And
also removes old msm_bus custom APIs from the driver.
Change-Id: Ifcf6d6f157594638075742fe328b29a9be065bca
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
The RSCC static wakeup and the bandwidth trigger for
the downvotes are based on the prefill lines. Reduce
the prefill lines based on the panel vertical front
porch to avoid issuing bw downvotes during active
region of the previous frame.
Change-Id: I408209ba308c32e71d9f70c5ed7e60c134877c84
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Remove runtime_pm support from rsc driver. RSC driver
does not vote for MMCX. It relies on sde core driver
to keep vote and trigger call. That brings additional
dependency to manage runtime_pm references during
pm_suspend/pm_resume call. This change also updates
the runtime_pm call to manage the pm_suspend in
msm drm driver.
Change-Id: I111771994822c82db53fb6c23e5d942f90fd1af2
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Length of the buffer to be copied is checked
against both source and destination buffer lengths
before copying. This ensures that there is no
buffer overflow while reading as well as writing.
Change-Id: I4bd1a5892b47771aef4c23a4d1594fc1c8361577
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Increase the rsc min_threshold time, so that it has
sufficient time to complete the sequencer in rare
cases. Increase the polling time for tcs ok
from 1us to 3us to align with the min_threshold.
Change-Id: I8ebe250823969e55ec2ec4bb9f8f55bf4aa52aa5
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Add reg bus vote separate for RSC on top of the SDE
driver vote during the pm_runtime suspend/resume
events to avoid register access issues.
Change-Id: Ifbaead747b7b10db107696c8cce8e1ecfae5e0f8
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Update minimum prefill lines for command mode
displays based on system recommendation for
different fps. Video mode display can support
prefill lines based on panel porches.
Change-Id: I52dc67035fa80668281926ce4d7dd1b292fbc3b7
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change adds a check for the length of the buffer
before copying it to avoid a buffer overflow.
Change-Id: I9af9d422e0b3cf02c8d6662af3310337a9861a7a
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Trace counter is not properly showing up on trace as is. Replace it with
proper format by refactoring existing trace to be more generic.
Bug: 119295905
Change-Id: I50abb593cd67c10ceed115380ac0e9d2177f0963
Signed-off-by: Adrian Salido <salidoa@google.com>
(cherry picked from commit 89ac1949eaa1524e4e2bbd2ad8c8b6513ae594dd)
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
SDE RSC does not need to wait for vsync during
dms. It was removed unintentionally with commit
a74d2cf7fa ("disp: msm: add runtime_pm ops
support in drm driver"). However, Panel mode
switch still needs vsync wait based on
recommendation. This change fixes vsync wait
for both cases.
Change-Id: Ic9119132eb15a8c33f3841ba5df2624189d93395
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Add runtime_pm ops support in drm driver instead
of direct sde_power_resource_enable/disable call.
It allows drm driver to use runtime pm refcount logic
to track the resources instead of custom implementation.
The change also removes the NRT_CLIENT support from
sde_power_handle code to simplify it further.
Change-Id: Ib14692dca5876703d0a230da2512d731b69b8ebb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.
Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>