Commit Graph

3455 Commits

Author SHA1 Message Date
Anand Tarakh
60cdf3a505 disp: msm: dsi: use ctrl cell index to set frequencies for link clks
To set frequencies for link clks, the clk manager index of
ctrl is require. Use ctrl cell index to get clk manager index.

Change-Id: I175d0721e672fb4d368349584c8b448ba63f4224
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-04-23 22:27:53 -07:00
Linux Build Service Account
adb0083d20 Merge 5215f2a6dd on remote branch
Change-Id: Ie73340811ca6428287de369c87662de5912f1647
2023-04-18 10:24:31 -07:00
qctecmdr
5215f2a6dd Merge "disp: msm: dp: check for atomic phase" 2023-04-06 23:16:19 -07:00
qctecmdr
fde61c48a4 Merge "disp: msm: sde: avoid white color solid fill staging on input fence timeout" 2023-04-06 23:16:19 -07:00
qctecmdr
8d51ce3720 Merge "disp: msm: sde: update idle_pc_duration based on frame rate" 2023-04-06 23:16:19 -07:00
qctecmdr
8903db36e4 Merge "disp: msm: dsi: add mutex lock before link clock frequency update" 2023-04-05 17:11:31 -07:00
qctecmdr
e389dfe5db Merge "disp: msm: sde: signal cwb retire fence on cwb overflow" 2023-04-05 17:11:31 -07:00
qctecmdr
d883854ebb Merge "disp: msm: sde: avoid idlepc power collapse for wfd display" 2023-04-05 17:11:31 -07:00
Linux Build Service Account
145f965b5e Merge 48fb12268c on remote branch
Change-Id: Ic84c1e7fac51488c00858a4a25b39143ec6085ba
2023-04-04 04:54:30 -07:00
Anand Tarakh
e4a6f53bff disp: msm: dsi: add mutex lock before link clock frequency update
Acquire mngr clk_mutex before updating link clock frequencies.
Failing this may lead to race around condition while setting the
link clock frequency rates.
Make sure byteclk and pclk rates of PLL are configured according
to clock manager and not the controller.

Change-Id: I2cd26e659ce166d5bc55eb6c060672eeee192bea
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-04-03 12:22:40 +05:30
Mahadevan
0e2b3d56a2 disp: msm: sde: signal cwb retire fence on cwb overflow
In the current SW, cwb overflow interrupt is not enabled for
mid and low tier targets due to which CWB retire fence is
not signaled, causing HWCBufferSyncHandler SyncWait timeouts
on fence. This change enables the cwb overflow interrupt
always to detect the overflow and signal the retire fence in
such cases.

Change-Id: I4841814d91bcd7b31f00554da6b2369078ce4693
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-03-31 01:40:49 +05:30
Yojana Juadi
5ce42a7435 disp: msm: sde: update idle_pc_duration based on frame rate
This change updates the time required to enter idle_pc based
on frame rate instead of default time. In the current issue,
customer is facing janks where frame rate is 30fps and race
happens between sde_encoder_off_work and drm_atomic_commit
scheduled from userspace. It also sets max and min bound for
optimized performance.

Change-Id: I5e95e920a2f7b2142b5f63e8ce6b82cf1d482db1
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-03-29 23:30:08 +05:30
qctecmdr
23fdd8a2b3 Merge "disp: msm: dp: release vcpi slots for a modeset change for crtc state" 2023-03-29 05:34:35 -07:00
qctecmdr
db39de879f Merge "disp: msm: sde: increase buf array size" 2023-03-29 05:34:35 -07:00
Mahadevan
ec4f833666 disp: msm: sde: avoid white color solid fill staging on input fence timeout
The issue is as follows:
Commit N:
   1. VIG sspp qseed block programmed through lutdma. LUTDMA packet with
      (ram offset, length_0) is queued to internal HW queue to enable
      scaler.
   2. Input_fence timeout seen on VIG plane.
   3. White color solid fill layer staged on VIG plane.
   4. Disable VIG sspp qseed block through LUTDMA. LUTDMA packet is queued
      by overriding buffer with (ram offset, length_1) to internal HW queue
      to disable scaler.
   5. Trigger_flush is picked by HW on vsync.

