Commit graph

1,951 commits

Author SHA1 Message Date
Mahadevan
ae98505aae disp: msm: sde: switch rsc state before CTL_PREPARE in dual display
In dual display usecase when both displays comes out of
idle following scenario will cause wr_ptr timeout.

 1. Both displays goes to idle and RSCC enters Mode-2.
 2. Primary display exit idle upon DRM commit N RSC
    enters Solver State.
 3. Secondary display exits idle upon DRM commit M and
    waits on input fence after CTL_1_PREPARE is set.
    RSC is still in CMD state.
 4. Primary Commit N frame transfer got successful and
    commit N+1 is queued in primary display when RSC
    in solver state which leads to timeout in primary.

This is because RSCC will not generate a wakeup in sync with
primary timelines leading to timeout. This is because RSCC
still sees idle low thinking frame transfer is taking long
time. This change will switch the rsc state to AMC mode
before CTL_PREPARE is set which resolves such issue.

Change-Id: Ic32e48b4febbbcc54d94876194d38fe6ef3d0981
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-09-22 10:03:27 +05:30
qctecmdr
dbb61136a6 Merge "disp: msm: sde: poll for rsvp nxt after idle" 2021-06-18 15:10:34 -07:00
qctecmdr
40dce79003 Merge "disp: msm: sde: add support for monaco capabilities" 2021-06-18 02:23:49 -07:00
qctecmdr
4355bbf51e Merge "disp: msm: sde: update perf cpu dma latency votes on idle in video mode" 2021-06-17 22:15:38 -07:00
qctecmdr
81f6f90580 Merge "disp: msm: sde: add changes to fix the sde fence signaled logic" 2021-06-17 07:30:22 -07:00
Nilaan Gunabalachandran
fb8235db1b disp: msm: sde: poll for rsvp nxt after idle
During mode enable after idle, rsvp next would be set without
rsvp cur. Back to back test only should be serialized, but currently
this would be possible right after idle. This is established by
commit 11aab5f9c3 ("disp: msm: sde: Fix null dereference errors").
This change updates the condition to poll for rsvp next clear
during this usecase as well.

Change-Id: I300254967cbec69fff8b31545b8d659afc56f283
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-06-16 20:42:53 +05:30
qctecmdr
20f10a6f65 Merge "disp: msm: dsi: Add support to enable LP11 insertion feature" 2021-06-16 01:11:10 -07:00
Jayaprakash Madisetty
85ea12542f disp: msm: sde: add changes to fix the sde fence signaled logic
This change allows signalling of sde fences when sequence number is
less than done_count. In current scenario, fence is not signaled as
the subtraction result is not typecasted to int before updating
the status causing the UI thread to block on sde fence.

Change-Id: I3ca62222e0c67223b9eaf299474a2c282d761d3a
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-06-15 18:50:08 +05:30
qctecmdr
8ace83edee Merge "disp: msm: dsi: Remove unused for loop in ESD reg read validation" 2021-06-12 00:38:09 -07:00
qctecmdr
babe9a447b Merge "disp: msm: sde: remove fb's attached to a drm_file in preclose" 2021-06-11 20:08:11 -07:00
qctecmdr
1cacbb513b Merge "disp: msm: sde: add register dumps to minidump" 2021-06-11 10:49:22 -07:00
Ritesh Kumar
587be9368e disp: msm: dsi: Add support to enable LP11 insertion feature
Some panels may require that the DSI link returns to the low-power
stop state (LP11) after transmission of every line. If a panel
requires that the DSI link returns to LP11, apply the LP11
insertion between lines feature.

This change adds support to
 - Disable the command mdp burst mode
 - Enable mdp idle ctrl
 - Program the No. of dsi pclk cycles of idle time to
   insert between command mode mdp packets. The idle time
   must be long enough to cover the time link takes to
   switch between HS to LP11 mode.

Change-Id: Ie718d334f05ce6c1ecd1a05b379bbbe18dec6330
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-06-10 12:58:28 +05:30
Venkata Prahlad Valluru
3fe858f773 disp: msm: sde: add support for monaco capabilities
Add support for SDE version 6.8.0.

