3568 Commits

Author SHA1 Message Date
Linux Build Service Account
569fe69cb5 Merge "disp: msm: sde: avoid double clearing of INTR registers" into display-kernel.lnx.5.15 2023-05-10 02:59:21 -07:00
Akash Gajjar
bbd66e0004 disp: msm: sde: avoid reprogramming of vbif and RP remap
Each rectangle is listed as an individual DRM plane, and since
they share a common VBIF register, there is no need to
reprogram the QOS remapper for the virtual plane.

Change-Id: I7af6aca1953cd61e622ef5b15353d5ea20fd73cd
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-05-05 09:56:46 +05:30
Linux Build Service Account
6ee467def5 Merge 5af4c28a10 on remote branch
Change-Id: I36e3750786ee1d06a6721dcd065824c12a6225d3
2023-05-02 02:09:36 -07:00
qctecmdr
cff5b253c3 Merge "disp: msm: dsi: release TE irq in case of TE check failure" 2023-04-29 22:01:25 -07:00
qctecmdr
403ca8288d Merge "disp: msm: dp: clear link info capabilities during DP disconnect" 2023-04-24 06:41:44 -07:00
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
Anand Tarakh
ec995d75b2 disp: msm: dsi: release TE irq in case of TE check failure
When TE check is failed, release TE irq.

Change-Id: I63036130e97a578959f30015c06c4c4c0ec0557b
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-04-23 20:57:46 -07:00
qctecmdr
5af4c28a10 Merge "disp: msm: dsi: use ctrl cell index to set frequencies for link clks" 2023-04-20 22:34:59 -07:00
qctecmdr
1c39e1cb14 Merge "disp: msm: sde: validate plane mode and gem obj flags" 2023-04-20 18:58:10 -07:00
Anand Tarakh
5662d3b41e 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-19 11:05:49 +05:30
Linux Build Service Account
adb0083d20 Merge 5215f2a6dd on remote branch
Change-Id: Ie73340811ca6428287de369c87662de5912f1647
2023-04-18 10:24:31 -07:00
Soutrik Mukhopadhyay
533da43085 disp: msm: dp: clear link info capabilities during DP disconnect
This change clears all link info capabilities as a part of
panel deinitialisation during a disconnect sequence. Without
this change, the link info capabilities like the CRC flag will be
retained for the next hotplugged device. Now if, a MST is connected
after a SST connection, the base panel will have the CRC value of the
previous sink, which will be invalid for the case when the hub doesn't
support CRC.

Change-Id: I3a820070fd5006a707328b4d192893a465c04448
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-04-17 17:14:51 +05:30
Akash Gajjar
71f5b6e790 disp: msm: sde: validate plane mode and gem obj flags
Add changes to validate the plane fb_translation mode of
drm_gem_obj attached to plane. It avoids device panic on S2
translation fault and fails the drm_atomic_commit for which
mismatch is detected. In current codeflow, only S1 mappings are
modified when dma_buf is detached from Non_sec CB and attached
to secure SB as part of msm_gem_get_iova_locked API, but S2
mapping entries are not modified and this causes crash.

Change-Id: Ib4c9fab4cd647d4ee3fb33f885ba2d578e2d46e7
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-04-07 14:50:08 +05:30
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
Mahadevan
b22a3ce646 disp: msm: sde: avoid double clearing of INTR registers
When there is CPU processing delay between first INTR clear and
second INTR clear there is a chance that the second register
write might clear the next frames interrupts which will avoid
triggering the irq callbacks causing software hung. This
patch avoids such a scenario by removing such double clearing
of INTR registers.

Change-Id: I3b0c9cbb1fb0c45f6703a0df7ed20453dba7d468
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-04-04 05:58:47 +05:30
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