Since 2 LUTDMA packets are queued on single vsync boundary pp_done timeout
with lutdma HW hang is seen. The only way to fix this is to reset LUTDMA
in step4 and then flush the Hardware. The current SW does not support this
reset sequence, so the change avoids staging solid fill on input fence
timeout.

Change-Id: Ia243e42c863f56b11bee5aeed2dd434efcbd5d75
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-03-29 12:57:26 +05:30
qctecmdr
7fd3e052b3 Merge "drm: msm: skip re-marking color processing features as dirty" 2023-03-28 17:15:47 -07:00
Soutrik Mukhopadhyay
9ce2a6a09d disp: msm: dp: check for atomic phase
This change checks for the atomic state and ensures
that allocation and deallocation of vcpi slots is
prevented in the same phase.

Change-Id: I05c87db43eca8ba749ed8a0907dcaf95945dd645
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-03-28 10:33:21 +05:30
qctecmdr
428f30bc92 Merge "disp: msm: sde: add input handler unregister check before encoder wakeup" 2023-03-24 07:35:21 -07:00
qctecmdr
50d75b078f Merge "disp: msm: dsi: improve logs for dual display case" 2023-03-24 07:35:21 -07:00
Mahadevan
c5f6aecbbf disp: msm: sde: avoid white color solid fill staging on input fence timeout
The issue is as follows:
Commit N:
   1. VIG sspp qseed block programmed through lutdma. LUTDMA packet with
      (ram offset, length_0) is queued to internal HW queue to enable
      scaler.
   2. Input_fence timeout seen on VIG plane.
   3. White color solid fill layer staged on VIG plane.
   4. Disable VIG sspp qseed block through LUTDMA. LUTDMA packet is queued
      by overriding buffer with (ram offset, length_1) to internal HW queue
      to disable scaler.
   5. Trigger_flush is picked by HW on vsync.

Since 2 LUTDMA packets are queued on single vsync boundary pp_done timeout
with lutdma HW hang is seen. The only way to fix this is to reset LUTDMA
in step4 and then flush the Hardware. The current SW does not support this
reset sequence, so the change avoids staging solid fill on input fence
timeout.

Change-Id: Ia243e42c863f56b11bee5aeed2dd434efcbd5d75
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-03-23 23:37:36 -07:00
Lakshmi Narayana Kalavala
e6fa122c20 drm: msm: skip re-marking color processing features as dirty
Current implementation we apply the color properties when atomic begin
is called and mark features as dirty if crtc is not enabled.
For some of the non double buffered features in video mode we will
see a corruption. Change removes marking color properties as dirty
based on crtc on/off.

Change-Id: I4d93b14627d2bc06fcbca3ea9538a4baedb00e56
Signed-off-by: Lakshmi Narayana Kalavala <quic_lkalaval@quicinc.com>
2023-03-23 14:36:48 -07:00
Soutrik Mukhopadhyay
131c0f8604 disp: msm: dp: release vcpi slots for a modeset change for crtc state
In MST atomic check function, allow to release vcpi slots for
any case of changes in modes, active state or connectors for a crtc state.
This reverts the commmit id 28cde80bd3.

Change-Id: Ice13790f2e652b336619e1d78b42ddb708b4cb2e
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-03-21 10:23:07 +05:30
qctecmdr
48fb12268c Merge "disp: msm: sde: out of bounds check for phys_encs array" 2023-03-20 03:49:13 -07:00
Jayaprakash Madisetty
2c2f2d3448 disp: msm: sde: add input handler unregister check before encoder wakeup
During PM suspend in dual display usecase, the power off commit to
turn off primary and secondary crtcs is done with only one
drm_atomic_state scheduled on primary crtc_commit thread. At the
same, touch events can happen on secondary panel, which will
run input_event_work and schedule the sde_enc->delayed_off_work
to turn off its enabled resources. There can be race between primary
crtc_commit thread which unregisters input_event, cancels
all the pending works before setting sde_enc->cur_master to NULL
and input_event_work_handler which schedules the delayed_off_work
without checking the input_event_handler state.
This change adds input handler unregister check before triggering
_sde_encoder_rc_early_wakeup.

Change-Id: I553843f81078810784f18e92347f918ab6e4a9fe
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2023-03-20 02:24:02 -07:00
Ayushi Makhija
53bfeabc6d disp: msm: dsi: improve logs for dual display case
Improve logs for dual display case to differentiate between
primary and secondary display.

Change-Id: I8947ddcdce3f75095f4d74143ef8256ed5dd5b7d
Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
2023-03-20 11:23:03 +05:30
Linux Build Service Account
e9f70aadad Merge 132458ad67 on remote branch
Change-Id: I7c4dc30285481b89c79a66eb27ad616469687a8b
2023-03-16 02:00:50 -07:00
Rajeev Nandan
fca50d4695 disp: msm: dsi: fix the typo in cmd dma trigger pasring
Fix the error message typo in dsi cmd dma trigger parsing.

Change-Id: I4ee1bfc05197e371270ec421ebd37c1386015274
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
2023-03-15 17:24:36 +05:30
Gaurav LNU
14364f2db4 disp: msm: sde: out of bounds check for phys_encs array
Check for array out of bounds while accessing
phys_encs lists.

Change-Id: If0af4bd274df5729d8edb62199cbd848586ef0d7
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
2023-03-13 02:02:23 -07:00
Gaurav LNU
bb2f14fff0 disp: msm: sde: increase buf array size
This change increases the buf array size to
accommodate all the characters as the buf array
will store each digit of bit and enable as a char.
Bit and enable variables are uint32 which could
have max value of 2^32(10 digit), each digit of
both variable will be stored as a char in buf
(char)array.

Change-Id: Iab6fcddc425642a29c6c0a59884121e328707465
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
2023-03-12 23:18:27 -07:00
Mahadevan
f349b4b629 disp: msm: sde: avoid idlepc power collapse for wfd display
When wfd display is connected, qseed3 coefficient lut programming
is getting erased due to idle pc entry for wfd pipes. On idlepc
exit commit, plane properties are not reconfigured from userspace
since support is not present for writeback crtc. This patch
updates idle pc handling to avoid gdsc power off when writeback
crtc is connected and for CWB encoder gdsc power off will happen
on idle pc entry.

Change-Id: I5dbab75bdc647b8f3c2a23cbb4e9d82239fe533d
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-03-06 12:33:27 +05:30
Mahadevan
902ca46c21 Revert "disp: msm: sde: update idlepc handling for wfd display"
This reverts commit a5b326dc2d.

Change-Id: Ib2c4bd379807047bc5bc4dc8ebb8ec2dddfa45be
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-03-06 11:50:23 +05:30
qctecmdr
132458ad67 Merge "disp: msm: sde: update qos cpu mask to avoid defective cores" 2023-03-05 22:00:13 -08:00
Andhavarapu Karthik
d6fb8eead2 disp: msm: sde: update qos cpu mask to avoid defective cores
CPU qos_mask populated from devicetree can have defective cpu cores
included. This change identifies and replaces the defective cores
in the qos mask with the next possible working cpu cores.

Change-Id: I0f32205e7f0abf0482d7dbbd288b7d7f3088726a
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2023-03-01 14:55:01 +05:30
qctecmdr
e01dff0b2e Merge "disp: msm: sde: use vzalloc for large allocations" 2023-02-28 22:22:52 -08:00
Anjaneya Prasad Musunuri
266de47bef disp: msm: sde: use vzalloc for large allocations
Large allocations using kvzalloc can lead to timeouts.
This updates the allocation calls accordingly to use
vzalloc to remove requirements on physically
contiguous memory.

Change-Id: I437913b3bf2e46bfeeb2c511bdfc153470fcbc24
Signed-off-by: Anjaneya Prasad Musunuri <quic_aprasad@quicinc.com>
2023-02-28 15:03:49 +05:30
qctecmdr
0486afc4d7 Merge "disp: msm: sde: set in_log_limited as an unchangeable dump_mode" 2023-02-22 23:08:06 -08:00
Ping Li
ac48ea94f9 drm: msm: skip the color processing programming if crtc is not enabled
Add check to avoid programming the color processing HW if sde_crtc is
not enabled.

