Commit Graph

288 Commits

Author SHA1 Message Date
Adrian Salido
1bb14cd806 drm/msm: enable counter trace
Trace counter is not properly showing up on trace as is. Replace it with
proper format by refactoring existing trace to be more generic.

Bug: 119295905
Change-Id: I50abb593cd67c10ceed115380ac0e9d2177f0963
Signed-off-by: Adrian Salido <salidoa@google.com>
(cherry picked from commit 89ac1949eaa1524e4e2bbd2ad8c8b6513ae594dd)
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-07-18 10:36:39 -07:00
Midas Chien
216abbf9fa drm/msm/sde: fix unpaired sde trace
Unpaired trace "sde_power_resource_enable" caused tracer parse
incorrect trace points and display weird state on Chrome. Make
trace "sde_power_resource_enable" pair to fix it.

Bug: 122510119
Test: Checked sde trace can be displayed correctly on Chrome
Change-Id: I938b5648a09e00eaea59070af31a2e6469763087
Signed-off-by: Midas Chien <midaschieh@google.com>
(cherry picked from commit 3a335059bf7a200977e8f4e0a4aa5c6ceca3863a)
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-07-18 10:36:25 -07:00
qctecmdr
984f48452d Merge "Revert "disp: msm: dsi: update DSI PHY sequence for Kona"" 2019-07-17 18:29:00 -07:00
qctecmdr
dbbb358a92 Merge "disp: pll: fix sequence as per hardware recommendations" 2019-07-16 17:21:08 -07:00
Satya Rama Aditya Pinapala
07f4b98ff4 Revert "disp: msm: dsi: update DSI PHY sequence for Kona"
This reverts commit 03295175d6.

Change-Id: I9e31e27196f7ee82f2355bf1300a7895ef8e1306
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-07-16 13:46:10 -07:00
Nilaan Gunabalachandran
e87d8f7cc5 disp: msm: sde: Secondary display lm preference with lm pair
When secondary display preference is determined and 2 layer
mixers are required, the preference must check LM pair mask
to meet hw restrictions.

Change-Id: I22845be84f95659a58be98ff11afa4e652fb16e3
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-07-15 11:22:09 -04:00
qctecmdr
ab1d40154f Merge "disp: msm: dp: Reset dp sink power state during panel init" 2019-07-13 02:06:28 -07:00
qctecmdr
3e7ef1e1d0 Merge "disp: msm: dsi: Remove drm_panel tracking from sde_connector" 2019-07-13 00:16:26 -07:00
qctecmdr
a990883c59 Merge "disp: msm: remove unnecessary vblank get and put" 2019-07-12 22:05:06 -07:00
qctecmdr
b700d98e0e Merge "disp: msm: dp: filter modes based on sde resource availability" 2019-07-12 16:50:22 -07:00
Ajay Singh Parmar
e0e4280214 disp: pll: fix sequence as per hardware recommendations
Update the PLL and PHY power on and clock set sequence as per
the hardware recommendations. Move the post link clock phy enable
part to the catalog so that it can be programmed after enabling
link clock.

Change-Id: I9b3b49e5a9ac93bebcb1cb7da63b715a8d5ed85c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2019-07-12 16:44:05 -07:00
qctecmdr
a30c33a6eb Merge "disp: msm: sde: track available hw resources" 2019-07-12 14:51:17 -07:00
qctecmdr
b6913a5af2 Merge "disp: msm: dsi: snapshot of dsi from 4.14 to 4.19" 2019-07-12 12:29:14 -07:00
qctecmdr
3ab9638e45 Merge "disp: msm: add resource caps structure and api changes" 2019-07-12 02:20:32 -07:00
qctecmdr
e3be8e7636 Merge "disp: msm: sde: Ensure that dirty dsc blocks are flushed properly" 2019-07-11 22:21:44 -07:00
qctecmdr
bfffbd8af1 Merge "disp: msm: sde: avoid duplicate fence create from client" 2019-07-11 20:21:39 -07:00
Fuad Hossain
8247a33d6b disp: msm: dp: Reset dp sink power state during panel init
Reset the dp sink power state during panel init.
Sinks may still be in old power states from
previous sessions, so reset the power to allow
for a clean start to the dp session.

CRs-Fixed: 2453351
Change-Id: I7e2a4c9bcdb8f69d2562ba098d80a1c7e8f9f620
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-07-11 18:18:59 -04:00
Satya Rama Aditya Pinapala
edef6ae040 disp: msm: dsi: snapshot of dsi from 4.14 to 4.19
This change is a snapshot of dsi files taken of 4.14
as of commit 764f7c2 (Merge remote-tracking branch
'quic/dev/msm-4.14-display' into msm-4.14)

Change-Id: I8361a844c35a4450f7800964a8da2741676fd6c7
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-07-11 12:29:10 -07:00
Yuan Zhao
cc9aa48df6 disp: msm: dsi: Remove drm_panel tracking from sde_connector
The drm_panel defined in sde_connector was not used, so
removed it.

Change-Id: I70a94f11ebd60362d25e37a256f46d3d4942089d
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2019-07-11 20:11:26 +08:00
Dhaval Patel
d710ac7f11 disp: msm: sde: avoid duplicate fence create from client
SDE fence driver avoids duplicate fence creation if
fence timeline is not increased. This may lead to issue
if client closes the fence with failure ATOMIC_COMMIT.
SDE fence driver provides the closed fd node to subsequent
valid commit and leads to invalid state. This patch avoids
duplicate fence creation from crtc and connector object
instead of sde_fence.

Change-Id: Ic7b43762f0ad251fb20e42edb5f4d5f401790e14
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-07-10 11:15:23 -07:00
qctecmdr
91f4bcda9d Merge "disp: msm: dp: update the connected state during clean up" 2019-07-10 11:07:47 -07:00
qctecmdr
4a62cac06b Merge "disp: msm: dp: add timeout state for simulated AUX transfers" 2019-07-10 09:06:48 -07:00
qctecmdr
bbd3e2b125 Merge "disp: msm: dp: disable audio during display clean up" 2019-07-10 07:10:40 -07:00
qctecmdr
a9a92a5f84 Merge "disp: msm: sde: fix the QOS setting mismatch" 2019-07-10 04:50:43 -07:00
qctecmdr
b37df49521 Merge "disp: msm: sde: fix the race condition with wb output buffers" 2019-07-09 20:20:43 -07:00
Tatenda Chipeperekwa
c36e7e01be disp: msm: dp: update the connected state during clean up
Update the connected state to false during display clean up. This
will allow subsequent connections to be processed correctly in
the face of disconnect failures due to unresponsive user mode
clients.

Change-Id: If30f5d722bf742060c9d4d2dec2207d7baf27fc2
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-07-09 17:42:42 -07:00
Tatenda Chipeperekwa
d532f14537 disp: msm: dp: add timeout state for simulated AUX transfers
Add a new state to indicate timeout failures in simulation mode.
This can be used by test scripts to trigger a retry of the
session.

Change-Id: I9e250ba7d42fcb318698d8456b3acc5b55081abc
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-07-09 17:42:42 -07:00
Tatenda Chipeperekwa
d2c24e44e2 disp: msm: dp: disable audio during display clean up
Disable audio for every active panel during display clean
up use cases when the driver times out waiting for the
video path to tear down. This ensures that the audio
subsystem is notified before the clean up shuts down the
timing engine, and also ensures that the audio module
state is correctly updated to indicate that the session
has ended. This change will reduce the likelihood of the
audio subsystem attempting to program DP audio, and also
ensure that the state checks will correctly prevent any
attempts to program audio after the session has ended.

Change-Id: I937f894e80b55164f9700f021d852863aeb18959
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-07-09 17:37:52 -07:00
Samantha Tran
d90958649c disp: msm: remove unnecessary vblank get and put
Remove unnecessary vblank get and put. This call is
not required before calling wait for crtc commit done
because downstream driver has its own vblank refcount.
Without this change vblank enable call is seen every
vsync.

Change-Id: I1c692f1d2084dbe7ad2f594ddae3907a4a10bb96
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-07-09 15:26:55 -07:00
Lakshmi Narayana Kalavala
99a7f030d4 disp: msm: sde: fix the QOS setting mismatch
Currently the display driver does not consider the write back
client while deriving client type for QOS settings.
Add new API to consider the write back and other non
real time clients also for picking up the proper QOS settings.
This patch also fixes the QOS setting mismatch with QSEEDLITE
hardware.

Change-Id: I5db3d21921b8930bb6399ea355d3ce2b60e51430
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-07-09 13:47:26 -07:00
qctecmdr
84fc2163e1 Merge "disp: msm: dp: Improvements to dp mst simulator mode" 2019-07-08 16:05:02 -07:00
Lakshmi Narayana Kalavala
d28cec1b1a disp: msm: sde: fix the race condition with wb output buffers
In the case of concurrent writeback, display thread
does not wait for writeback done and the fences are released
immediately if the pending frame count is one or zero.
Also during this skip wait process, the output frame buffers are also
cleaned up. If there are couple of bad writeback frames, there could
be a race condition between frame buffer cleanup in the display driver
and DRM_IOCTL_MODE_RMFB ioctl from userspace. Hence add appropriate
ref count logic with output frame buffers while the driver is using them.

