Commit Graph

3441 Commits

Author SHA1 Message Date
Yojana Juadi
e664bd181f disp: msm: sde: configure ubwc ctrl ver in hw as per devicetree
This change fixes the 'commit 1aacef1e1d ("disp: msm:
sde: fix UBWC decoder version support for Kalama")'.
Ubwc_ctrl must be set with global ubwc encoder version populated
from devicetree setting.

Change-Id: I85dc80e2e0436536a9b14e7e43199dc7b4421485
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-09-07 23:51:50 +05:30
qctecmdr
d9f5e03b7d Merge "disp: msm: sde: reset crop registers in PU cases" 2023-08-29 00:14:02 -07:00
Linux Build Service Account
6e38ab2b2e Merge "disp: msm: sde: reset bw_control state during non-seamless commit" into display-kernel.lnx.5.15 2023-08-28 12:01:04 -07:00
Shamika Joshi
68e3a8fdee disp: msm: sde: reset crop registers in PU cases
In back to back partial update cases with CWB the CROP
registers are not reset causing WB timeout in the
following sequence-
1) Nth commit WB_roi != LM_PU_roi, WB CROP registers
are programmed.
2) N+1th commit WB_roi == LM_PU_roi, WB CROP registers
are not cleared retaining old values.
Clear the WB CROP registers in the second case to fix
the issue.

Change-Id: If09a697f48ecaf5ee08d6313be444748d048b20d
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-08-28 15:03:33 +05:30
Mahadevan
3c5c21b0fb disp: msm: sde: reset bw_control state during non-seamless commit
During a seamless transition commit, the driver takes the values
of bandwidth (BW) and clock that were set during the set_property
phase of the commit, after the transition is completed. However,
during a non-seamless transition commit, the BW and clock
properties set by userspace cause the bw_control to be set to true.
When crtc is disabled, this bw_control is set to false. If there
are no updates to BW/clock for subsequent commits, the driver will
set the maximum value, which will affect the power consumed by the
display hardware. This change prevents bw_control from being set to
false if it is not a power-off commit.

Change-Id: I3348aacfb9ce338fe4625978364d14c11c2c26bc
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-08-24 14:23:37 +05:30
Mahadevan
c84b917f06 disp: msm: limit reglog to user debug builds
This change limits reglog feature by default to user debug
builds only and provides debug option to selectively disable
reglog for power and perf profiling if required. This change
is needed as reglog is considerably heavy on commit thread
execution.

Change-Id: I781ae73cee09ce0fcddb6d2b3c847343c69f6c59
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-08-22 17:20:45 +05:30
qctecmdr
5894615dc0 Merge "disp: msm: sde: add mutex lock to protect wb_dev" 2023-08-17 09:48:22 -07:00
qctecmdr
7d4f3a3830 Merge "disp: msm: sde: traverse the entire CTL list during splash_resource init" 2023-08-17 09:48:22 -07:00
qctecmdr
49b469c63b Merge "disp: msm: sde: swap right mixer flag" 2023-08-17 09:48:22 -07:00
Yojana Juadi
cf762ff2ee disp: msm: sde: add mutex lock to protect wb_dev
There is null pointer dereference seen due to concurrency
of wb_get_modes from userspace and clearing of writeback
modes in wb_reset. This change acquires mutex lock to provide
exclusive access to wb_dev effectively preventing such
concurrency issues.

Change-Id: Idd38e38696c839f557b94aa9313761d4d7738902
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-08-11 11:24:54 +05:30
Mahadevan
2abcfa0acd disp: msm: sde: traverse the entire CTL list during splash_resource init
This change fixes an issue, where in CTL_2 was programmed for
secondary display and handoff was not done as the list traversal
logic was restricting it.

Change-Id: Icd945cfb3401ecc9c9c33059f5208a87979ada77
Signed-off-by: Yojana <quic_yjuadi@quicinc.com>
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-08-10 17:54:53 +05:30
Yojana Juadi
2ecc30acde disp: msm: sde: add null check for pointer to drm_connector
Check for null value before dereferencing pointer to
drm_connector.