Change-Id: I7ffd341147f0caebefb647486a139df5c0aeab31
Signed-off-by: Ping Li <quic_pingli@quicinc.com>
2023-02-16 12:05:01 -08:00
Linux Build Service Account
e035f467ae Merge cd074fb4e9 on remote branch
Change-Id: Icbd6411bd88a92e6083194cd58b95e9c9a11bd79
2023-02-15 11:05:21 -08:00
qctecmdr
a212c4b79c Merge "disp: msm: sde: qos vote for all cpus during vm transition" 2023-02-15 04:17:23 -08:00
Mahadevan
4c7ea38eff disp: msm: sde: qos vote for all cpus during vm transition
For a proxy-scheduled VCPU like the TUI VM, assignment to a
physical core is a runtime decision made by the HLOS scheduler,
and it may change frequently. pm_qos vote added by PVM for
specific CPUs won't be sufficient for addressing irq latency.
This change updates votes for all possible CPUs during TVM
entry and also removes the vote during exit.

Change-Id: Iab5cb5f57e2389ee57689ba2ab69394376f59788
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-02-09 17:00:39 +05:30
Soutrik Mukhopadhyay
8588ddb238 disp: msm: dp: turn off aux switch on dp cable disconnect
The dp_display_disconnect_sync is disabling the aux switch during
the attention hpd low processing. Ideally, the aux switch needs to
be turned off only when the dp cable is disconnected. With aux switch
getting turned off even while cable is connected is leading to HDCP
compliance test failure. This change will turn off aux switch only
when the cable is disconnected. It reverts the commit id
b6466ca7f5.

Change-Id: I90cc5f31b2be1afda61f74ea4e0a44332811ead3
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-02-07 21:25:50 +05:30
Bruce Hoo
34b4eedec8 disp: msm: sde: set in_log_limited as an unchangeable dump_mode
Default mode of dump_mode in sde_dbg module is in_mem, and
it changes to in_coredump when hw_recovery feature is enabled.
This change allows developer to redefine in_log_limited as
default mode, and it's unchangeable even when hw_recovery is enabled.

Change-Id: I51574b3ac297f32f28ae7a69d008d1a5f443a781
Signed-off-by: Bruce Hoo <quic_bingchua@quicinc.com>
2023-02-07 15:42:38 +08:00
qctecmdr
cd074fb4e9 Merge "disp: msm: sde: add qtimer read after input hw-fence signal config" 2023-01-30 05:34:36 -08:00
qctecmdr
048ee3502e Merge "disp: msm: dsi: update the phy timings and clocks together" 2023-01-30 05:34:36 -08:00
Saurabh Yadav
bcaea1e94f disp: msm: sde: handle rc feature disable for all instances
Add rc feature disable handling in case set rc feature fails.
This will disable rc feature for all instances if set rc feature
fails for any instance.

Change-Id: I159b9bd3ed1416c4b2d32440d10132cb024f9529
Signed-off-by: Saurabh Yadav <quic_sauyad@quicinc.com>
2023-01-28 05:23:00 -08:00
qctecmdr
9f67416317 Merge "disp: msm: dsi: Use macros in DSI_R32/DSI_W32 for registers offset" 2023-01-26 21:05:35 -08:00
qctecmdr
9d0100d29d Merge "disp: msm: dsi: Use macro for buffer size" 2023-01-26 21:05:35 -08:00
Srihitha Tangudu
9c236080b1 disp: msm: dsi: handle case where panel sends more bytes than requested
Reset number of bytes read from panel to the expected value when panel
sends more bytes than requested during DSI read. This can otherwise lead
to negative value of repeated bytes and array out of bounds access.

Change-Id: I9310c521a862108940142ba7c1a8c39838be0f79
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2023-01-25 03:28:12 -08:00
qctecmdr
74e17991c1 Merge "disp: msm: dsi: Reset DMA trigger mux when initializing DSI_TRIG_CTRL" 2023-01-24 00:55:50 -08:00
Ayushi Makhija
c2cf7ebf3b disp: msm: dsi: Use macros in DSI_R32/DSI_W32 for registers offset
Use macros for corresponding registers offset in DSI_R32/DSI_W32.

Change-Id: I91052e9124a11f67e3056c79918820c476a39ad0
Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
2023-01-23 21:49:04 -08:00