From: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>,
Wenjing Liu <Wenjing.Liu-5C7GfCeVMHo@public.gmane.org>,
Nikola Cornij <Nikola.Cornij-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH v2 12/14] drm/amd/display: Write DSC enable to MST DPCD
Date: Tue, 20 Aug 2019 15:12:01 -0400 [thread overview]
Message-ID: <20190820191203.25807-13-David.Francis@amd.com> (raw)
In-Reply-To: <20190820191203.25807-1-David.Francis-5C7GfCeVMHo@public.gmane.org>
Rework the dm_helpers_write_dsc_enable callback to
handle the MST case
Depending on how DSC is done, the DP_DSC_ENABLE bit
needs to be set on a different point
For SST, use the link aux
For endpoint DSC over DP-to-DP peer devices,
use the output port
For peer device DSC over DP-to-DP peer devices,
use the upstream (peer) device
For DP-to-HDMI or virtual DP peer devices,
use the output port
For the Synaptix workaround, use the link aux
Cc: Wenjing Liu <Wenjing.Liu@amd.com>
Cc: Nikola Cornij <Nikola.Cornij@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
---
.../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 30 ++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index dfa99e0d6e64..62731c2bf2bf 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -38,6 +38,7 @@
#include "dc.h"
#include "amdgpu_dm.h"
#include "amdgpu_dm_irq.h"
+#include "amdgpu_dm_mst_types.h"
#include "dm_helpers.h"
@@ -556,8 +557,35 @@ bool dm_helpers_dp_write_dsc_enable(
)
{
uint8_t enable_dsc = enable ? 1 : 0;
+ struct amdgpu_dm_connector *aconnector;
+
+ if (!stream)
+ return false;
+
+ if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
+ aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
+
+ if (!aconnector || !aconnector->dc_sink)
+ return false;
+
+ if (!aconnector->dc_sink->sink_dsc_caps.is_virtual_dpcd_dsc)
+ return drm_dp_mst_dpcd_write(&aconnector->port->aux,
+ DP_DSC_ENABLE, &enable_dsc, 1) >= 0;
+ else if (is_virtual_dpcd(aconnector->port->parent->port_parent))
+ return drm_dp_mst_dpcd_write(&aconnector->port->parent->port_parent->aux,
+ DP_DSC_ENABLE, &enable_dsc, 1) >= 0;
+ else if (is_virtual_dpcd(aconnector->port))
+ return drm_dp_mst_dpcd_write(&aconnector->port->aux,
+ DP_DSC_ENABLE, &enable_dsc, 1) >= 0;
+ else if (synaptix_workaround(aconnector))
+ return dm_helpers_dp_write_dpcd(ctx, stream->link,
+ DP_DSC_ENABLE, &enable_dsc, 1);
+ }
+
+ if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT)
+ return dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
- return dm_helpers_dp_write_dpcd(ctx, stream->sink->link, DP_DSC_ENABLE, &enable_dsc, 1);
+ return false;
}
#endif
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-08-20 19:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 19:11 [PATCH v2 00/14] Display Stream Compression (DSC) for AMD Navi David Francis
2019-08-20 19:11 ` [PATCH v2 01/14] Revert "drm/amd/display: skip dsc config for navi10 bring up" David Francis
2019-08-20 19:11 ` [PATCH v2 03/14] Revert "drm/amd/display: add global master update lock for DCN2" David Francis
2019-08-20 19:11 ` [PATCH v2 04/14] Revert "drm/amd/display: Fix underscan not using proper scaling" David Francis
2019-08-20 19:11 ` [PATCH v2 09/14] drm/dp-mst: Export symbols for dpcd read/write David Francis
[not found] ` <20190820191203.25807-10-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 21:02 ` Lyude Paul
[not found] ` <773c80494087854b72ffb85938f0ea54bd89c121.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-08-20 21:35 ` Li, Sun peng (Leo)
[not found] ` <20190820191203.25807-1-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 19:11 ` [PATCH v2 02/14] Revert "drm/amd/display: navi10 bring up skip dsc encoder config" David Francis
2019-08-20 19:11 ` [PATCH v2 05/14] drm/amd/display: Enable SST DSC in DM David Francis
2019-08-20 19:11 ` [PATCH v2 06/14] drm/dp-mst: Use dc and drm helpers to compute timeslots David Francis
[not found] ` <20190820191203.25807-7-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 20:43 ` Lyude Paul
[not found] ` <eccdbdb90afa28079a92b9cd959a1cb54ed952b3.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-08-21 12:27 ` Kazlauskas, Nicholas
[not found] ` <f63c563e-3aa5-0772-559b-6b34ef612495-5C7GfCeVMHo@public.gmane.org>
2019-08-21 18:57 ` Lyude Paul
2019-08-20 19:11 ` [PATCH v2 07/14] drm/amd/display: Initialize DSC PPS variables to 0 David Francis
2019-08-20 19:11 ` [PATCH v2 08/14] drm/dp-mst: Parse FEC capability on MST ports David Francis
[not found] ` <20190820191203.25807-9-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 20:40 ` Lyude Paul
2019-08-20 19:11 ` [PATCH v2 10/14] drm/dp-mst: Fill branch->num_ports David Francis
[not found] ` <20190820191203.25807-11-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 21:08 ` Lyude Paul
2019-08-20 19:12 ` [PATCH v2 11/14] drm/amd/display: Validate DSC caps on MST endpoints David Francis
[not found] ` <20190820191203.25807-12-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 20:34 ` Lyude Paul
2019-08-21 18:14 ` Kazlauskas, Nicholas
2019-08-20 19:12 ` David Francis [this message]
2019-08-20 19:12 ` [PATCH v2 13/14] drm/amd/display: MST DSC compute fair share David Francis
2019-08-20 19:12 ` [PATCH v2 14/14] drm/amd/display: Trigger modesets on MST DSC connectors David Francis
[not found] ` <20190820191203.25807-15-David.Francis-5C7GfCeVMHo@public.gmane.org>
2019-08-20 21:09 ` Lyude Paul
[not found] ` <f7272de2841c61f1297f0fce493efe5dd5317dfa.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-08-21 12:25 ` Kazlauskas, Nicholas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190820191203.25807-13-David.Francis@amd.com \
--to=david.francis-5c7gfcevmho@public.gmane.org \
--cc=Nikola.Cornij-5C7GfCeVMHo@public.gmane.org \
--cc=Wenjing.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox