Commit Graph

83 Commits

Author SHA1 Message Date
jianzhou
5ddfb2b11e disp: msm: dp: fix call to undeclared function build error
drm_dp_mst_hpd_irq was removed, replaced by
drm_dp_mst_hpd_irq_handle_event.

Change-Id: I2a897283ab27ebd1d6a0e89f0f2fa10757a64c04
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
2023-12-20 01:01:03 -08:00
Nisarg Bhavsar
c47f8cb036 disp: msm: dp: cache connector id before post disable
This change stores the connector id before the connector
is set to NULL in post_disable.

Allows tracing through of a single connector's disable
flow in a MST scenario.

Change-Id: Ibf4079ea75c9e0643d0d9976289ab6983509ee93
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-10-13 17:51:57 -07:00
Nisarg Bhavsar
7be22cc1e7 disp: msm: dp: ensure failsafe mode in connector mode list
The dp driver inserts a failsafe mode to be in alginment with
DP specification.

This change ensures that the added failsafe mode does not
get filtered out when a specific mode is selected via
the debugfs functions.

Change-Id: I56039527eaf77111c6a51a40d1ea143fa0693a70
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-09-29 19:56:59 -07:00
Nisarg Bhavsar
baf508ce8b disp: msm: dp: Add vc_start_slot check before payload allocation call
Adds a check for payload's vc_start_slot before attempting to finish
payload allocation. vc_start_slot is set to -1 on payload allocation
part 1 failure.

Prevents calling mst helper function on failed payload allocation.

Change-Id: I435f370616afbc875bffd9207b2eb1cf98086178
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-08-03 12:27:13 -07:00
Nisarg Bhavsar
60c9dce746 disp: msm: dp: Add null check after payload allocation
Adds null check for MST port and connector after payload
allocation. Prevents calling mst helper functions with
a null port or connector on a failed payload allocation.

Change-Id: I8e228bd1498b11b302371c1ad6d805d5f941667e
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-07-26 09:07:41 -07:00
Nisarg Bhavsar
64682fee0e disp: msm: dp: Add null check for payload allocation
Adds null check for payload allocation to prevent calling
mst helper functions with a null payload.

Change-Id: I63951eec7714bbf00ff7c968ea4e6b1ced9a29e3
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-06-23 09:08:50 -07:00
Rajkumar Subbiah
ff99320123 disp: msm: dp: ensure failsafe mode in connector mode list
The driver currently inserts a failsafe mode when EDID read fails
for SST. But for cases where the edid read succeeds but all the
modes are getting filtered out because of resource availability,
the driver does not add the failsafe mode. But the usermode
expects the failsafe mode to be always present in the mode list
as per DP specification. Also, the driver currently does not
add the failsafe mode, if the edid read fails on an MST monitor.

This change covers all these missing cases and makes sure the
failsafe mode is always in the connector's mode list if it is
in connected state.

Change-Id: I92eeaa00ad7b26a18b3689aa1c2ada4244aba3bc
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-06-07 10:58:08 -04:00
qctecmdr
0b57a269e2 Merge "disp: msm: dp: use new api for drm_dp_remove_payload" 2023-05-31 15:48:32 -07:00
qctecmdr
45435d6598 Merge "disp: msm: dp: skip mst display enable if payload is empty" 2023-05-31 15:48:31 -07:00
jianzhou
4aa8db1b2b disp: msm: dp: use new api for drm_dp_remove_payload
The API for drm_dp_remove_payload in DRM framework was changed to include
both the old and new payload states. This change updates the MST driver
to use the new API.

Link: https://patchwork.freedesktop.org/patch/msgid/20230206114856.2665066-2-imre.deak@intel.com
Change-Id: Iaf1c6842674b792c8e939404855ff9e9fce127c4
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-31 14:18:50 -04:00
Rajkumar Subbiah
3260a80dab disp: msm: dp: skip mst display enable if payload is empty
During MST display enablement, the time slots for the display are
calculated during mst atomic check, which is then used in the
enable path. But if for some reason the payload wasn't allocated
successfully, then the enable path will have the time slots set to
0 which causes a send video timeout and also the missing payload
could result in null pointer dereferencing in step2 of mst payload
addition.

This change checks for this situation during pre-enable and returns
an error so the enable does not continue ahead.