Change-Id: I38845ccab521e6e5e9ad052df57b25eba6bae9c0
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-08-10 14:44:14 +05:30
Renchao Liu
4d788099d2 disp: msm: sde: swap right mixer flag
Change swaps right mixer flag when swapping mixer.
Histogram IRQ is registered to unexpected mixer
index if both mixers' right mixer flag set as false.

Change-Id: I0243d70129dc0c3bff24cabc8877c626101acd83
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
2023-08-07 17:26:41 +08:00
qctecmdr
f119b3e97f Merge "disp: msm: dp: Voting for pm qos" 2023-07-27 06:13:44 -07:00
qctecmdr
1ed1b82a86 Merge "disp: msm: sde: add out of bound check for interrupt id" 2023-07-26 05:56:21 -07:00
qctecmdr
97591931c9 Merge "disp: msm: sde: reset bl_scale_sv in power off case" 2023-07-26 05:56:20 -07:00
Yuchao Ma
02428b713f disp: msm: sde: reset bl_scale_sv in power off case
In userspace, the backlight scale of LTM will be set to the maximum value
in the suspend case. However, sometimes this value is sent to the driver
after resume. This will cause a backlight flicker issue.
For fix this issue, this change resets the backlight scale in the suspend
case.

Change-Id: I0eb586eeefbf3444d6f44281d58789460300dffc
Signed-off-by: Yuchao Ma <quic_yuchaom@quicinc.com>
2023-07-25 12:14:19 +08:00
qctecmdr
185e0e7bf3 Merge "disp: msm: sde: avoid returning vsync count for cwb encoder" 2023-07-24 11:04:58 -07:00
Soutrik Mukhopadhyay
ed72e8168e disp: msm: dp: Voting for pm qos
Provision to vote for pm qos as a part of DP display host
initialisation and removing the same during host
deinitialisation sequence.

Change-Id: I5cd1b3783ddd2e93cab357855a090ec8b16adbdf
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-23 21:23:24 -07:00
qctecmdr
6d21952dd2 Merge "disp: msm: sde: adjust the vblank refcount until the completion of poms" 2023-07-22 20:48:21 -07:00
Akash Gajjar
4a5e3080f2 disp: msm: sde: avoid returning vsync count for cwb encoder
In CWB use case along with suspend commit, the function
drm_crtc_funcs.get_vblank_counter returns a zero vsync count
value. This causes blocking of drm_crtc_funcs.disable_vblank,
leading to a wait for vsync timeout while disabling the encoder.
hence clear a cwb encoder mask in encoder disable and set it
while performing mode set.

Change-Id: Ic994aa0a86faf48e2b25955cf6fe12166fe9d328
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-07-21 16:43:08 +05:30
Akash Gajjar
4cb481f5f8 disp: msm: sde: adjust the vblank refcount until the completion of poms
In POMS use case, the handling of the wait for vsync event
completion coincides with the concurrent
drm_crtc_funcs.enable_vblank. This concurrency causes a vsync
event complete timeout while disabling the encoder. to fix this
concurrency problem, increment the vblank refcount in encoder
disable and release the vblank refcount in encoder enable.

Change-Id: I79671e4a2bafdd01a6b2523a80fe511bff23d6b6
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-07-21 10:22:17 +05:30
Andhavarapu Karthik
cd672fbb9d disp: msm: sde: add out of bound check for interrupt id
This change adds out of bound check for interrupt id.

Change-Id: I10e786ee434629b0735c96da3c03eeac708935a1
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2023-07-20 14:23:40 +05:30
Soutrik Mukhopadhyay
2fb61f552b disp: msm: dp: Handle aux switch node missing in device tree
Ensure to allocate switch type as bypass in case of dp aux switch
node missing in device tree entry and prevent any scope of null
pointer dereferencing.

