Commit Graph

2382 Commits

Author SHA1 Message Date
Sudarsan Ramesh
71a264056d disp: msm: dp: add support for voltage swing level 3
Currently, the max voltage swing supported is level 2. This change
adds support for voltage swing level 3 in the dp driver.

Change-Id: Idf1dbb4e74edff924067130a5edea869f392bf38
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-05-25 11:22:41 -04:00
Santosh Kumar Aenugu
6add9d0fc0 disp: msm: dsi: fix dsi pll dividers
Updating DSI PLL byte clock dividers as per HW recommendation.

Change-Id: I9dbe7a04f813676a7690d0cadc52d7ed19ca4871
Signed-off-by: Santosh Kumar Aenugu <santoshkumar@codeaurora.org>
2021-05-25 08:13:55 -07:00
Xu Yang
bc7fed35cd disp: msm: sde: Remove error log for invalid dspp in hist irq
Change moves error log to debug log for invalid dspp when process
histogram interrupt, that also removes error logs from userspace
by returning ENODEV.

Change-Id: Ib26b42668ba9e9597cd6eef75d87e679f2d3422f
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
2021-05-25 13:22:39 +08:00
Samantha Tran
f5a91ba3b3 disp: msm: sde: pass disp info to setup vsync source
While setting up vsync source, display info is used to decide whether
or not watchdog TE should be used. This change passes display info
as a parameter to vsync setup rather than using the encoder's display
info which is not updated in the case of panel dead error.

Change-Id: I928ee2012eec7bf63f4ba3538082bc3e47d5e99d
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-24 16:24:39 -07:00
Satya Rama Aditya Pinapala
e993215979 disp: msm: dsi: update transfer time calculation during RSC disable
If RSCC solver is disabled, the transfer time calculation can be
skip using TE jitter. This case threshold time becomes prefill
time + DCS command transfer threshold. The threshold for DCS
command transfer is configured to 40us.

Change-Id: I1260df33e9d928aacd8961bdedfcd136563a806b
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-24 15:54:30 -07:00
qctecmdr
72f7dfe428 Merge "disp: msm: sde: handle LTM switch in and out of dual pipe merge mode" 2021-05-22 15:20:49 -07:00
Linux Build Service Account
b3097f1990 Merge "disp: msm: sde: fix qos lut index calculation for high refresh rate" into display-kernel.lnx.5.10 2021-05-21 10:05:11 -07:00
Linux Build Service Account
deef47dba0 Merge "disp: msm: sde: avoid mixer op setup for virtual LM" into display-kernel.lnx.5.10 2021-05-21 10:05:11 -07:00
Linux Build Service Account
b9eedf97f8 Merge "disp: msm: sde: set IB value after cont splash to DT value" into display-kernel.lnx.5.10 2021-05-21 10:04:10 -07:00
Linux Build Service Account
8d4ac30c96 Merge "disp: msm: sde: reduce WB linewidth for YUV format" into display-kernel.lnx.5.10 2021-05-21 10:04:10 -07:00
qctecmdr
d6b76d05e0 Merge "disp: msm: update DCE_DATA_COMPRESS bit in non-dsc case" 2021-05-21 07:12:14 -07:00
Yashwanth
728fc8d84b disp: msm: sde: add dp dsc reservation switch property in waipio
This change adds SDE_DP_DSC_RESERVATION_SWITCH for
allowed_dsc_reservation_switch catalog property in waipio
target.

Change-Id: I0fc205fe586503eb238491e3d8f16c0c19053de7
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-20 21:36:19 -07:00
Raviteja Tamatam
3789258773 disp: msm: sde: add allowed_dsc_reservation_switch capability
This change adds allowed_dsc_reservation_switch to determine if
dsc seamless switch is supported for DP. Also, based on the
flag, it determines and populates the required number of
available resources for DP.

Change-Id: I9cd7219a50d352369c5bc8386ce7dc25c30b80b6
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-05-20 21:36:05 -07:00
Raviteja Tamatam
b89a3f739a disp: msm: populate submode blob information
Mode information apart from the fields in
drm_mode_modeinfo that can trigger a modeset like
dsc-nondsc, video-cmd are defined in sub mode.
For each mode in connector->modes there can be
multiple submodes.

