Commit Graph

3567 Commits

Author SHA1 Message Date
Linux Build Service Account
4257f40b7b Merge ccedfd643a on remote branch
Change-Id: Ibc05d655d17bf432699d5fe1a888e0fda18ba917
2024-01-22 03:01:51 -08:00
qctecmdr
ccedfd643a Merge "disp: msm: sde: fix null dereference in sde_encoder_destroy" 2023-12-22 00:15:30 -08:00
qctecmdr
1d0172db83 Merge "disp: msm: sde: update dither, unsharp along with VLUT" 2023-12-14 02:24:19 -08:00
qctecmdr
d2dfe94cb3 Merge "disp: msm: update seamless check for cwb + any modeset" 2023-12-14 02:24:18 -08:00
qctecmdr
c3b0ffe249 Merge "disp: msm: dsi: add dsiclk_sel support for DPHY and CPHY as per HPG" 2023-12-13 05:00:44 -08:00
qctecmdr
cc5db09db6 Merge "disp: msm: dsi: rename dsi_clk mux as dsiclk_sel to match with HPG" 2023-12-13 01:46:50 -08:00
Kirill Shpin
08e0ffa970 disp: msm: dsi: add dsiclk_sel support for DPHY and CPHY as per HPG
Add dsiclk_sel support for both DPHY and CPHY, update pclk_div
calculation w.r.t dsiclk_sel as per HPG.

Change-Id: I573addd62c77d1c9f089b7aadf386cd2e579f442
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
2023-12-11 21:23:13 -08:00
Srihitha Tangudu
9277455efe disp: msm: dsi: rename dsi_clk mux as dsiclk_sel to match with HPG
Rename dsi_clk mux as dsiclk_sel to match the naming convention
with HPG.

Change-Id: I50671a78fccdd10d74d43fdf8ef4ede0c55fd09b
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
2023-12-11 21:22:34 -08:00
Anjaneya Prasad Musunuri
54da6b5312 disp: msm: sde: update dither, unsharp along with VLUT
Dither, unsharp should not be enable when VLUT
is disabled. This change ties dither, unsharp to VLUT
enable/disable and not during init property.

Change-Id: Idfad899a13252b22104c9746c86f4e158d9b0980
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Anjaneya Prasad Musunuri <quic_aprasad@quicinc.com>
2023-12-11 14:30:20 +05:30
Anjaneya Prasad Musunuri
04536e868f disp: msm: sde: force revalidation of LTM and RC features
Currently revalidation of features happening for mode change(like
fps change, resolution change). This change limits revalidation
of feature only to resolution switch.

Change-Id: I3678e0e94eaad51e7b7a342eb451aa6329e8279d
Signed-off-by: Anjaneya Prasad Musunuri <quic_aprasad@quicinc.com>
2023-12-11 14:29:43 +05:30
Kirill Shpin
6d38542acc disp: msm: dsi: follow the HPG guidelines for DATABUS_WIDEN
In case of DATABUS_WIDEN, follow the HPG to calculate bitclk,
byteclk and pclk. Configure the DST_FORMAT and the clock
dividers in DSI PHY and DISP_CC w.r.t. the bpp before
compression.

Change-Id: I526eab5bc88b8d667b8b1a0d257b2f147998286a
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
2023-12-10 22:59:39 -08:00
Jayaprakash Madisetty
cdc962d109 disp: msm: update seamless check for cwb + any modeset
When there is CWB enablement + dynamic clock change request in
single commit, during modeset enables the cwb seamless check
is hit for primary connector causing bridge pre enable
and enable calls skipped for dsi connector. This change ensures
the above seamless transition is taken care with any modeset case
as well.

Change-Id: I8d7ef4f8c579d44ddb0bfd5dc584fe5c778df886
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2023-12-06 02:04:53 -08:00
Venkata Prahlad Valluru
a2ed5b2400 disp: msm: sde: fix null dereference in sde_encoder_destroy
Avoid use-after-free for phys_encs.