Change-Id: I1d50d785e028f2e69a0effaedb2dbb6568a473dd
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-18 21:26:29 +05:30
qctecmdr
280b31df88 Merge "disp: msm: sde: add support for CWB + single LM partial update" 2023-07-17 00:27:49 -07:00
qctecmdr
5ea3dc2b41 Merge "disp: msm: sde: clear wb mode and cached cwb encoder mask" 2023-07-17 00:27:49 -07:00
Mahadevan
4cd335d6f6 disp: msm: sde: add support for CWB + single LM partial update
In the current SW design for a CWB commit the need for 3D-Merge
and number of CWB mux which needed to tap the LMs are decided
based on number of mixers on crtc. When there is a partial update
commit in single LM these 3D-Merge and CWB mux active are used
leading to WB commit failures. This change properly check whether
3D-Merge is needed in CWB path based on number of LMs in a partial
update commit.

Change-Id: I2c838a24ad3a259923f6b26934e681cb9a5829b6
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-07-14 12:46:25 +05:30
qctecmdr
a94f99c621 Merge "disp: msm: initialize and register drm device after splash_config" 2023-07-13 04:07:50 -07:00
qctecmdr
e7b6529ec5 Merge "disp: msm: dsi: fix compressed RGB101010 support" 2023-07-11 20:10:35 -07:00
qctecmdr
d4e6b9af67 Merge "disp: msm: sde: avoid returning zero vsync count in poms usecase" 2023-07-10 02:44:54 -07:00
Mahadevan
7e4f99840b disp: msm: sde: clear wb mode and cached cwb encoder mask
The issue scenario is as follows
1. A CWB commit has run and it has disabled. Composer kill is
   done.
2. If Composer starts again or another client has open DRM
   the previous cwb state is intact.
3. When userspace is trying to query wb modes, primary modes
   which are attached to wb as part of cwb commit is exposed.

This leads to commit failures if userspace is trying to trigger wb
on the same CRTC of what primary has run cwb before. This change
properly clears wb mode and the cached encoder mask to avoid commit
failures.

Change-Id: I4ca8bd2b52a980630b7fb1319bf67b718ebb2ac2
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-07-07 18:31:09 +05:30
Akash Gajjar
15a6e6deda disp: msm: sde: avoid returning zero vsync count in poms usecase
In POMS use case while disabling the virtual encoder, the virt
reset function sets the current master to null. concurrently, if
there is a query from the DRM client for the current vsync count,
it returns a zero value. This results in the blocking of the
drm_crtc_funcs.disable_vblank function. since the vsync count
has been relocated to the virtual encoder, remove the physical
encoder structure.

Change-Id: Ie692df657b5a86b6b8915a15e9a070642243fcfb
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-07-06 23:19:10 +05:30
qctecmdr
f15ca355ce Merge "disp: config: add support for fsa and wcd aux switch for crow target" 2023-07-06 02:29:17 -07:00
qctecmdr
79216fa2c2 Merge "disp: msm: dp: update PHY settings for crow target" 2023-07-05 22:23:48 -07:00
Kashish Jain
191d8b78c4 disp: config: add support for fsa and wcd aux switch for crow target
Add support for fsa and wcd aux switch for crow target.

Change-Id: If50226c5f9f7cbb3a1ab1d469bc2c9efa0b541c4
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2023-07-04 06:00:26 -07:00
Soutrik Mukhopadhyay
4232c28148 disp: msm: dp: Parse device tree to find specific aux switch
Changes to select particular dp_aux_switch based on board
requirements. Currently provision to support both fsa4480
and wcd939x as aux switches are provided.

Change-Id: Iafbee4d91d14aafb1e7a37ddfa2b1ea0d0e5e784
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-04 05:59:51 -07:00
Nisarg Bhavsar
ffb63d1248 disp: msm: dp: Add abstract and wcd939x aux switch support
Add functionality to change which aux switch is used
at compile time for different targets. Add wcd939x
switch support.