Change-Id: Ib8697d3fa4ea5261d9ac4943b1a4149e22c4da2f
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-05-20 21:35:38 -07:00
Yashwanth
7e03fb61fd disp: msm: add support for seamless dsc switch
This change adds logic to determine dsc switch based on
the connector property "CONNECTOR_PROP_DSC_MODE" and
performs seamless DSC switch if there is any change in
DSC configuration. The connector property is populated
in msm_sub_mode based on which suitable mode is selected.

Change-Id: Ifc4931f16dfb814781bc1d72b103e09103e6bfee
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-20 21:34:27 -07:00
Xiaowen Wu
b33789b39b disp: msm: sde: reset retire fence when CWB is disabled
Reset retire fence when CWB is disabled. This is an error recovery
if CWB commit failed.

Change-Id: Iec130a869ef94978a54bf73e501a78f91ee4e3af
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-20 16:54:33 -07:00
Samantha Tran
f465e29a7c disp: msm: sde: set IB value after cont splash to DT value
While releasing continuous splash resource, place IB vote
with value populated from device tree. If device tree has
not specified a value, use default IB enable value.

Change-Id: I08f7ddc56ab580887cd4f31c93d7b8c358fb3d13
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-20 15:53:31 -07:00
Yashwanth
ffc7cdbe08 disp: msm: add connector state along with crtc state to detect modeset
During modeset, private mode changed is detected from
msm_display_mode which is present in sde_connector_state.
In the current code, sde_connector_state is found from the
drm_connector variable which will not be valid
during atomic check phase and new connector state is
required here. To handle this, drm_connector_state is passed
along with the drm_crtc_state while detecting
msm_atomic_needs_modeset condition.

Change-Id: I62c162eff6e1c091cb05b3f049a40a0f25b710ba
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-21 03:48:21 +05:30
Samantha Tran
db1461c64b disp: msm: sde: disable RSC solver mode during HFR cases
During high framerate cases, disable RSC solver mode as there
will not be much power saving to be done. Disabling is decided
through panel timing node property.

Change-Id: I178170a5ab1b7e31b92ae3019e0147c05a282850
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-20 12:24:58 -07:00
Satya Rama Aditya Pinapala
134e62f655 disp: msm: dsi: add parsing for RSC solver disable property
For higher refresh, to provide higher transfer time we need to disable
RSC solver in MDP. This can be configured through the panel timing node
devicetree property. This change adds the parsing of the devicetree
property.

Change-Id: I9e708325da35086d2f955cbcc80bb164ccb116cd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-20 12:24:05 -07:00
Samantha Tran
15b35fe217 disp: msm: sde: reduce WB linewidth for YUV format
Linear formats have an increased width of 5k on waipio
target however this excludes YUV and only applies to
RGB linear formats. This change reduces the max linewidth for
YUV format to 4k.

Change-Id: I51cfc272ea14e10cde87098e879ef7dfbd9f117a
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-20 09:57:17 -07:00
Yashwanth
8515d80ece disp: msm: sde: flush commit thread queue during pm suspend
Following is the sequence during which issue is observed:

1) After suspend, resume commit is with doze suspend mode
(LP2) but kickoff didn't begin.
2) At the same time, runtime pm suspend is triggered which
makes idle request on pm suspend/resume thread.
3) Since the kickoff has not yet started on commit thread,
pending kickoff count is not updated and idle power
collapse sequence is started from pm suspend.
4) As part of idle, irqs are turned off from pm suspend
thread which are turned on commit thread after kickoff
before pp tx irq arrives.

In such cases, during pm suspend, commit thread workqueue
is flushed before encoder idle request to prevent irq's
from getting turned off before the transfer is complete to
avoid inconsistent state.

Change-Id: I417ece0ae7021b0fc5005e262a0d87e43ac729be
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-20 10:19:08 -04:00
Samantha Tran
ef2525e0cc disp: msm: sde: avoid mixer op setup for virtual LM
This change sets a flag to true if a mixer is a virtual mixer.
Virtual mixers will skip setting up mixer ops and debug register
dumps as their range is not valid. Since mixer ops are no longer
guaranteed to be set, add null checks before using these ops.

