Commit Graph

3140 Commits

Author SHA1 Message Date
Veera Sundaram Sankaran
e972b51d5c disp: msm: sde: reset wb output crop during cwb disable
Reset the wb crop configs from hardware, while disabling
concurrent writeback. This avoids stale configs which
affects the subsequent writeback session.

Change-Id: I4927effd0650bcdca2852a5d72c3e5478683a90f
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-01 15:17:05 -07:00
qctecmdr
b7c83aa3f8 Merge "disp: msm: sde: fix cwb output res with DS & demura tap point" 2022-07-26 16:45:31 -07:00
Veera Sundaram Sankaran
5df608899c disp: msm: sde: fix cwb output res with DS & demura tap point
Add the missing concurrent writeback output resolution setting,
when destination scaler is enabled with demura tap point.
Additionally, move the dnsc_blur enabled check to the top as
that takes precedence.

Change-Id: Id0e851703ce6e1d8b7caffcdda69d7757222fc59
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-07-25 11:39:04 -07:00
Amine Najahi
dd6baeb265 disp: msm: sde: fix UBWC stat error log format
Fix UBWC stat error log format to match number of arguments.

Change-Id: I08f1b7a13e370dc7cf3a5a9fc11c089f69e742b5
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-07-25 08:05:57 -07:00
qctecmdr
ceaaff1fbd Merge "disp: msm: sde: avoid PM suspend/resume if display has splash enabled" 2022-07-24 05:56:34 -07:00
qctecmdr
2366eef20d Merge "disp: msm: sde: correct the sde vm release sequence" 2022-07-24 01:04:34 -07:00
qctecmdr
57cd9e59bc Merge "disp: msm: sde: avoid null pointer dereference" 2022-07-23 20:11:28 -07:00
qctecmdr
4f29acc9bc Merge "disp: msm: sde: set connector lm_mask for dp display" 2022-07-23 11:09:57 -07:00
qctecmdr
4e94573c28 Merge "disp: msm: sde: fix cwb lm allocation failures in RM" 2022-07-23 06:39:23 -07:00
Jayaprakash Madisetty
60053c51bc disp: msm: sde: avoid PM suspend/resume if display has splash enabled
With speculative retire fence, the first commit from HAL depends
on crtc power_on event instead of retire fence signal to unblock
the wait completion. Hence avoid triggering PM suspend/resume if
any of the displays have continuous splash enabled. This will avoid
any state changes in drm_atomic_state and will be inline with
HAL expectation.

Change-Id: I97360e3815651eefdd7e2c1494fa6e882df883b5
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2022-07-22 15:01:13 -07:00
Grace An
69c0f721c5 disp: msm: sde: add ctx_id to debug message in sde_fence_signal
Print the fence's ctx_id in debug message for timeline reset attempt.

Change-Id: I920105e8e6a088b82fcfeec1be6ba60bac24b02f
Signed-off-by: Grace An <quic_gracan@quicinc.com>
2022-07-22 07:15:45 -07:00
Raviteja Tamatam
7fa611f44f disp: msm: sde: correct the sde vm release sequence
IRQ release needs to be done before mem release as
there can be cases in current implementation where
irq can come just after mem release casuing register
access abort.

Change-Id: If35eef9ae01d5bd3d270aba0bf4f2b8753254a15
Signed-off-by: Raviteja Tamatam <quic_travitej@quicinc.com>
2022-07-22 07:15:13 -07:00
qctecmdr
bb9ced8cb4 Merge "disp: msm: sde: add additional WB roi checks" 2022-07-21 23:29:53 -07:00
qctecmdr
103e0a9e6e Merge "disp: msm: sde: proper allocation of dcwb for LMs" 2022-07-21 23:29:53 -07:00
qctecmdr
fc1fc33286 Merge "disp: msm: sde: fix dcwb idx selection for pp_dither and CTL blocks" 2022-07-21 23:29:53 -07:00
qctecmdr
e0cfa529b2 Merge "disp: added environment variable for build.sh techpack display_tp" 2022-07-20 22:22:45 -07:00
Veera Sundaram Sankaran
f1033619c5 disp: msm: sde: add additional WB roi checks
Add check to validate the writeback roi against mode width & height.
When dnsc_blur, destination_scaler, cwb features are not enabled,
the roi should match with mode width & height.
Additionally, add error log for case where dnsc_blur is set without
the HW block reservation.

