All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Roman Li <Roman.Li@amd.com>, Wayne Lin <Wayne.Lin@amd.com>,
	Alexander Deucher <Alexander.Deucher@amd.com>,
	Bindu R <Bindu.R@amd.com>
Subject: [PATCH v2 4/4] drm/amd/display: Fix to be able to stop crc calculation
Date: Tue, 12 Jan 2021 09:55:08 -0500	[thread overview]
Message-ID: <20210112145508.1564863-5-Rodrigo.Siqueira@amd.com> (raw)
In-Reply-To: <20210112145508.1564863-1-Rodrigo.Siqueira@amd.com>

From: Wayne Lin <Wayne.Lin@amd.com>

[Why]
Find out when we try to disable CRC calculation, crc generation is still
enabled. Main reason is that dc_stream_configure_crc() will never get
called when the source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE.

[How]
Add checking condition that when source is
AMDGPU_DM_PIPE_CRC_SOURCE_NONE, we should also call
dc_stream_configure_crc() to disable crc calculation.

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
index c29dc11619f7..66cb8730586b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
@@ -113,7 +113,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,
 	mutex_lock(&adev->dm.dc_lock);
 
 	/* Enable CRTC CRC generation if necessary. */
-	if (dm_is_crc_source_crtc(source)) {
+	if (dm_is_crc_source_crtc(source) || source == AMDGPU_DM_PIPE_CRC_SOURCE_NONE) {
 		if (!dc_stream_configure_crc(stream_state->ctx->dc,
 					     stream_state, NULL, enable, enable)) {
 			ret = -EINVAL;
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Roman Li <Roman.Li@amd.com>, Daniel Vetter <daniel@ffwll.ch>,
	Wayne Lin <Wayne.Lin@amd.com>,
	Alexander Deucher <Alexander.Deucher@amd.com>,
	Harry Wentland <Harry.Wentland@amd.com>,
	Bindu R <Bindu.R@amd.com>
Subject: [PATCH v2 4/4] drm/amd/display: Fix to be able to stop crc calculation
Date: Tue, 12 Jan 2021 09:55:08 -0500	[thread overview]
Message-ID: <20210112145508.1564863-5-Rodrigo.Siqueira@amd.com> (raw)
In-Reply-To: <20210112145508.1564863-1-Rodrigo.Siqueira@amd.com>

From: Wayne Lin <Wayne.Lin@amd.com>

[Why]
Find out when we try to disable CRC calculation, crc generation is still
enabled. Main reason is that dc_stream_configure_crc() will never get
called when the source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE.

[How]
Add checking condition that when source is
AMDGPU_DM_PIPE_CRC_SOURCE_NONE, we should also call
dc_stream_configure_crc() to disable crc calculation.

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
index c29dc11619f7..66cb8730586b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
@@ -113,7 +113,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,
 	mutex_lock(&adev->dm.dc_lock);
 
 	/* Enable CRTC CRC generation if necessary. */
-	if (dm_is_crc_source_crtc(source)) {
+	if (dm_is_crc_source_crtc(source) || source == AMDGPU_DM_PIPE_CRC_SOURCE_NONE) {
 		if (!dc_stream_configure_crc(stream_state->ctx->dc,
 					     stream_state, NULL, enable, enable)) {
 			ret = -EINVAL;
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2021-01-12 14:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 14:55 [PATCH v2 0/4] Revert "drm/amd/display: Expose new CRC window property" and changes associated with this commit Rodrigo Siqueira
2021-01-12 14:55 ` Rodrigo Siqueira
2021-01-12 14:55 ` [PATCH v2 1/4] Revert "drm/amd/display: Fix unused variable warning" Rodrigo Siqueira
2021-01-12 14:55   ` Rodrigo Siqueira
2021-01-12 14:55 ` [PATCH v2 2/4] Revert "drm/amdgpu/disply: fix documentation warnings in display manager" Rodrigo Siqueira
2021-01-12 14:55   ` Rodrigo Siqueira
2021-01-12 14:55 ` [PATCH v2 3/4] Revert "drm/amd/display: Expose new CRC window property" Rodrigo Siqueira
2021-01-12 14:55   ` Rodrigo Siqueira
2021-01-12 14:55 ` Rodrigo Siqueira [this message]
2021-01-12 14:55   ` [PATCH v2 4/4] drm/amd/display: Fix to be able to stop crc calculation Rodrigo Siqueira
2021-01-12 15:02 ` [PATCH v2 0/4] Revert "drm/amd/display: Expose new CRC window property" and changes associated with this commit Alex Deucher
2021-01-12 15:02   ` Alex Deucher
2021-01-13  9:19 ` Wayne Lin
2021-01-13  9:19   ` Wayne Lin

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=20210112145508.1564863-5-Rodrigo.Siqueira@amd.com \
    --to=rodrigo.siqueira@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Bindu.R@amd.com \
    --cc=Roman.Li@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.