Change-Id: Idfe7e1e2b893dadbbe6756d69d0c4ca4fa6ae4ce
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-19 19:35:00 -07:00
Prabhanjan Kandula
c35d5ca0cc disp: msm: sde: fix qos lut index calculation for high refresh rate
Fix qos lut offset calculation based on the refresh rate index.
Current calculation is not accounting qos lut size for qseed and non
qseed lut types.

Change-Id: I281fa7b3a245ad9f4a3d2ba45bb5957c3900abd6
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-05-19 14:48:55 -07:00
qctecmdr
807f03d2c9 Merge "disp: msm: sde: fix cont splash pipe identification" 2021-05-19 14:13:55 -07:00
Andhavarapu Karthik
9c919c10f3 disp: msm: sde: add check for unsupported writeback output formats
Chroma sample types H1V2 and H2V1 are not supported in write back output.
Made changes to add atomic check for such unsupported output formats in
writeback.

Change-Id: Ic37865e0b0c64016df728cc753ad66c3b9e9d138
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-19 16:35:41 -04:00
Andhavarapu Karthik
59c3e9ef10 disp: msm: sde: program ob_max_addr based on dsc native422 support
Current code does output buffer max_addr calculation based on dsc id.
Made changes to calculate ob_max_addr based on dsc native422 support.

Change-Id: I01922750f1e9d6cb45615acc1c473891fc648e5d
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-19 16:35:41 -04:00
Jayaprakash Madisetty
59de31ea19 disp: msm: sde: increase kickoff timeout for doze usecase
This change increases the kickoff timeout in doze and
doze suspend usecases. This avoids false timeouts seen
in doze due to rscc static wakeup configured at a different
fps from actual panel TE.

Change-Id: I11c94eb40d4dbbc3d95b8268b007580599ee90fd
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-05-19 16:35:41 -04:00
Mahadevan
a55a3dfe2a disp: msm: avoid deadlock by prepending connection_mutex
Commit caused by dpms on may use extra  modeset lock on
connection_mutex before msm_atomic_commit, so to avoid
deadlock, make the modeset lock within msm_atomic_commit
to be used before the waiting for pending_crtcs_event.

Change-Id: Ic43af0f775d87ccc1d145ead9cb2e1b65018c86f
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-05-19 16:35:40 -04:00
Andhavarapu Karthik
78b4029179 disp: msm: sde: allow input fence status show only when kickoff in progress
Allow input fence status read only when crtc kickoff is in
progress to avoid race between status read and fence destroy.

Change-Id: I3402bfcb38940628f09f645a3cee31f821daeae9
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-05-19 16:35:40 -04:00
Yashwanth
75f3403326 disp: msm: sde: add kickoff_in_progress flag in sde crtc
In dual display usecases, during pm suspend/resume,
commit is scheduled only on primary crtc thread. If idle
timeout value is very short such as in LP2 mode, it might
result in race condition due to idle pc off work getting
scheduled on its crtc thread. This change adds kickoff in
progress flag to handle such cases as crtc frame pending
count is only updated after rc kickoff.

Change-Id: Iebb331d914b23cc5eeadfeb2a488891e88b3202a
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-19 16:35:40 -04:00
Yashwanth
4f8792dfc6 disp: msm: sde: perform only soft reset during timeout scenarios
During wait for commit done failure cases in the current
code in video mode and command mode(posted start), global
atomic state for current crtc state will be assigned NULL
during state swap which will lead to crash while using
drm_atomic_crtc_state_for_each_plane API. Also in such
timeout cases, border color staging and kickoff being
done without any vblank wait might lead to inconsistent
state because of configuration overriding from the next
commit. Since the timeout is observed at the end of commit
cycle, only soft reset should be done here and remaining
in the next commit cycle.

Change-Id: I0d42dc27035f4f79394aeec347d797c99ed76e5f
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-19 16:35:40 -04:00
Yashwanth
8e53d758dd disp: msm: sde: add ctl reset during wait for commit done timeout
During one of the DP timeout usecases, flush doesn't take
effect due to vid vblank wait failure. As a result, smmu
faults are observed because of fetching the previously
staged planes. This change adds ctl reset in the same
DP atomic commit context to recover and avoid
smmu faults.