Change-Id: I899be796f95dd63d2e3f0cecdb7693e94f5d17f3
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-06-09 16:00:16 +05:30
Ritesh Kumar
42ccb14154 disp: msm: dsi: Remove unused for loop in ESD reg read validation
In ESD register read validation, a for loop is used to increment a
local variable with the length of ESD command. But this is unused
in the validation of the read data. This change removes the unused
for loop.

Change-Id: I6d1a9233061ee33a2b5390e2f922a2412af7d605
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-06-07 00:52:18 -07:00
qctecmdr
e8b704e098 Merge "disp: msm: sde: fix imbalance power vote during cwb and dms concurrency" 2021-06-06 06:28:39 -07:00
qctecmdr
630d896ec6 Merge "disp: msm: sde: enable rotator in gki config for holi" 2021-06-03 15:41:13 -07:00
Jayaprakash Madisetty
dbe2279227 disp: msm: sde: fix imbalance power vote during cwb and dms concurrency
Imbalance power vote caused with below scenario:

1. Primary display running with CWB enabled.
2. Idle-PC has kicked in causing primary and cwb encoder to rc_idle state.
3. Post idle-PC with DMS switch enabled along with CWB.

Changes made are to avoid pre_modeset and post_modeset callbacks
for CWB encoder as it not required and it puts a unnecessary power
vote causing power issues in suspend usecase.

Change-Id: I95b7ba093484f50be5f575cafa63a02e8fbca441
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-06-03 17:09:11 +05:30
Andhavarapu Karthik
b7db20d3ca disp: msm: sde: update perf cpu dma latency votes on idle in video mode
In video mode for fps greater than 60, perf cpu dma latency votes
are not removed during idle fallback. Made changes to remove and
add the perf cpu dma latency votes during idle fallback and idle
exit scenarios respectively.

Change-Id: I8dffc743bd48c96a6022935f71057a0223d9696e
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-31 17:44:06 +05:30
Jayaprakash Madisetty
6cddd238e8 disp: msm: sde: remove fb's attached to a drm_file in preclose
This change avoids upstream drm issuing drm_atomic_commit in
drm_fb_release which is leading to artifacts on screen or
atomic_check failures due to atomically unstaging each fb
from plane_state and committing remaining planes on hardware.

 a) This patch moves the state operations for setting crtc to
    connector state to a helper api.
 b) This patch clears any dim_layers present in the crtc_state
    as part of null commit.
 c) This patch removes any framebuffers attached to a drm_file
    in msm_preclose whose refcount is not managed by composer kill
    inadvertently and issues null flush to hardware in such cases.
 d) This patch handles msm_preclose as part of msm_release
    operation since legacy feature is not supported
    for msm_driver.

