Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
qctecmdr
280c38cc54 Merge "disp: msm: dp: check panel state before accessing dp audio registers" 2023-03-13 21:55:12 -07:00
Nisarg Bhavsar
65925ebbf0 disp: msm: dp: check panel state before accessing dp audio registers
During DP disable, it is possible for audio and display to race
causing the audio to send teardown notification after display driver
has disabled all the clocks. This change adds a check for panel state to
avoid accessing registers during this callback.

Change-Id: I6322726a04745bc6c73338cd33f65cfdbfe42ec7
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-03-08 06:58:32 -08:00
Rajkumar Subbiah
da304b72c6 disp: msm: dp: skip crc read if pclk is not on
The DP debugfs node for CRC read currently does not check
if the panel is enabled before attempting the read. This
could cause unclocked access of DP registers. This change
adds the necessary protection and bails out if the clocks
are not turned on.

Change-Id: Ia555e2473fc9f0f7434ee3665eb4fb7cfb4f97cf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-03-06 21:16:01 -05:00
Nisarg Bhavsar
548dc93b0e disp: msm: dp: update resource tracking for 8k@30
Update tracking of layer mixer resources to prevent valid modes
from being skipped during DP topology validation.

Change-Id: Id88337094c4113b721f307d24583a3ca30157216
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-02-21 08:15:50 -08:00
Rajkumar Subbiah
0b72b0d810 disp: msm: dp: add debugfs node for bpp override
Add a debugfs node to set maximum bpp for the base panel which will
be used in both SST and MST use cases to limit the bpp.

Change-Id: I0ef7866e2b82a2078d6cdf97ee0d7226c2125b21
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-01-05 07:19:13 -08:00
Rajkumar Subbiah
7eef92843d disp: msm: dp: add debug node to capture source and sink crc
This change adds a debug node named 'crc' to drm_dp to read
the frame CRC values for DP controller and DP Sink. In order
to facilitate the immediate read of the CRC values when
accessed, it enables the CRC calculation on the controller
and sink automatically when the stream is enabled. In addition
to the frame CRC values it also reads the MISR values from
controller and PHY to validate the data flow from controller
to PHY.

Change-Id: I1acee2dba931e4635caf4a400e336a72c86e88bf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-24 13:47:27 -07:00
Alex Danila
5ed42eb243 disp: msm: dp: address race condition in LM allocation
Addresses a race condition which could cause the RM to overcommiting LMs to
DP when multiple DP displays are used.

sde_rm_get_resource_info now uses the RM's mutex and assumes a null
encoder is not a built in display so that it can return an accurate
count of unreserved resources.

DP layer now maintains internal accounting of LMs in use to avoid
validating modes that have insufficient remaining resources.

Change-Id: I908c1597c1d651b6f9c9b74a34137f30087d8801
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
2022-07-20 13:26:49 -04:00
Sandeep Gangadharaiah
d333d97bd6 disp: msm: dp: get DSC enable status from mode instead of panel
DSC enable status is updated in DP panel struct as per the DPCD reg
read which is done at the start of the HPD ISR. However, there is a
chance that DSC is actually disabled later during mode query due to
shortage of DSC blocks. This status is stored as part of compression
info structure. This change checks for the latter struct to determine
the actual DSC status.

Change-Id: Id7cd4e65060f2ec939f945e9ac4f4e66260605d3
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-06-23 13:19:07 -07:00
Rajkumar Subbiah
bbd8a4b5ab disp: msm: dp: add ability to select pattern for tpg
Currently the tpg_ctrl node takes a boolean flag to enable or disable
test pattern output on DP controller. It always sets the pattern type
to a default pattern. This change updates this interface to accept an
integer value so the user can select different patterns supported by
the controller.

Change-Id: I399091a57f353b2fb8d29a48a8390898ca9afb55
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-04-14 18:08:34 -04:00
qctecmdr
17a3f3cbea Merge "disp: msm: dp: fix dsc resource bookkeeping for mst" 2021-02-23 07:25:38 -08:00
Xiaowen Wu
67ce55687b disp: msm: dp: optimize sim function handling in dp_debug
Remove edid/dpcd simulation function from dp_debug and calls to
sim bridge instead to simplify dp_debug module. Also add mst edid
support and mst hpd simulation from aux level.

Move selected mode from dp_debug module to dp_panel module to
simplify mst handling and decouple dp_debug from main dp driver.

Remove custom edid/dpcd mode from dp_panel and dp_aux module.
Remove mst connector list handling from dp_display module.

Change-Id: Ife1d2deb0e353f0a9695b7b90e5bf3459e1c81f7
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-02-12 14:18:50 -05:00
Sandeep Gangadharaiah
ed103ed1ef disp: msm: dp: fix dsc resource bookkeeping for mst
DP driver maintains the number of allocated DSCs per stream for managing
the availability of DSC blocks for each stream. In the current driver,
if there are errors in the disable path, it is possible for the refcount
to go negative thereby affecting the availability of DSC blocks in
subsequent enables.