Change-Id: If139707537b7a6dba169841ac82841851b4c09cb
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-24 15:38:59 -04:00
Rajkumar Subbiah
4e82bfb0fa disp: msm: dp: fix pbn value for MST RG calculation
The DP MST driver calculates the PBN value for each mode during
mode enumeration. This PBN value is later used to calculate slot
count and also MST RG parameters. But if DSC and/or FEC is enabled,
then the slot calculation needs the PBN with overhead, but
RG calculator needs the one without. But currently, the driver is
using the PBN with overhead for both. This double counting of the
overhead for RG calculation causes MST FIFO overflow for certain
usecases.

This change fixes this by caching both PBN values during mode
enumeration and using the PBN value without overhead as input
to RG calculation.

Change-Id: Id58e91068c25202e6528a793ab736bc51732961f
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-05-11 22:48:10 -04:00
Rajkumar Subbiah
8722b154e7 disp: msm: dp: fix unused label for kalama compilation
This change fixes the unused label warning, when compiling
this driver for kalama, introduced by change
I383680c54feb826676965282e76bb3e5c3e17c4c.

Change-Id: Ia7c51fd1956b847220ebeae29a51edcc9f4dbf7e
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-04-20 18:18:22 -07:00
qctecmdr
8dcfe0cb6b Merge "disp: msm: dp: catch and propagate slot allocation failures" 2023-04-19 14:34:14 -07:00
qctecmdr
a6e0f3a73d Merge "disp: msm: dp: log an error when connector has no modes" 2023-04-19 14:34:14 -07:00
Nisarg Bhavsar
902ac9549a disp: msm: dp: Update vcpi start slot for MST single port plug/unplug
Update vcpi start slot for other connectors when an individual connector is unplugged.
Currently the driver is caching the previous start slot and doing the adjustment
in a single pass. When the connectors are removed and added in a specific order,
it is possible that the list of payloads are not sorted by start_slot and the
removed payload is not the first payload in the list.
The current logic does not support this case and will leave the start_slot of
the first payload unadjusted thereby resulting in an invalid slot allocation.

This change does the caching and adjustment in two separate passes to make sure
the start slot adjustment happens irrespective of the order of the payloads.

Change-Id: I5ca7ded263740590b0fe3cc31c8d67441a42c92f
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-04-17 14:00:19 -07:00
Soutrik Mukhopadhyay
05863e8521 disp: msm: dp: check for atomic phase
This change checks for the atomic state and ensures
that allocation and deallocation of vcpi slots is
prevented in the same phase.

Change-Id: I05c87db43eca8ba749ed8a0907dcaf95945dd645
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-04-14 15:42:52 -07:00
Rajkumar Subbiah
d29268e7e1 disp: msm: dp: catch and propagate slot allocation failures
During atomic check for MST plugins, the driver is not catching and
propagating failures properly thereby incorrectly returning a
success even though the slot allocation had failed. This causes
invalid access of payload data in the MST topology manager.

This change checks the return code for slot allocation and atomic
check calls and propagates them to caller.

Change-Id: I383680c54feb826676965282e76bb3e5c3e17c4c
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-04-12 14:24:04 -07:00
Rajkumar Subbiah
71bc23e898 disp: msm: dp: log an error when connector has no modes
After MST mode enumeration, check the mode count and print
an error message if no modes are returned.

Change-Id: I89352263c137680a1260dabbe8ab38e32e2a4882
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-04-10 17:48:01 -07:00
Soutrik Mukhopadhyay
32d257a5ab disp: msm: dp: release vcpi slots for a modeset change for crtc state
In MST atomic check function, allow to release vcpi slots for
any case of changes in modes, active state or connectors for a crtc state.
This reverts the commmit id 28cde80bd3666b6b339a21cac3d04b3b11c318b6.

Change-Id: Ice13790f2e652b336619e1d78b42ddb708b4cb2e
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-03-23 08:39:23 -07:00
Rajkumar Subbiah
1cea6256c4 disp: msm: dp: fix mst slot allocation on disable
When a display is disabled, the mst slot payloads get updated in the
topology manager and also the start_slot for the remaining payloads
get adjusted, if necessary to start from 1. But the copy of these
values in dp_mst_drm context are getting readjusted properly. But
since the local context is used to update the slot configuration in
the dp controller, it is possible for the slot configuration in the
source and sink to mismatch causing blank output.