Change-Id: Ib2068d74d4b23b73b7c84544858c9f6bb6adfa67
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-27 20:42:47 +05:30
Jayaprakash Madisetty
2c8aa84b33 Revert "disp: msm: sde: remove all preclose logic"
This change reverts commit ae2dceb0b6 ("disp: msm:
 sde: remove all preclose logic"). This change also
modifies the force disable plane logic since
__drm_atomic_helper_disable_plane is not exposed to
drivers.

Change-Id: I89e19dead9ade724798952b1934b45b5663e1a42
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-26 11:35:04 +05:30
qctecmdr
73b5bf579d Merge "disp: rotator: add rev checks for rotator for blair target" 2021-05-24 21:58:28 -07:00
qctecmdr
b23c21020f Merge "disp: msm: sde: add rev checks for blair target" 2021-05-24 21:58:28 -07:00
Yashwanth
29f312b5d9 disp: msm: sde: enable rotator in gki config for holi
This change enables offline rotator in holi target for
gki defconfig.

Change-Id: Ic128d46fc1cfa98b873c6edb3e1b5e10396b8954
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-24 15:58:30 +05:30
Andhavarapu Karthik
b7d7dbc6e7 disp: msm: sde: add register dumps to minidump
Add register dumps partition to minidump.

Change-Id: I587e5169747eb60780a698b0f7756bb52c9ef853
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-24 11:59:41 +05:30
Andhavarapu Karthik
cab792ba29 disp: msm: sde: aggregate all register dump memory allocation
In current implementation, register dump memory is allocated
separately for each range and block. When register dumps are
added to minidump, this will generate around 32 minidump bin files.
Changes are made to allocate all the required register dump memory
once. When register dumps are added to minidump, this will generate
only one minidump file.

Change-Id: I04d4d8db559f21f862f8989d3dfcfa7d9aef6dc5
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-24 11:45:23 +05:30
Venkata Prahlad Valluru
50da4227a1 makefile: add monaco config for display techpack
Add required changes to makefile and enable the config
keys for monaco target compilation.

Change-Id: I9cef5beb43abb257de913df62044f9c24bdf948f
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-05-21 01:29:16 -07:00
Venkata Prahlad Valluru
6acbb2dea4 disp: msm: typecast variables as long long for 64 bit operations
Define 64 bit variables as unsigned long long to ensure
8 bytes in 32 bit builds.

Change-Id: I723ae0c4ba6a0de07c92d14eeef95bde095c8e3d
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-05-21 01:28:59 -07:00
Venkata Prahlad Valluru
6eab43458e techpack: display: fix div64 error for 32 bit build
use div_u64 instead of /, for 64 bit division.

Change-Id: I791e027beb6817810d63a6a2d0a1a29f88bdb5d5
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2021-05-21 01:28:43 -07:00
Andhavarapu Karthik
ad69f4cc0c disp: rotator: add rev checks for rotator for blair target
Add revision checks required for rotator for blair
target.

Change-Id: I04b107b5c85a20585a473a0ace56be07b26a357f
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-21 12:13:30 +05:30
qctecmdr
41c8fc3cfe Merge "disp: msm: sde: modify in_clone_mode after wb_reset is done" 2021-05-20 05:52:33 -07:00
qctecmdr
8e46f0888f Merge "disp: msm: sde: correct num_datapath during PM resume with CWB" 2021-05-20 05:52:33 -07:00
Andhavarapu Karthik
c0951d16d0 disp: msm: sde: add rev checks for blair target
Add required revision checks for blair target.

Change-Id: Ib58bd498abcc85e07192265d40eb73a3d074ba1c
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-20 12:40:50 +05:30
Jayaprakash Madisetty
04f4d4028d disp: msm: sde: modify in_clone_mode after wb_reset is done
Add changes to modify the phys_enc->in_clone_mode variable
post wb_reset_state since this is a shared variable used
during atomic_check and atomic_commit. In current issue case,
wb_atomic_check has set in_clone_mode to true in commit N,
and in commit N-1 CWB is being disabled and re-sets the
in_clone_mode variable to false causing pp_done timeouts in
primary in commit N.

Change-Id: I8159bbdb5622a351d76bdc4dba75d48df20f4365
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-19 20:15:33 +05:30
Jayaprakash Madisetty
a799d5f7b6 disp: msm: sde: avoid seamless crtc transition when CWB is enabled
Add changes to avoid primary crtc seamless transition when CWB is
enabled in bootup first commit. This ensures atomic_enable gets called
for primary crtc in splash handoff commit and software states get updated.

Change-Id: I7faab3e4839ab6a69023790ee2874250091f32f0
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-18 17:41:33 +05:30
Jayaprakash Madisetty
6701a6127e disp: msm: sde: correct num_datapath during PM resume with CWB
In PM resume with CWB concurrency usecase, crtc pointer in
conn->state is NULL since drm_mode_config_reset operation is
performed on pm_resume. This change relies on conn_mask in
new_crtc_state for primary connector retrieval and also adds
get_num_lm_from_mode callback to DSI for LM count retrieval
from dsi panel topology. Existing get_mode_info api cannot
retrieve the topology info because mode->priv_info is NULL.
This occurs as WB encoder is added in the drm encoder_list
before primary encoder, introduced as part of commit d28ebf05f4
("disp: msm: sde: populate WB display encoder list before dsi").

Change-Id: I55358fd88ab778bd81475cf3628be13335de1cb5
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-18 13:08:57 +05:30
Anjaneya Prasad Musunuri
c93cae7d78 disp: msm: sde: remove feature from dirty list on validate failure
Remove feature from dirty list when feature validation fails.
This fixes recovery failure when feature validation fails in
atomic check operation.

Change-Id: I9a884520544c85d0f8ca6a954657f76b37856ad3
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
2021-05-06 11:23:01 +05:30
Yashwanth
bb6f15ba11 disp: msm: sde: flush commit thread queue during pm suspend
Following is the sequence during which issue is observed:

1) After suspend, resume commit is with doze suspend mode
(LP2) but kickoff didn't begin.
2) At the same time, runtime pm suspend is triggered which
makes idle request on pm suspend/resume thread.
3) Since the kickoff has not yet started on commit thread,
pending kickoff count is not updated and idle power
collapse sequence is started from pm suspend.
4) As part of idle, irqs are turned off from pm suspend
thread which are turned on commit thread after kickoff
before pp tx irq arrives.