Change-Id: I9199d5b127eed892ea134f830ecd6f690cb70f77
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-07-20 21:28:03 -07:00
Veera Sundaram Sankaran
84d43e8596 disp: msm: sde: add check for layer-mixer width
Add check in layer mixer to avoid odd values as HW does not
support it.

Change-Id: Ifddd2047c81a016b774712ee52cfceca83374e6d
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-07-20 21:27:54 -07:00
qctecmdr
2a3b371021 Merge "disp: msm: sde: add wait on spec fences for hwfencing" 2022-07-20 16:11:13 -07:00
Mahadevan
62cab75164 disp: msm: sde: set connector lm_mask for dp display
This change sets lm_mask for dp connector based on
number of LMs allocated by RM. This mask will be
used during rm allocation and validation of dcwb
mixers for dp display.

Change-Id: I271af03da560587faf17446471bd6b81bb9e809b
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2022-07-20 14:42:20 +05:30
Mahadevan
a1f4bdb7d9 disp: msm: sde: fix cwb lm allocation failures in RM
This change corrects the conditional check in commit 2859b760a414
("disp: msm: sde: proper allocation of dcwb for LMs") with respect
to DCWB mixer allocation in RM.

Change-Id: I83fd39ed366774f20046b8f9c0e6959116b541ee
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2022-07-20 00:49:20 -07:00
Mahadevan
04edecd269 disp: msm: sde: proper allocation of dcwb for LMs
During dcwb mixer allocation, resource manager allocates
the first available mixer in the free list. In dual display
uses case with 1 1 1 topology if only secondary is running
CWB then, resource manager allocates DCWB0 which leads to wb
timeout due to HW does not have the connection between LM1
and DCWB0. This change allocates proper dcwb for the LMs in RM.

Change-Id: I0c8b04b46ccad5a7d7dd591fbfa3ea0915eccdc6
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2022-07-20 13:16:42 +05:30
Mahadevan
6bb958c88b disp: msm: sde: fix dcwb idx selection for pp_dither and CTL blocks
When cwb is triggered on built-in display secondary display
with (1,1,1) topology, improper dcwb_idx value is passed
to pp_dither and CTL registers. This change populates proper
dcwb_idx during pp block dt parsing and passes the same for
programming.

Change-Id: I543eede6f5fd9c2c80799503e3639ea9e89058ca
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2022-07-20 12:43:13 +05:30
Ashwin Pillai
54f7210b1d disp: added environment variable for build.sh techpack display_tp
add a environment variable to build msm_drm for build.sh techpack
display_tp.