This change introduces a 2 pass solution while updating timeslots to
make sure the values in the bridge context reflect the values in
the topology manager.

Change-Id: Ia6f66e8d5ffcde3f25b1b2649733a547a06de995
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2023-03-20 13:27:05 -07:00
Sandeep Gangadharaiah
51ee816c56 disp: msm: dp: port API changes related to MST payload update
Latest LTS kernel has refactored the payload code for MST. This
change port the latest payload related API changes.

LINKED: https://patchwork.freedesktop.org/patch/498176/
Change-Id: I0f5bfe30824c5a9bbf4bc346a24f236a53bc0d70
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2023-01-26 12:57:47 -08:00
Sandeep Gangadharaiah
d35438d1be disp: msm: dp: reorder update payload call during slot calculation
Currently get vcpi info call is returning wrong slot info since update
payload function is called afterwards. The latter function is calculating
the slot info which is read back by get vcpi call. This change reorders
these function calls. Also, this change sets start_slot to be always 1.
This is the value expected by upstream driver for atomic drivers.
This is a follow up change for the commit 19a9abf064
("disp: msm: dp: update MST first link slot information").

Change-Id: I620125a2d73afb7537a3540ee129e2a4eb0c488c
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-12-05 13:13:42 -08:00
Andrew Bartfeld
5dcee7c010 disp: msm: dp: avoid releasing vcpi for active crtc
In MST atomic check function, add a check to ensure it's a disable call
before releasing vcpi slots to ensure atomic_release_vcpi_slots() and
atomic_find_vcpi_slots() are never called in the same atomic check
as mentioned in the kernel docs.

Change-Id: I36cf689b4d3bf9d2469a6c402b6377a667f01c12
Signed-off-by: Andrew Bartfeld <quic_abartfel@quicinc.com>
2022-11-01 05:27:16 -07:00
GG Hou
19a9abf064 disp: msm: dp: update MST first link slot information
update MST first link slot information as upsteam interface

Link: https://patchwork.freedesktop.org/patch/msgid/20211025223825.301703-3-lyude@redhat.com

Change-Id: I871504942d596ee742e5481be9c8b6cf0f50e8ac
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-26 14:11:37 -04:00
GG Hou
11f0929a72 disp: msm: dp: update include file path for upstream headers
This change updates the include file path for necessary dp
and dsc headers that have moved in upstream kernel.

File path changed in upstream:
include/drm/display/drm_dp_aux_bus.h
include/drm/display/drm_dp_dual_mode_helper.h
include/drm/display/drm_dp.h
include/drm/display/drm_dp_helper.h
include/drm/display/drm_dp_mst_helper.h
include/drm/display/drm_dsc.h
include/drm/display/drm_dsc_helper.h
include/drm/display/drm_hdcp.h
include/drm/display/drm_hdcp_helper.h
include/drm/display/drm_hdmi_helper.h
include/drm/display/drm_scdc.h
include/drm/display/drm_scdc_helper.h

Change-Id: Icb9a227c7464061f68fe60cbda6d93858fa768c5
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:06:29 -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
Nisarg Bhavsar
15b7e73a10 disp: msm: dp: add debug logs to ipc logging
Add existing debug logs to ipc logging to be
accessed through debugfs.

Change-Id: Id9bfe61cb7921674eadc5635847c81a0fbdaef5c
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-06-14 17:09:54 -07:00
Rajkumar Subbiah
7ec4eae53b disp: msm: dp: use link clk khz when initializing mst mgr
MST driver is incorrectly using maximum bw_code while initializing
MST topology manager instead of maximum link clock in KHz. This
prevents the topology manager to set MST state on a subsequent MST
plug in causing all MST cases to fail.

Change-Id: I9fc4e0326fe0c7a6c9b81af8810b7098fa8ba967
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-01-20 13:55:28 -05:00
Bruce Hoo
a5c5224acd disp: msm: dp: adapt function change of drm_dp_mst_topology_mgr_init for multiple SIs
Commit 283560c ("disp: msm: dp: use Extended Base Receiver Capability DPCD space")
pass additional parameters to supply maximum lane count and rate to MST topology
manager. In cases where sources have lower maximum lane count or rate than default
MAX_LINK_RATE, these values will be used instead.
This change puts macros in the callers of function drm_dp_mst_topology_mgr_init to
handle interface change between kernel version 5.10 and version 5.15.