In such cases, during pm suspend, commit thread workqueue
is flushed before encoder idle request to prevent irq's
from getting turned off before the transfer is complete to
avoid inconsistent state.

Change-Id: I417ece0ae7021b0fc5005e262a0d87e43ac729be
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-03 10:43:52 +05:30
qctecmdr
fbe759f998 Merge "disp: msm: sde: allow input fence status show only when kickoff in progress" 2021-04-28 09:25:50 -07:00
qctecmdr
132e98b1a5 Merge "disp: msm: avoid deadlock by prepending connection_mutex" 2021-04-28 09:25:49 -07:00
Andhavarapu Karthik
81b58ee731 disp: msm: sde: allow input fence status show only when kickoff in progress
Allow input fence status read only when crtc kickoff is in
progress to avoid race between status read and fence destroy.

Change-Id: I3402bfcb38940628f09f645a3cee31f821daeae9
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-04-28 16:10:19 +05:30
qctecmdr
ba930012ea Merge "disp: msm: sde: add reg log minidump partition" 2021-04-27 11:11:50 -07:00
Mahadevan
94f831f4cf disp: msm: avoid deadlock by prepending connection_mutex
Commit caused by dpms on may use extra  modeset lock on
connection_mutex before msm_atomic_commit, so to avoid
deadlock, make the modeset lock within msm_atomic_commit
to be used before the waiting for pending_crtcs_event.

Change-Id: Ic43af0f775d87ccc1d145ead9cb2e1b65018c86f
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-04-23 12:29:51 +05:30
Jayaprakash Madisetty
061744ebb0 disp: msm: sde: increase kickoff timeout for doze usecase
This change increases the kickoff timeout in doze and
doze suspend usecases. This avoids false timeouts seen
in doze due to rscc static wakeup configured at a different
fps from actual panel TE.

Change-Id: I11c94eb40d4dbbc3d95b8268b007580599ee90fd
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-04-23 12:10:27 +05:30
Andhavarapu Karthik
ae9f6d8dce disp: msm: sde: add reg log minidump partition
Changes are made to add reg log to minidump.

Change-Id: I703075ae22cfa0d987e4bb51ebc28dcdf13baa46
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-04-23 02:04:45 +05:30
Andhavarapu Karthik
361a8e3351 disp: msm: sde: add sde and vbif debug bus to minidump
Changes are made to add sde and vbif debug bus to minidump.

Change-Id: I8fc615c57e14bf2aa0b814ebda2270cd3124c794
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-04-22 22:31:34 +05:30
Andhavarapu Karthik
7ad0876fa7 disp: msm: sde: add evt log minidump partition
Changes are made to add wrapper function to add a minidump
partition. Also, to add evt log to minidump.

Change-Id: I1204a965bab9db72cb3d381a2817dbe8ef723c66
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-04-22 22:29:43 +05:30
qctecmdr
7c7bd0d4f9 Merge "disp: msm: sde: avoid using spinlock for register log" 2021-04-16 23:00:16 -07:00
qctecmdr
aa52bf2dbd Merge "disp: msm: sde: fix tracking of pending rsvps" 2021-04-16 23:00:16 -07:00
qctecmdr
cc95761e56 Merge "disp: msm: dp: inform multi-func support to usb driver" 2021-04-16 23:00:15 -07:00
qctecmdr
c27837e496 Merge "disp: msm: sde: perform only soft reset during timeout scenarios" 2021-04-06 07:15:27 -07:00