Commit Graph

3105 Commits

Author SHA1 Message Date
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
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
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
Sandeep Gangadharaiah
d333d97bd6 disp: msm: dp: get DSC enable status from mode instead of panel
DSC enable status is updated in DP panel struct as per the DPCD reg
read which is done at the start of the HPD ISR. However, there is a
chance that DSC is actually disabled later during mode query due to
shortage of DSC blocks. This status is stored as part of compression
info structure. This change checks for the latter struct to determine
the actual DSC status.

Change-Id: Id7cd4e65060f2ec939f945e9ac4f4e66260605d3
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-06-23 13:19:07 -07:00
Jayaprakash Madisetty
e807595bec disp: msm: sde: avoid ctl switch allocation in RM
This change detects if a encoder has a CTL datapath allocated
and Resource manager is allocating a different CTL block and
avoids this switch. If the CTL datapath switch is allowed, pp_done
timeouts are seen in HW. The reason is due to crossbar is confused
due to the "XSEL" values that are present in previous CTL_*_LAYER_* are
not cleared and SW needs to issue a NULL db update to reset these
"XSEL" values when switching the CTL path.

Change-Id: Iee70c7ddb06feb5cea6dc9f147a942f80c48a7da
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2022-06-22 15:08:09 -07:00
Narendra Muppalla
8e56380537 disp: msm: change log level from error to debug for smmu cb not found
This change moves the SMMU context bank not found log from error
to debug as some of the context-banks like nrt-sec/nrt-unsec
are expected to be not available for most of the targets.

Change-Id: If60e83ae8088a484b4ea02f527ce2a8f43573e17
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-06-22 10:25:51 -07:00
Yahui Wang
a7378dcdf5 disp: msm: dsi: change hs timer control to fix timeout issue
The hs timer control settings can't match with dsi data transfer
requirement, so it may lead to timeout issue when running into low
frame rate, update this change to fix such issue for 30hz display
mode.

Change-Id: I01942a494f46e0023061a9d307a9d2ca1fd8159a
Signed-off-by: Yahui Wang <quic_yahuiw@quicinc.com>
2022-06-21 18:05:04 -07:00
Amine Najahi
0682377d91 disp: msm: sde: wait for active region only on DSI panel
DCS commands are not supported on DP displays, thus there is
no need to wait for active region to start before triggering
a DCS command which can cause additional latency during power
ON use case.

This change skips the active region wait for non DSI panels.

Change-Id: I50c6b808f839468bda74b13d7a75e8410d81dd0d
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-06-21 13:46:12 -07:00
Veera Sundaram Sankaran
4672a64057 disp: msm: sde: handle vsync wait status check during timeout
When VSYNC interrupts are delayed due to irq latencies, there is a
possibility that the timeout handler checking the irq status and the
irq handler clearing the status bit happening at the same time on
different CPU cores. This is reported as an error, though there is
not actual issue. Handle this case, by adding an additional ctl-flush
register check in the vsync timeout handler. As part of the change
add error/eventlogs in commit-done wait failures.

Change-Id: Ie7e30dc4ef1e50651cee9015cd3f2caeacf47e5f
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-06-21 13:13:20 -07:00
qctecmdr
3f859c78b5 Merge "disp: msm: dp: add debug logs to ipc logging" 2022-06-20 23:22:02 -07:00
qctecmdr
90276a462e Merge "disp: msm: dsi: add missing dsi ctrl mutex lock in host timing update" 2022-06-19 05:49:38 -07:00
qctecmdr
f95cbe3c9d Merge "drm: msm: update lfc config for demura" 2022-06-17 12:37:50 -07:00
qctecmdr
0a3a317bf1 Merge "disp: msm: sde: avoid demura layers validation against crtc w/h" 2022-06-15 07:44:02 -07:00
Linux Build Service Account
f9dd358ebe Merge "disp: msm: dsi: avoid DSI pll codes parsing in TVM" into display-kernel.lnx.5.15 2022-06-14 22:36:55 -07:00
Nisarg Bhavsar
15b7e73a10 disp: msm: dp: add debug logs to ipc logging
Add existing debug logs to ipc logging to be
accessed through debugfs.