Change-Id: I530c4fef3c2bf6aa06f87ca3df46d1f155a91f3a
Signed-off-by: Ashwin Pillai <quic_ashwpill@quicinc.com>
2022-07-19 13:29:45 -04:00
qctecmdr
887b222de9 Merge "drm/msm: don't allocate pages from the MOVABLE zone" 2022-07-18 07:31:35 -07:00
qctecmdr
aff5c915e2 Merge "disp: msm: sde: add tx wait for WB display during modeset" 2022-07-18 07:31:34 -07:00
qctecmdr
c439d2fadc Merge "disp: msm: sde: update atomic check for VM_ACQUIRE state" 2022-07-17 21:59:39 -07:00
qctecmdr
0f8cbff9c7 Merge "disp: msm: avoid cwb on esd recovery commit" 2022-07-17 21:59:38 -07:00
Linux Build Service Account
f6df1dc160 Merge "disp: msm: sde: update uidle ctl register only for master encoder" into display-kernel.lnx.5.15 2022-07-17 12:56:32 -07:00
Linux Build Service Account
6be14b68be Merge "disp: msm: sde: Fix data width calculation when widebus is enabled" into display-kernel.lnx.5.15 2022-07-17 12:56:31 -07:00
Linux Build Service Account
b08fbb8ed4 Merge "disp: msm: sde: update encoder wait event timeout condition" into display-kernel.lnx.5.15 2022-07-17 12:55:31 -07:00
Linux Build Service Account
4ba5377d5f Merge "disp: msm: sde: avoid clear_pending_flush on hw_ctl during power_on commit" into display-kernel.lnx.5.15 2022-07-17 12:55:30 -07:00
Yashwanth
ccea75e206 disp: msm: sde: update atomic check for VM_ACQUIRE state
This change updates atomic check for VM_ACQUIRE transition
only for android VM since in trusted VM, vm_owns_hw is
updated asynchronously. This change fixes atomic check
failures seen with commit ea9696a769d3 ("disp: msm: sde:
update atomic check for VM_REQ_ACQUIRE state").

Change-Id: I951e41490c01b543b591c0bbe2700fd8eea39c78
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-07-15 05:02:04 +05:30
Narendra Muppalla
8d8d5c1b74 disp: msm: sde: avoid null pointer dereference
This change avoids null pointer dereference in encoder kickoff.

Change-Id: I83c2c6f327ffb367a1cf5fc3a6cf0309a1187441
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-07-14 11:52:05 -07:00
Lucas Stach
f42f76d31b drm/msm: don't allocate pages from the MOVABLE zone
The pages backing the GEM objects are kept pinned in place as
long as they are alive, so they must not be allocated from the
MOVABLE zone. Blocking page migration for too long will cause
the VM subsystem headaches and will outright break CMA, as a
few pinned pages in CMA will lead to failure to find the
required large contiguous regions.

Change-Id: I5eba32fc8a2730eac29668dbd96aaf8f04ac155f
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: 0abdba47dc1df708c365421d481734d3f7fecb01
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-07-12 14:18:14 -07:00
Christina Oliveira
15e352d634 disp: msm: sde: add wait on spec fences for hwfencing
This change adds a wait for input spec fence to bind
before registering for hw fencing wait on it.

Change-Id: I5453547c29672e39a95b91197983075e3b61d1eb
Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
2022-07-12 10:53:03 -07:00
Lei Chen
6f17f3e63e disp: msm: sde: add tx wait for WB display during modeset
Add tx wait for WB display during modeset to avoid unbalanced
IRQ handle.

Change-Id: I18337e2a06fe5ec98d4d6e6d766abbf4ec585703
Signed-off-by: Lei Chen <quic_chenlei@quicinc.com>
2022-07-06 19:26:11 -07:00
Mahadevan
8f64b5283a disp: msm: avoid cwb on esd recovery commit
This change depends on HAL change which sets CONNECTOR_SET_CRTC
property to null for cwb conn, if cwb is enabled during esd failures.
This causes power off commit crtc_state's active_changed and
connectors_changed set to true, which is causing seamless_crtc
to true during msm_disable_outputs and this leads to invalid crtc
state. This change modifies the seamless_crtc condition and
the msm_crtc_set_mode callback is early returned during such cases
to power off crtc.

Without this change, crtc_disable is not called which avoids
SDE_FENCE_RESET_TIMELINE. On esd failure release fence is not
signaled for the planes used in the composition and this further
leads to GPU wait on release fence and causes fence timeout.

Change-Id: Ie5d8f1b99d6a2d335330331288223fbeba9f6e64
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2022-07-05 09:21:58 -07:00
Yashwanth
2b4adfd6d3 disp: msm: sde: update uidle ctl register only for master encoder
In case of dual dsi usecase, since both the encoders use
the same CTL path, this change ensures that uidle ctl
settings are updated only by the master encoder.

Change-Id: Ic47703aeee69999b4535034b5cd7a65cf53cd0fb
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-07-05 09:21:51 -07:00
Kashish Jain
082c1cfd34 disp: msm: sde: Fix data width calculation when widebus is enabled
Adjust the data width calculation to reduce the rounding off error
when the widebus is enabled.

Change-Id: Ia2fa4536ce519548989e2befcb22fb685f286c9e
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2022-07-05 09:19:44 -07:00
Yashwanth
a5e9316dd1 disp: msm: sde: update encoder wait event timeout condition
The sequence during which issue is observed:

1) wb pending_retire_fence_cnt is equal to 2 due to which
it waits for WB_DONE irq. Current pending_retire_fence_cnt
is 2 and required pending_retire_fence_cnt is 1.