This change fixes the refcount logic by making sure the DSC count in the
context correctly reflects the usage.

Change-Id: Id595ec87c186ddb3ed300e1390384f367ef79148
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-02-10 09:54:54 -05:00
Yuan Zhao
a264f27680 disp: msm: dp: set the output format YUV or RGB
When doing mode set, check the given videomode, if it
can be only supported in YCBCR420, set the output
format to YUV420.

Change-Id: I74224e5ad70f4fd8834b5b1e19109d4868cc14ff
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2021-01-28 01:53:15 -08:00
Sudarsan Ramesh
c6b636fe0b disp: msm: dp: validate edid before dereferencing
Currently, when using custom edid from debugfs, the
extensions data inside the edid block is not validated
before dereferencing the extension block.

The fix adds a edid validation function to validate
any custom edids before accessing any members in the
edid block.

Change-Id: I8a2cc45477416a8f8c4cff882bd53d14012e29f4
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-12-07 10:02:42 -08:00
Abhinav Kumar
6db41ed532 disp: msm: dp: add support for continuous PPS command
Add support to send PPS command with every frame for DP.
This is needed to satisfy the requirement of certain bridge
chips which need the PPS to be sent every frame.

Change-Id: I8711dff41e60d8b1e1c515a5d34a370a2409ce14
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-11-24 18:16:28 -05:00
Sankeerth Billakanti
8f89a26df1 disp: msm: dp: remove function get_min_req_link_rate
Remove unused function dp_panel_get_min_req_link_rate.

Change-Id: I91c0860074d1b8e121bf3aef35520e6ffce8552a
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2020-10-11 20:02:29 -07:00
Tatenda Chipeperekwa
4571b23507 disp: msm: dp: use the new altmode framework
Use the new altmode framework to receive the connect, disconnect
and attention events.

Change-Id: Ic542525b526e1abd0f153c293bca6e4cdbb6bf0b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-13 20:26:39 -07:00
Tatenda Chipeperekwa
37412f5add disp: msm: dp: add support for PLL programming
Add support for PLL programming in the DisplayPort driver.

Change-Id: I4f08a621dcae5d1f54d67bb5c34409249012cc7b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-13 20:26:39 -07:00
Tatenda Chipeperekwa
3b1a8807fd disp: msm: dp: use sde_drm.h shared header from techpack path
Update sde_drm.h header to use the display techpack path for
kernel-5.4.

Change-Id: I2b7dcbbde8128eece7a2a8a652f9f7c427b38110
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:34:28 -08:00
Abhinav Kumar
27844b7b60 disp: msm: dp: remove usage of compression ratio enum from DP driver
As overall display driver is moving away from hard-coded compression
ratios, prepare the DP driver for the same by removing the usage of
the compression ratio enum.

Change-Id: I298db7d20baed8afec9f96dff8c7e950702bfec9
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-01-29 13:46:46 -08:00
Fuad Hossain
f3aa71a5e6 disp: msm: dp: Ensure sink supports DSC decoding of selected BPC
The sink may have limited DSC decoding support
for some BPC values. Ensure that the BPC that is
selected is within the sink's DSC capabilities.

CRs-Fixed: 2527660
Change-Id: I0692e7b606e258c3cab3de25d3b03178f4aa0294
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-10-08 14:37:38 -07:00
qctecmdr
60d59191c8 Merge "disp: msm: dp: add colorspace property for MSM DP" 2019-07-28 01:12:00 -07:00
Abhinav Kumar
1286b854ae disp: msm: dp: enhance dpcd debugfs to parse extended capability information
Add support to pass extended capability information to the DPCD
debugfs node. This will help to validate features like VSC support
using debugfs node.

Usage will be the same as before and the change will automatically
detect the presence of extended capability field and expect
additional bytes of information.

Change-Id: If541fd8837aac4794c3db0fa3badeab4143ff9c3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2019-07-24 18:23:54 -07:00
Abhinav Kumar
14e02e4b02 disp: msm: dp: add colorspace property for MSM DP
Add the colorspace property for DP controller for MSM. Also, change
the default method to send the colorimetry information to the sink
from MISC bits of MSA to VSC SDP packets if the sink supports it. This
helps to avoid dynamic switches between the packet types for sending
the colorimetry information during BT2020 and DCI-P3 use-cases.

Change-Id: I7ddf879a187b023fcf7404d64028e4d19b031119
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2019-07-24 17:24:27 -07:00
Narendra Muppalla
3709853456 Display drivers kernel project initial snapshot
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.

Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-04-14 22:20:59 -07:00