Change-Id: Id9bfe61cb7921674eadc5635847c81a0fbdaef5c
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-06-14 17:09:54 -07:00
Veera Sundaram Sankaran
90dd259f15 disp: msm: sde: avoid demura layers validation against crtc w/h
When destination scaler feature is enabled along with demura,
the crtc w/h will be lesser than the deumra layer w/h as it is
based on the panel w/h. Remove the invalid validation of
demura layers against crtc w/h to allow this usecase.

Change-Id: I5afd0407382a1bce458c97fcf8d571f5e7c0774f
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-06-14 10:20:13 -07:00
Gopikrishnaiah Anand
eab1384866 drm: msm: update lfc config for demura
If LFC of demura is disabled, there are few parameters that needs to be
set in demura hardware block. Change ensures that the mandatory params
are set.

Change-Id: Ia2b7d80ccc60c19b7106ed417e7803a205bef6ff
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2022-06-13 10:28:21 -07:00
qctecmdr
38142ed0a7 Merge "disp: add support to compile out display kernel module" 2022-06-12 22:32:38 -07:00
Raviteja Tamatam
639f00c277 disp: msm: dsi: avoid DSI pll codes parsing in TVM
pll_codes_region is not defined on TVM and not programmed.
So, adding TVM check to avoid parsing pll code data.

Change-Id: Ia6280ca3fc1b19866673a6767de465d17681add7
Signed-off-by: Raviteja Tamatam <quic_travitej@quicinc.com>
2022-06-10 11:18:48 -07:00
qctecmdr
254a35a419 Merge "disp: msm: avoid crtc seamless check if active_changed is set" 2022-06-10 02:36:46 -07:00
Veera Sundaram Sankaran
11e5454e4a disp: msm: sde: add out of bounds check for dnsc_blur & wb cache
Add bound check for number of dnsc_blur blocks, while parsing from
device tree. Fix out of bound access while setting the llcc_active
during system cache disable case in writeback.

Change-Id: I7e604db5ebfaa6e8b6f066e0f6efb76e7d78e604
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-06-09 11:33:03 -07:00
Prabhanjan Kandula
c51efa7c3a disp: add support to compile out display kernel module
This change provides required support to disable display module
compilation along with all modules and supports module specific
override to enable compilation if required.

Change-Id: I38acdce4083e38245eb6285c99d5dbbd15911fbb
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2022-06-08 13:00:28 -07:00
Amine Najahi
11672b46fc disp: msm: sde: add support for display emulation on RUMI.
Add support display emulation targets on RUMI

This change does the following:
-parse dt node to enable display emulation mode.
-use sde_reg_read for pool timeout ops and debug fs dump.
-increases the kickoff timeout when emulation is enabled.
-bypass AXI halt operation when emulation is enabled.

Change-Id: Idc493964c0b8fc89f5d85fcc5755e0874a12d211
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-06-08 15:20:46 -04:00
Veera Sundaram Sankaran
13cc91eee9 disp: msm: avoid crtc seamless check if active_changed is set
Currently, _msm_seamless_for_crtc returns true when multiple connectors
are attached to the old_crtc_state and connector_changed flag is set.
The crtc disable is skipped due to this check when the suspend request
comes with primary + cwb. This makes the sde crtc out of sync between
user-mode and driver. Fix this by avoiding crtc seamless check when
active_changed is set as in those cases, crtc enable/disable has to
executed.

Change-Id: Ibe4e3996009712d3bd6a13651b051d5e89ec131a
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-06-07 13:30:22 -07:00
qctecmdr
249b73b0c7 Merge "disp: msm: sde: override tearcheck rd_ptr_val when qsync is enabled" 2022-06-07 09:42:49 -07:00
qctecmdr
9c84b15b00 Merge "disp: msm: dsi: move warn to info if secondary panel is not assigned" 2022-06-07 09:42:49 -07:00
qctecmdr
22914338db Merge "disp: msm: sde: add missing validations for dnsc_blur" 2022-06-06 20:57:56 -07:00
qctecmdr
38f3aa63db Merge "drm: msm: allow opr_en in spr bypass mode" 2022-06-05 19:40:43 -07:00
Jayaprakash Madisetty
a6658ee7e9 disp: msm: sde: override tearcheck rd_ptr_val when qsync is enabled
When qsync is enabled with a large threshold start window, there
is a chance that two frames can be latched by mdp HW in single
vsync window. This change overrides the tearcheck rd_ptr_val
to a value larger than the end of the Tear check start window
to ensure new frame is not latched in current vsync window.