2) Due to external reasons, irq's are disabled and after
some duration, back to back irq's are received.

3) Because of this, pending_retire_fence_cnt becomes zero
before the commit thread could wakeup and validate the
condition.

sde_encoder_helper_wait_for_irq API will wait for complete
timeout due to the count mismatch. This change adds
required check to early exit in such usecases.

Change-Id: I4f9c817cc7acee17424b77928d34b039afcaeae5
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-07-05 09:18:11 -07:00
Jayaprakash Madisetty
e09db6e5c2 disp: msm: sde: avoid clear_pending_flush on hw_ctl during power_on commit
CTL datapath idx can be switched between secondary and external displays
as per current SW code. This change avoids the clearing the SW flush ctx
in prepare_commit during resume use case. It fixes the GPU fence timeouts
seen during below scenario.
Issue scenario:
1. Primary display was using CTL_0 and it is reserved.
2. Secondary display was using CTL_1 and suspend occurred.
   CTL_1 is added to RM free list.
3. When external Display is connected, it starts using CTL_1
   datapath.
4. Secondary display is resumed and it starts using CTL_2.
   During prepare_commit, phys_enc->hw_ctl was CTL_1 and
   SW is clearing the flush ctx of external Display.
5. Since CTL_1 flush bits are cleared, SW is not programming the
   CTL_FLUSH register for this composition and release/retire fences
   are not signaled causing fence timeouts at GPU end and Input fence
   timeout at display end finally leading to SF hung.

Change-Id: Ic843ce5c4f06f1620636abd24d443952c2ba8dc5
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2022-07-05 09:17:10 -07:00
Yashwanth
c5ed579309 disp: msm: sde: update atomic check for VM_REQ_ACQUIRE state
Following is the sequence during which issue is observed:

1) HAL sends a commit with VM_REQ_RELEASE property set
indicating transition from primary vm to trusted vm.

2) Before the transition commit ends, there is atomic check
for next commit from HAL with VM_REQ_ACQUIRE property
indicating transition from trusted vm to primary vm.

3) Since the HW is currently owned by the primary vm, it
performs a early return during check phase. After this,
transition has occurred from primary to trusted and when
the next commit is scheduled on primary, it results in
crash since it is currently not the owner.

This change adds necessary to check avoid commit with
VM_REQ_ACQUIRE state before the transition.

Change-Id: I4650305a95ef6bc495375a21a799522e67a61883
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-07-05 09:15:37 -07:00
Amine Najahi
080a91084f disp: msm: sde: force RC mask revalidation during mode switch
Force rounded corner mask revalidation during mode switch.

Change-Id: I4037290b91885dfa16357f43685d7fd894b301c4
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-07-05 08:47:14 -07:00
qctecmdr
7b00783abe Merge "disp: msm: sde: add support for display emulation on RUMI." 2022-06-29 19:02:15 -07:00
qctecmdr
ce6075722c Merge "disp: msm: dp: get DSC enable status from mode instead of panel" 2022-06-29 19:02:15 -07:00
qctecmdr
9e12009b20 Merge "disp: msm: change log level from error to debug for smmu cb not found" 2022-06-29 19:02:15 -07:00
qctecmdr
1e237c1bf8 Merge "disp: msm: sde: avoid ctl switch allocation in RM" 2022-06-27 11:31:24 -07:00
qctecmdr
ab147526dc Merge "disp: msm: dsi: change hs timer control to fix timeout issue" 2022-06-27 06:51:28 -07:00
qctecmdr
96488f7e23 Merge "disp: msm: sde: handle vsync wait status check during timeout" 2022-06-26 21:14:57 -07:00