Change-Id: I394c70640606de477d67b08cafb495bebb6c549f
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:32:02 +08:00
Bruce Hoo
283560cb39 disp: msm: dp: use Extended Base Receiver Capability DPCD space
Pass additional parameters to supply maximum lane count and
rate to MST topology manager. In cases where sources have
lower maximum lane count or rate than default MAX_LINK_RATE,
these values will be used instead.

Change-Id: I9278ce6cc9fbacaf3f6d964c5036208c0695a79b
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:11 -07:00
Rajkumar Subbiah
eebce2ae4c disp: msm: dp: add support for 3.75:1 compression
Currently the DP driver always uses a compression ratio of 3, if
DSC is enabled. So if the sink supports 30bpp, the compressed
output is set to 10bpp. But since the hardware supports
compressing this to 8bpp, it would require less link bandwidth
than 10bpp compressed output. For compliance testing, the
test equipment limits the link bandwidth based on the most
efficient compression ratio and for some resolutions there
is not enough link bandwidth for 3:1 compression.

This change always sets the compression output to 8bpp to
minimize the link bandwidth utilization.

Change-Id: Ifa6129444c2bab4e9c357ddfe49f76efa5b04be0
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-08-05 20:26:34 -04:00
Sudarsan Ramesh
1def76170d disp: msm: dp: clear mst edid cache for real monitor plugin
Currently edid cache is cleared only in the mst attention callback
flow i.e. if a monitor is plugged in/out of a mst dongle. If mst
dongle is plugged out directly, the edid cache is not cleared.
This change clears the edid cache also during the
connect/disconnect callback.

Change-Id: Icc4b4ca6a59f1ee32f7fe062831a3a19f4ab9f00
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-07-19 10:40:22 -04:00
Sudarsan Ramesh
65f1c136ea disp: msm: dp: change the detect callback to detect_ctx
The connector detect function is currently implemented as a
callback from the framework, and creates a context before
calling the detect_port_ctx MST callback. This change updates
the callflow so that the framework calls the new detect_ctx
function in the MST case. This removes the need for creating a
new context before calling further downstream functions.

In addition, references to the mst_connector_get_info
function were replaced by connector_get_info to avoid
redundancy.

Change-Id: I224d09e77fad4b6925a42b1bc912a05e3e4d060a
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-06-16 15:57:54 -04: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
Sudarsan Ramesh
45877a3be6 disp: msm: dp: clear cache upon writing to edid debugfs node
Currently, any edids read by the driver are cached in the
sde_connector object. In the event that subsequent edids are written,
the cached edid is used instead of the newly written edid.

In the event a new edid is written to the edid debugfs node over
dpsim, this change clears the current cached edid before overwriting
the new one.

Change-Id: I53f870e97c3b9ac5954d193f74e4b272386f67a8
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-16 16:08:50 -04: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
Xiaowen Wu
467443d7e3 disp: msm: dp: use dp_msm_sim for dp-mst simulation
Revert changes in dp mst topology manager and use dp_msm_sim bridge
at aux layer to implement dp-mst simulation.

Change-Id: I863649f901ac918f65c9078e6a2f1b6931d19e3a
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-10 22:34:33 -05:00
Sudarsan Ramesh
d2f89901b1 disp: msm: dp: fix modeset locking in dp_mst_connector_detect
The modeset lock acquired in dp_mst_connector_detect is not
being released after the detection is completed, which
causes subsequent deadlock.

Added a call to drm_modeset_drop_locks when coming out of
dp_mst_connector_detect.

Change-Id: Ibce79934d0ac23fed4985291c5c6078cb982e812
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-01-29 11:36:10 -05:00
Amine Najahi
08358fd857 disp: msm: remove use of drm_display_mode vrefresh
Use of drm_display_mode vrefresh is being deprecated in
upstream DRM framework. Downstream driver need to use
drm_mode_vrefresh API from now on.

This change removes dependency on drm_display_mode vrefresh
and replaces it with drm_mode_vrefresh API in SDE, DSI and
DP driver. In addition, it also modifies drm_display_mode clock
to align with upstream approach where an uncompressed mode clock
is required to match drm_mode_vrefresh API.

