From: Lyude Paul <lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: mikita.lipski-5C7GfCeVMHo@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>,
Harry Wentland <harry.wentland-5C7GfCeVMHo@public.gmane.org>,
Jani Nikula <jani.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 09/15] drm/dp_mst: Add new quirk for Synaptics MST hubs
Date: Thu, 19 Sep 2019 19:44:28 -0400 [thread overview]
Message-ID: <1ceffe460c57ed74df7cc03a9dd7238102be2cf0.camel@redhat.com> (raw)
In-Reply-To: <6b11214d7aaa5bff6ba60846a1569b6f2ac25b0b.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>
Great work!
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Wed, 2019-09-18 at 16:26 -0400, mikita.lipski@amd.com wrote:
> From: David Francis <David.Francis@amd.com>
>
> Synaptics DP1.4 hubs (BRANCH_ID 0x90CC24) do not
> support virtual DPCD registers, but do support DSC.
> The DSC caps can be read from the physical aux,
> like in SST DSC. These hubs have many different
> DEVICE_IDs. Add a new quirk to detect this case.
>
> Change-Id: I9d332f273dfca0cfbced111e62f5a06c5c312893
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
> Signed-off-by: David Francis <David.Francis@amd.com>
> ---
> drivers/gpu/drm/drm_dp_helper.c | 4 +++-
> drivers/gpu/drm/drm_dp_mst_topology.c | 27 +++++++++++++++++++++++++++
> include/drm/drm_dp_helper.h | 7 +++++++
> 3 files changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c
> b/drivers/gpu/drm/drm_dp_helper.c
> index 0cbf10727bd6..c3e1da78e442 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -1288,7 +1288,9 @@ static const struct dpcd_quirk dpcd_quirk_list[] = {
> /* LG LP140WF6-SPM1 eDP panel */
> { OUI(0x00, 0x22, 0xb9), DEVICE_ID('s', 'i', 'v', 'a', 'r', 'T'),
> false, BIT(DP_DPCD_QUIRK_CONSTANT_N) },
> /* Apple panels need some additional handling to support PSR */
> - { OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false,
> BIT(DP_DPCD_QUIRK_NO_PSR) }
> + { OUI(0x00, 0x10, 0xfa), DEVICE_ID_ANY, false,
> BIT(DP_DPCD_QUIRK_NO_PSR) },
> + /* Synaptics DP1.4 MST hubs can support DSC without virtual DPCD */
> + { OUI(0x90, 0xCC, 0x24), DEVICE_ID_ANY, true,
> BIT(DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD) },
> };
>
> #undef OUI
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c
> b/drivers/gpu/drm/drm_dp_mst_topology.c
> index dd2ca065cc92..4e493d8af288 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -4219,6 +4219,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct
> drm_dp_mst_port *port)
> {
> struct drm_dp_mst_port *immediate_upstream_port;
> struct drm_dp_mst_port *fec_port;
> + struct drm_dp_desc desc = { 0 };
>
> if (!port)
> return NULL;
> @@ -4271,6 +4272,32 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct
> drm_dp_mst_port *port)
> if (drm_dp_mst_is_virtual_dpcd(port))
> return &port->aux;
>
> + /*
> + * Synaptics quirk
> + * Applies to ports for which:
> + * - Physical aux has Synaptics OUI
> + * - DPv1.4 or higher
> + * - Port is on primary branch device
> + * - Not a VGA adapter (DP_DWN_STRM_PORT_TYPE_ANALOG)
> + */
> + if (!drm_dp_read_desc(port->mgr->aux, &desc, true))
> + return NULL;
> +
> + if (drm_dp_has_quirk(&desc, DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD) &&
> + port->mgr->dpcd[DP_DPCD_REV] >= DP_DPCD_REV_14 &&
> + port->parent == port->mgr->mst_primary) {
> + u8 downstreamport;
> +
> + if (drm_dp_dpcd_read(&port->aux, DP_DOWNSTREAMPORT_PRESENT,
> + &downstreamport, 1) < 0)
> + return NULL;
> +
> + if ((downstreamport & DP_DWN_STRM_PORT_PRESENT) &&
> + ((downstreamport & DP_DWN_STRM_PORT_TYPE_MASK)
> + != DP_DWN_STRM_PORT_TYPE_ANALOG))
> + return port->mgr->aux;
> + }
> +
> return NULL;
> }
> EXPORT_SYMBOL(drm_dp_mst_dsc_aux_for_port);
> diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
> index 6ae1a6765f63..919ad940bfb1 100644
> --- a/include/drm/drm_dp_helper.h
> +++ b/include/drm/drm_dp_helper.h
> @@ -1414,6 +1414,13 @@ enum drm_dp_quirk {
> * driver still need to implement proper handling for such device.
> */
> DP_DPCD_QUIRK_NO_PSR,
> + /**
> + * @DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD:
> + *
> + * The device supports MST DSC despite not supporting Virtual DPCD.
> + * The DSC caps can be read from the physical aux instead.
> + */
> + DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD,
> };
>
> /**
--
Cheers,
Lyude Paul
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-09-19 23:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 20:26 [PATCH 00/15] DSC MST support for AMDGPU mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 02/15] drm/amdgpu: Add connector atomic check mikita.lipski
[not found] ` <c33861b3983fe3bb3dbd9c7026cec960f4ce1a6e.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2019-09-19 23:38 ` Lyude Paul
2019-09-18 20:26 ` [PATCH 08/15] drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux mikita.lipski
[not found] ` <8c8b8ad55ea714ef5c7f48ff5cd9b889dcead76b.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2019-09-19 23:41 ` Lyude Paul
2019-09-18 20:26 ` [PATCH 10/15] drm/amd/display: Use correct helpers to compute timeslots mikita.lipski
2019-09-18 20:26 ` [PATCH 12/15] drm/amd/display: Validate DSC caps on MST endpoints mikita.lipski
[not found] ` <cover.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2019-09-18 20:26 ` [PATCH 01/15] drm/amdgpu: Add encoder atomic check mikita.lipski-5C7GfCeVMHo
2019-09-18 22:55 ` Lyude Paul
[not found] ` <0dba0e8b72c146cc1d27c8895b1c732e719fc371.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2019-09-19 23:37 ` Lyude Paul
2019-09-18 20:26 ` [PATCH 03/15] drm/amdgpu: validate mst topology in " mikita.lipski-5C7GfCeVMHo
2019-09-19 23:40 ` Lyude Paul
2019-09-18 20:26 ` [PATCH 04/15] drm/dp_mst: Add PBN calculation for DSC modes mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 05/15] drm/dp_mst: Parse FEC capability on MST ports mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 06/15] drm/dp_mst: Add MST support to DP DPCD R/W functions mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 07/15] drm/dp_mst: Fill branch->num_ports mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 09/15] drm/dp_mst: Add new quirk for Synaptics MST hubs mikita.lipski-5C7GfCeVMHo
[not found] ` <6b11214d7aaa5bff6ba60846a1569b6f2ac25b0b.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2019-09-19 23:44 ` Lyude Paul [this message]
2019-09-18 20:26 ` [PATCH 11/15] drm/amd/display: Initialize DSC PPS variables to 0 mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 13/15] drm/amd/display: Write DSC enable to MST DPCD mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 14/15] drm/amd/display: MST DSC compute fair share mikita.lipski-5C7GfCeVMHo
2019-09-18 20:26 ` [PATCH 15/15] drm/amd/display: Trigger modesets on MST DSC connectors mikita.lipski-5C7GfCeVMHo
2019-09-20 0:08 ` Lyude Paul
[not found] ` <2a8d122361f414101ef618cbf4fbd8fee29aabc9.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-10-01 14:04 ` Mikita Lipski
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=1ceffe460c57ed74df7cc03a9dd7238102be2cf0.camel@redhat.com \
--to=lyude-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=David.Francis-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
--cc=jani.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=mikita.lipski-5C7GfCeVMHo@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