From: Harry Wentland <hwentlan@amd.com>
To: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>,
amd-gfx@lists.freedesktop.org
Cc: rodrigo.siqueira@amd.com
Subject: Re: [PATCH] drm/amd/display: Fix HW/SW state mismatch
Date: Fri, 24 Jan 2020 14:27:56 -0500 [thread overview]
Message-ID: <aee63cb2-d140-3442-aef4-884a9df9ef11@amd.com> (raw)
In-Reply-To: <20200116202046.10991-1-Bhawanpreet.Lakha@amd.com>
On 2020-01-16 3:20 p.m., Bhawanpreet Lakha wrote:
> [Why]
> When we disable a connector we don't explicitly remove it from the module so the
> display is still cached(SW) in the hdcp_module.
>
> SST: no issues because we can only have 1 display per link
>
> MST: We have x displays per link, now if we disable 1 we don't remove it from the
> module so the module has x display cached(SW).
>
> If we try to enable HDCP, psp verification will fail because we are reporting x
> displays while the HW only has x-1 display enabled
>
> [How]
> Check the callback for when we disable stream and call remove display.
>
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> index ae329335dfcc..0acd3409dd6c 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
> @@ -135,6 +135,20 @@ void hdcp_update_display(struct hdcp_workqueue *hdcp_work,
> mutex_unlock(&hdcp_w->mutex);
> }
>
> +static void hdcp_remove_display(struct hdcp_workqueue *hdcp_work,
> + unsigned int link_index,
> + struct amdgpu_dm_connector *aconnector)
> +{
> + struct hdcp_workqueue *hdcp_w = &hdcp_work[link_index];
> +
> + mutex_lock(&hdcp_w->mutex);
> + hdcp_w->aconnector = aconnector;
> +
> + mod_hdcp_remove_display(&hdcp_w->hdcp, aconnector->base.index, &hdcp_w->output);
> +
> + process_output(hdcp_w);
> + mutex_unlock(&hdcp_w->mutex);
> +}
> void hdcp_reset_display(struct hdcp_workqueue *hdcp_work, unsigned int link_index)
> {
> struct hdcp_workqueue *hdcp_w = &hdcp_work[link_index];
> @@ -303,6 +317,11 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
> memset(link, 0, sizeof(*link));
>
> display->index = aconnector->base.index;
> +
> + if (config->dpms_off) {
> + hdcp_remove_display(hdcp_work, link_index, aconnector);
> + return;
> + }
> display->state = MOD_HDCP_DISPLAY_ACTIVE;
>
> if (aconnector->dc_sink != NULL)
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2020-01-24 19:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 20:20 [PATCH] drm/amd/display: Fix HW/SW state mismatch Bhawanpreet Lakha
2020-01-24 19:27 ` Harry Wentland [this message]
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=aee63cb2-d140-3442-aef4-884a9df9ef11@amd.com \
--to=hwentlan@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=rodrigo.siqueira@amd.com \
/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