Change-Id: Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-01-13 16:08:27 -05:00
Nilaan Gunabalachandran
edc49ec57e disp: msm: dp: add parameter to pass PBN divider
Commit 1c6c1cb5afc7 ("drm/dp_mst: Manually overwrite
PBN divider for calculating timeslots") adds a parameter
enabling PBN divider to be overriden. This change updates
the dp driver to set this to 0, which will not override
by default.

Change-Id: I902acc29508f4d32abd34d616b4024e51ee71fd7
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 10:06:32 -05:00
Samantha Tran
af5aee268a disp: msm: dp: dp detect port
Commit 3f9b3f02dda5 ("drm/dp_mst: Protect drm_dp_mst_port
members with locking") adds locking while detecting mst ports.
This change updates the dp driver to pass in the ctx which
is acquired at that time.

Change-Id: I8e5ba9648494f9b4f8fa3d1654ec22dd2502e0b0
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 10:06:32 -05:00
Samantha Tran
f01cd2c0e1 disp: msm: dp: dp mst cb remove register and destroy connector
Commit 72dc0f515913 ("drm/dp_mst: Remove
drm_dp_mst_topology_cbs.destroy_connector and
commit a5c4dc165957 ("drm/dp_mst: Remove register_connector callback")
deprecate certain call back APIs in DP MST. This changes updates the
DP driver to remove the APIs and register the connector through
drm_register_connector.

Change-Id: Id553a95b930479c216be1744cce00a943575571e
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 10:06:32 -05:00
Samantha Tran
5de10845c6 disp: msm: dp: dp connector mutex lock renamed
Commit 7cb12d48314e ("drm/dp_mst: Destroy MSTBs asynchronously")
renames the connector destroy lock. This changes updates the
dp driver to use the updated lock.

Change-Id: I23b3d2c5a661b894c97468490c1afee70daac0bf
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 10:06:32 -05:00
Samantha Tran
2616e57a0a disp: msm: encoder_ids replaced in drm_connector
Commit 62afb4ad425a ("drm/connector: Allow max possible encoders
to attach to a connector") enables additional encoders per
connector through use of a mask rather than encoder ids.
This change updates the driver when looking for an encoder
for the connector to look through the list of all possible encoders.

Change-Id: I69cc7c38cd0a9842ed2f15712feeb3c6b88daadf
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
0c08cb1fb5 disp: msm: update parameters for drm_bridge_attach
Commit a25b988ff83f ("drm/bridge: Extend bridge API to
disable connector creation") and commit ee68c743f8d0 ("drm: Stop
including drm_bridge.h from drm_crtc.h) add additional input flags.
This change adds fixes to the drm bridge attach API and includes
relevant drm_bridge header files.

Change-Id: I85e84eaff7df2995243896108a217fae81716b63
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:27:46 -08:00
Samantha Tran
3d1a54ed8d disp: msm: dp: drm_dp_calc_pbn_mode includes dsc enable/disable bool
Commit dc48529fb14e ("drm/dp_mst: Add PBN calculation for DSC modes")
adds support for handling fractional bpp values for dsc usecases.
This change sets this to false since the driver uses unadjusted bpp.

Change-Id: I10b4a74fd512c5ffb333f8664effb5efb8ea6c4e
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:25:38 -08:00
Samantha Tran
16cc165833 disp: msm: obtain bridge from bridge chain
Commit 05193dc38197 ("drm/bridge: Make the bridge chain
a double-linked list") creates a bridge chain linked
list. This change updates the relevant changes to msm
driver to use the list to find the bridge associated to
the encoder.

Change-Id: I59eb2910be96f4fff7bdbeb040d6ad204c41d747
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:24:59 -08:00
Samantha Tran
4b150347fc disp: msm: dp: use full_pbn instead of available_pbn
Commit fcf463807596 ("drm/dp_mst: Use full_pbn instead of
available_pbn for bandwidth checks") changes bandwidth checks
to look at the Full PBN bandwidth rather than the available PBN.
This change updates the relevant changes to the dp driver.

Change-Id: I2a713a9b6fd10314bd768331dcea00950b6edf7f
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:20:53 -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