Change-Id: I2f9aceca56e27f140607317f7596d6fe0d908af8
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-19 16:35:40 -04:00
Yashwanth
e96e5bd074 disp: msm: sde: add pending ctl recovery mask in sde_kms
This change adds pending ctl recovery mask in sde kms
structure to check if there are any ctl paths pending
for recovery and stages only border fill during such
conditions to avoid device crash. Below is the issue
sequence observed during the crash:

1) On one of the ctl path, flush didn't take effect and
flush bits are still pending.

2) It was a NULL flush and last good flush on that
interface has DMA2 pipe staged along with other pipes.

3) Different ctl path re-uses the DMA2 pipe (attached to
ctl path in #1) causing wr_ptr timeout followed by
ppdone timeout.

Change-Id: I07eb9f2fe41f59963dc27655c551c05abe240392
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-19 16:35:40 -04:00
qctecmdr
1961183b41 Merge "disp: msm: dsi: check for null pointer during debugfs deinit" 2021-05-19 09:23:00 -07:00
qctecmdr
98ba50ccf2 Merge "disp: msm: sde: correct sspp top/bottom overfetch programming" 2021-05-19 09:23:00 -07:00
qctecmdr
26327ae64b Merge "disp: msm: dsi: avoid PLL configure and toggle during TUI" 2021-05-19 09:23:00 -07:00
qctecmdr
bc3126309a Merge "disp: msm: sde: add checks when retrieving blob feature data" 2021-05-19 04:24:30 -07:00
Nilaan Gunabalachandran
cd77cb672d disp: msm: sde: fix indexing for frame data
This change adds a fix to correct indexing logic while
parsing frame data buffers and resets the count correctly.

Change-Id: Ic5a20ecd7093423ea293432c9492eb920acdd6f4
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-05-18 17:12:46 -04:00
Amine Najahi
dca59625e5 disp: msm: sde: add checks when retrieving blob feature data
Add checks when retrieving CP blob feature data to avoid
intermittent issue with pointer access.

Change-Id: I3a3bd870bb6a5d7bb8d13188af8cc4b9bd06acc5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-05-17 17:56:53 -04:00
Shashank Babu Chinta Venkata
6c16356706 disp: msm: dsi: check for null pointer during debugfs deinit
Add null pointer check for debugfs deinit during
unbind path. Additionally, fix debugfs init to
not free debugfs directory unintentionally.

Change-Id: I430fe8810608a8e56d6d02e996044e69b4116421
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-05-17 12:53:46 -07:00
Amine Najahi
31086e9dab disp: msm: sde: use panel width for rounded corner region size checks
Use panel width variable to compare against RC region size instead
of the ROI size which can change based on the LM configuration.

Change-Id: Ia1d5f88893a55778172e6da10bb235e9c483cd38
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-05-17 14:19:04 -04:00
qctecmdr
30ce58bf9b Merge "disp: msm: sde: clear rounded corner property during last close" 2021-05-17 07:15:51 -07:00
qctecmdr
fec19468be Merge "disp: msm: sde: handle partial update use case in rounded corner" 2021-05-17 07:15:51 -07:00
qctecmdr
394040535c Merge "disp: msm: dsi: skip panel read for simulation panels" 2021-05-16 21:28:57 -07:00
qctecmdr
ceba43ca89 Merge "disp: msm: dsi: avoid te check for simulator panel" 2021-05-16 17:35:53 -07:00
qctecmdr
f95ba61ed8 Merge "disp: msm: dsi: add more info to display bind logs" 2021-05-16 08:49:12 -07:00
qctecmdr
ff27df4031 Merge "disp: msm: sde: avoid reset topology in disable path for POMS" 2021-05-16 08:49:12 -07:00
qctecmdr
4d314a0996 Merge "disp: enable display dlkm to be part of recovery image" 2021-05-16 05:58:09 -07:00
qctecmdr
057a68cd55 Merge "disp: msm: sde: avoid idle pc during ESD recovery" 2021-05-16 02:38:21 -07:00