Change-Id: Iced3b11733009680063790dfa8f180b19002f963
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-04 05:59:09 -07:00
Mahadevan
b56a9415bd disp: msm: initialize and register drm device after splash_config
If continuous splash is enabled crtc_state active is set to true
from the driver. During the handoff commit this new_state is compared
with the older state and active change will be set to false. If there
is a race condition between the continuous splash config and atomic
check of the first commit, an improper state with active change to
true is formed leading to commit failure. This change makes sure drm
device will get initialized and registered after continuous splash
config which will block the userspace from the handoff commit.

Change-Id: I91aa64c480a3341488f1e2c9422c9a2b8200fe53
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-07-03 23:21:54 -07:00
Lei Chen
e85260e6a1 disp: msm: sde: set layer mixer for each wb display mode
Set the number of layer mixer for each wb mode based on the
current mode hdisplay width. If the hdisplay width of current
mode is greater than the maximum layer mixer width of HW supported,
set dual layer mixers for this mode and check if the split
hdisplay width is an even number.

Change-Id: I0190830ed559f008f9e2c0752858ddc5e7cb83cd
Signed-off-by: Lei Chen <quic_chenlei@quicinc.com>
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-07-03 16:44:24 +05:30
Soutrik Mukhopadhyay
65c37a6e5d disp: msm: dp: update PHY settings for crow target
Update PHY settings for crow target.

Change-Id: I1242154cdb3aef5c9a84954d69e40f0520157620
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-06-26 21:20:34 -07:00
Kashish Jain
59417d5d89 disp: msm: dsi: change log level for dsi pll slave config
Change log level for unavailable slave pll from warn to debug
to avoid redundant logs as parrot supports only one DSI.

Change-Id: I200a2f382a1dca7035e4960d3bb0c877867f8ba8
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-06-24 15:27:06 +05:30
qctecmdr
f9251258ff Merge "disp: msm: sde: add vsync count in virtual encoder" 2023-06-15 07:56:08 -07:00
qctecmdr
fea2f03e95 Merge "disp: msm: sde: select vbif QOS LUT based on ddr type" 2023-06-15 07:56:08 -07:00
Akash Gajjar
bbcece0f23 disp: msm: sde: select vbif QOS LUT based on ddr type
Add property to parse the ddr type and select the vbif QOS
values based on the detected ddr type.

Change-Id: Ifc980b5bdadc38b7b0882568a1f07e4e8441303a
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-06-14 17:00:44 +05:30
Akash Gajjar
f4865f480d disp: msm: sde: add vsync count in virtual encoder
Introduce vsync count variable in virtual encoder structure
to keep the vsync count variable value in sync while performing
the poms. Consequently, this prevents the blocking of
drm_vblank_put and the invocation of
drm_crtc_funcs.disable_vblank.

Change-Id: I74903a89b17a8f46fb1b21338500553f36771dd0
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-06-14 15:50:35 +05:30
Anand Tarakh
74c700ca88 disp: msm: dsi: sync the command DMA packet buffer after update
Sync the command DMA packet buffer after update.

Change-Id: I01b91400bb15ab75cbb7ce3cf9adc4b64f7e923d
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-06-11 23:19:33 -07:00
qctecmdr
da135c4071 Merge "disp: msm: sde: avoid reprogramming of vbif and RP remap" 2023-06-08 00:05:16 -07:00
qctecmdr
25a7896d16 Merge "disp: msm: dp: Release connector reference after reading crc frame value" 2023-06-08 00:05:16 -07:00
qctecmdr
1a8a70eab6 Merge "disp: msm: sde: disable CWB in quad pipe" 2023-06-08 00:05:15 -07:00
Soutrik Mukhopadhyay
d4ae697767 disp: msm: dp: Release connector reference after reading crc frame value
This change decrements the specific drm connector's reference count
after it has been used for reading crc frame value. Without this
change, there might be a chance of a connector's reference count
still remaining positive, even if it is not accessed anywhere
further in code.

Change-Id: I9058ca046fa114bc10159045f98c40ac68ade751
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-06-05 22:13:28 -07:00