Change-Id: I1cf919b93424011c75c39bcddd296a03a9d5c4ee
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-07-08 13:18:01 -07:00
qctecmdr
e5aaaf8785 Merge "disp: msm: dsi: fix the DMS mode flag setting" 2019-07-06 14:05:03 -07:00
qctecmdr
21af73b82c Merge "drm/msm/dsi-staging: update frame transfer time calculations" 2019-07-06 04:53:51 -07:00
qctecmdr
e2944aac08 Merge "drm/msm/dsi-staging: register panel with global registry" 2019-07-05 23:21:13 -07:00
qctecmdr
751cbf5570 Merge "disp: msm: sde: avoid connector state mode update" 2019-07-05 21:36:26 -07:00
qctecmdr
c32ed35783 Merge "disp: msm: sde: dump lm rsvps when reservation fails" 2019-07-05 19:49:10 -07:00
qctecmdr
970ae8ce7b Merge "disp:msm: fix return type from runtime api" 2019-07-05 16:05:14 -07:00
Ray Zhang
dc36ec057b disp: msm: dsi: fix the DMS mode flag setting
DFPS validation doesn't update DSI_MODE_FLAG_DMS when there is
only refresh rate change but not resolution change. This is not
expected. DMS should be able to support this use case if DFPS
is not enabled.

Change-Id: I738bce68b1dc098338281ac95156a483769608c4
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2019-07-05 11:02:02 +08:00
qctecmdr
9bca267510 Merge "disp: msm: sde: avoid false error for encoder restore" 2019-07-04 13:04:57 -07:00
qctecmdr
56c84a97d2 Merge "disp: msm: sde: fix error return in plane atomic_check" 2019-07-04 11:19:34 -07:00
Dhaval Patel
10d925633a disp: msm: sde: avoid false error for encoder restore
Below sequence can trigger encoder restore failure due
to cur_master unavailability.
 -> Primary encoder is attached to crtc-0
 -> Primary encoder enters in power collapse state
 -> CWB encoder attached to crtc-0
 -> Atomic_check updates the crtc encoder_mask with
    two encoders.
 -> Prepare_commit triggers power restore
 -> crtc triggers encoder_restore based on encoder_mask

CWB encoder is not enabled at this stage and it will fail
to restore. This patch avoids the error message in this
valid condition.
2019-07-03 11:02:44 -07:00
Nilaan Gunabalachandran
98434934c6 disp: msm: dp: filter modes based on sde resource availability
Not considering the currently available sde resources and
caps while filtering/validating a mode will report unavailable
modes and result in an atomic commit failure.
DP should calculate the number of required lms and verify
if lms/3dmux are available before a validating a mode.

Change-Id: Idadcc655c30f5a831c47cf22b60085052b5b9fcd
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-07-02 17:34:55 -04:00
Nilaan Gunabalachandran
c7bf5c0293 disp: msm: sde: track available hw resources
Track available hw resources using a common data structure in
the sde_rm object and pass available hw resource info to
interface drivers to make informed decisions in preparing
or filtering display modes.

Change-Id: I05649623233b0f531582e8c90d1ef92c7fceded4
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-07-02 17:34:54 -04:00
Nilaan Gunabalachandran
d92000cdd4 disp: msm: add resource caps structure and api changes
Create a data structure to maintain available hardware resources
and track capabilities. This data structure is used to send
the current available resources and caps information to
connector ops get_mode_info, get_modes and validate_mode to
process the display mode.

Change-Id: If38fc628ee5ab4729821f88c0050ab45375187b8
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-07-02 17:34:49 -04:00
Lakshmi Narayana Kalavala
6f3081e24d disp: msm: sde: dump lm rsvps when reservation fails
SDE driver currently does not dump the resource information
when there is a failure with reservation. This change
adds the logic to dump the layer mixer rsvps with
reservation failures.

Change-Id: Idcfb36b25bf8da18a9f6f803ba5de51aaa812334
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-07-02 14:06:02 -07:00
Abhijit Kulkarni
dcea657cce disp: msm: sde: avoid connector state mode update
There is a race condition between sdm thread and display thread, when
sdm thread may be accessing the mode_info field while duplicating the
connector state, display thread may be updating the current mode info.
This would lead to the next commit using invalid mode and could cause
wrong hw configuration.
This change removes copying the mode_info in encoder struct while
atomic check phase and also removes accessing the connector mode_info
during mode_set. The encoder struct is now updated at the mode_set
with the cached connector mode.

Change-Id: I069ed592ec017ce4aa5c9c94b340bf94c5e1ebff
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-07-02 12:57:31 -07:00
Vara Reddy
98ac941a1b drm/msm/dsi-staging: update frame transfer time calculations
Change updates frame transfer time calculations. Frame threshold
is provided as input to decide on the final transfer time.
Panel dsi clock node followed by mdp transfer time node
will take priority in selecting final transfer time than frame
threshold time.

Change-Id: I40c3abfc635cd9b338b705535612ac32e047ce6e
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-07-02 12:48:34 -07:00
qctecmdr
40e4d191d3 Merge "disp: msm: sde: log intf framecount in event logs" 2019-07-02 02:26:16 -07:00
qctecmdr
3a81fc3744 Merge "disp: msm: sde: use high bandwidth threshold for crtc check" 2019-07-02 01:24:17 -07:00