Change-Id: Ic44013dbe7099c3ef22338f4531fb42a55bb38ef
Signed-off-by: Venkata Prahlad Valluru <quic_vvalluru@quicinc.com>
2023-12-04 01:59:48 -08:00
Linux Build Service Account
87e231c579 Merge 21dabac3b4 on remote branch
Change-Id: Ic9dbfac087591a64538065e951c8a1fb28eac5fb
2023-11-21 22:34:39 -08:00
Linux Build Service Account
b9458a4350 Merge 95b35463ed on remote branch
Change-Id: I218912d644ba132cb8d423edeb63a414d989c14a
2023-11-08 02:13:56 -08:00
Anand Tarakh
21dabac3b4 disp: msm: dsi: avoid restoring bit clk & front porches during set mode
Suppose there's a mode change in  Nth commit and N+1th commit mode
change request for dynamic clock came even before the Nth commit
mode is set in DSI. Now, restoring the bit clock and porches during
mode set of Nth commit will update the clock and porches according
to the new dynamic clock request which should have actually been
handled in N+1th commit mode set and this can lead to DSI underflow
/overflow.

Avoid restoring bit clock during bridge enable as it is already
taken care during bridge mode fixup.

Change-Id: Ieecb0020a77f5e082a8b9da0ecf461acdbe89e0c
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-10-31 11:36:36 +05:30
Linux Build Service Account
c2e7604ab5 Merge fa7865a678 on remote branch
Change-Id: I95bc696ae4a8a42afa0751e041e17bc51d35884c
2023-10-12 02:55:00 -07:00
qctecmdr
95b35463ed Merge "disp: msm: dsi: clear pll unlock error bit before unmasking" 2023-10-10 22:51:20 -07:00
Linux Build Service Account
cf5b65d33c Merge 3c3ad36503 on remote branch
Change-Id: I9aa89cca6236c92baadde3db57c6d8882fb07e13
2023-09-28 04:37:59 -07:00
Anand Tarakh
a7f01af213 disp: msm: dsi: clear pll unlock error bit before unmasking
Since PLL UNLOCK status bit is a sticky bit, ensure this bit
is cleared before unmasking PLL UNLOCK error.
Otherwise unnecessarily DSI controller will trigger error
interrupts for the stale status, the moment error is
unmasked.

Change-Id: I7b7aa63b5e508dde446a4469d9a6625a071dae00
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-09-26 19:49:33 -07:00
Srihitha Tangudu
fa7865a678 disp: msm: dsi: Only enable lanes required during phy enable
Currently we are enabling all the lanes irrespective of the
lanes we are actually going to use. Add support to enable
only those lanes that are required and thus save power.

Change-Id: I9aae76eeaa05a79337d4e4b1f2e36ea9842bd580
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2023-09-25 17:01:39 +05:30
Yojana Juadi
b81da48725 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>
(cherry picked from commit e664bd181f)
2023-09-19 00:19:41 -07:00
qctecmdr
3c3ad36503 Merge "disp: msm: sde: configure ubwc ctrl ver in hw as per devicetree" 2023-09-13 22:54:53 -07:00
Yojana Juadi
4b6bddd9c6 disp: msm: sde: wait for autorefresh_status to be idle in prepare kickoff
If cont splash is enabled, wait for autorefresh_status to be idle for
1 vsync in prepare kickoff. This patch also prevents entering to
rsc_solver_mode if autorefresh_status is busy.

Change-Id: Ic4458dcbe8e06ff6f338dd264eb9371365120dd1
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-09-12 00:01:12 -07:00
Yojana Juadi
48f118202c disp: msm: sde: wait for autorefresh_status to be idle in prepare kickoff
If cont splash is enabled, wait for autorefresh_status to be idle for
1 vsync in prepare kickoff. This patch also prevents entering to
rsc_solver_mode if autorefresh_status is busy.

Change-Id: Ic4458dcbe8e06ff6f338dd264eb9371365120dd1
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-09-10 11:49:16 +05:30
Linux Build Service Account
9fee136f51 Merge d9f5e03b7d on remote branch
Change-Id: I2be639b73985cfe79143298254c6b6220bf34526
2023-09-08 10:58:31 -07:00
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
Linux Build Service Account
5d4e584172 Merge c84b917f06 on remote branch
Change-Id: Ib05d1607188c040afe8553bd8405098bd40dc317
2023-08-30 22:28:07 -07:00
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
Linux Build Service Account
57ce3c2471 Merge f119b3e97f on remote branch
Change-Id: Ie65868a44d45c94bed8292802f4db2d9cf49b853
Signed-off-by: Mohit Sharma <quic_smohit@quicinc.com>
2023-08-12 14:13:25 +05:30
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
Linux Build Service Account
b5bb16a5f3 Merge a94f99c621 on remote branch
Change-Id: I279410afa2699f1944289045d4f78c7cfd728122
2023-07-21 06:21:09 -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