Change-Id: I21273f0bca83747210792b911e964dfd2d50079f
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-06-01 11:33:01 -07:00
Narendra Muppalla
8edcc604f3 disp: msm: dsi: move warn to info if secondary panel is not assigned
This change moves warning log to info log if secondary default panel
is not available.


Change-Id: Iad420a05c6440afdf0fcc5f7d33197eaf5c158c4
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-06-01 10:42:26 -07:00
Srihitha Tangudu
ad4b936b50 disp: msm: dsi: turn on the PLL before switching RCG parent during clk on
When display is left on from the bootloader, disp_cc driver will put a
proxy vote on clocks to maintain the hardware configuration of bootloader.
Once all the consumers have been probed, the dispcc driver will synchronize
the hardware state of the device to match the aggregated software state
requested by all the consumers using sync_state call.

If there is an idle power collapse or a suspend before sync state call,
branch clocks and in turn RCG will not get turned off during clocks
disable sequence because of the proxy vote of disp_cc driver. This can be
the case even if there is a vote from any other disp_cc consumers.

During a subsequent call to enable the clocks from DSI driver, we are
currently switching RCG parent to PLL and then turning on the PLL.
If the sync state call doesn't happen before we enable the clocks back,
we'll be setting PLL which is off as a parent to RCG that is on.
But ideally when RCG is on, both the old and new sources should be on
while switching the RCG parent.

Avoid this by turning on the PLL before switching RCG parent during clock
enable sequence.

Change-Id: I1597cf2c8095957cd2b2a20a72bf7199e0d61809
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-05-29 20:49:45 -07:00
Ping Li
e8befa9d12 drm: msm: allow opr_en in spr bypass mode
Allow user to enable opr in spr bypass mode.

Change-Id: I3783a37334ffd0ee66bdd552bf93feee64c286c9
Signed-off-by: Ping Li <quic_pingli@quicinc.com>
2022-05-27 14:03:09 -07:00
Rajeev Nandan
d26a3a480e disp: msm: dsi: add missing dsi ctrl mutex lock in host timing update
Acquire dsi_ctrl->ctrl_lock lock before programming dsi ctrl
registers. Failing this may lead to race conditions in register
programming.
Add missing mutex lock inside dsi_ctrl_host_timing_update().

Change-Id: Ic86cbe282333c0b4d63ae3d5b3356a5d24752203
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
2022-05-26 21:50:47 -07:00
Veera Sundaram Sankaran
30aa675422 disp: msm: sde: add missing validations for dnsc_blur
Add crtc checks to ensure the crtc width is always even number,
so there is no loss while dividing by num_mixers. Add checks in
dnsc_blur to ensure the src is always greater than the dest.

Change-Id: I876f19aa20857dc9ed2649c9cb7569348e7d5fd3
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-05-26 16:17:16 -07:00
Amine Najahi
f2ebcab793 disp: msm: sde: add support for LUTDMA VBIF clock split
Add support for localized CLK_CTRL access through LUTDMA
hardware block.

This change aggregates RD/WR LUTDMA CLK_CTRL in a single
ops.

Change-Id: Id5c24bebf7dfcd9f768b2a6f6fa03f8b01747354
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2022-05-26 17:20:10 -04:00
qctecmdr
0c0cf5f2ca Merge "disp: msm: remove parsing deep color modes in sde parser" 2022-05-25 04:41:51 -07:00
qctecmdr
8c4fd05ac2 Merge "disp: msm: send power_on event in dual display composer kill scenario" 2022-05-25 04:41:49 -07:00
Linux Build Service Account
74a51b65a7 Merge "disp: msm: dsi: pass DRM_BRIDGE_ATTACH_NO_CONNECTOR during bride attach" into display-kernel.lnx.5.15 2022-05-24 20:32:33 -07:00