All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 06/13] drm/amd/display: Simplify handle_hpd_rx_irq()
Date: Tue, 17 Oct 2017 12:19:05 -0400	[thread overview]
Message-ID: <20171017161912.11357-7-tom.stdenis@amd.com> (raw)
In-Reply-To: <20171017161912.11357-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>

There is a local reference to the dc_link that wasn't being
used so we shorten references throughout the function.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f999cb312fa3..f2d21dccc647 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1032,20 +1032,20 @@ static void handle_hpd_rx_irq(void *param)
 	struct amdgpu_dm_connector *aconnector = (struct amdgpu_dm_connector *)param;
 	struct drm_connector *connector = &aconnector->base;
 	struct drm_device *dev = connector->dev;
-	const struct dc_link *dc_link = aconnector->dc_link;
+	struct dc_link *dc_link = aconnector->dc_link;
 	bool is_mst_root_connector = aconnector->mst_mgr.mst_state;
 
 	/* TODO:Temporary add mutex to protect hpd interrupt not have a gpio
 	 * conflict, after implement i2c helper, this mutex should be
 	 * retired.
 	 */
-	if (aconnector->dc_link->type != dc_connection_mst_branch)
+	if (dc_link->type != dc_connection_mst_branch)
 		mutex_lock(&aconnector->hpd_lock);
 
-	if (dc_link_handle_hpd_rx_irq(aconnector->dc_link, NULL) &&
+	if (dc_link_handle_hpd_rx_irq(dc_link, NULL) &&
 			!is_mst_root_connector) {
 		/* Downstream Port status changed. */
-		if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPDRX)) {
+		if (dc_link_detect(dc_link, DETECT_REASON_HPDRX)) {
 			amdgpu_dm_update_connector_after_detect(aconnector);
 
 
@@ -1057,10 +1057,10 @@ static void handle_hpd_rx_irq(void *param)
 		}
 	}
 	if ((dc_link->cur_link_settings.lane_count != LANE_COUNT_UNKNOWN) ||
-				(dc_link->type == dc_connection_mst_branch))
+	    (dc_link->type == dc_connection_mst_branch))
 		dm_handle_hpd_rx_irq(aconnector);
 
-	if (aconnector->dc_link->type != dc_connection_mst_branch)
+	if (dc_link->type != dc_connection_mst_branch)
 		mutex_unlock(&aconnector->hpd_lock);
 }
 
-- 
2.12.0

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

  parent reply	other threads:[~2017-10-17 16:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 16:18 Various cleanups for amdgpu_dm Tom St Denis
     [not found] ` <20171017161912.11357-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-10-17 16:19   ` [PATCH 01/13] drm/amd/display: Simplify dm_late_init() Tom St Denis
2017-10-17 16:19   ` [PATCH 02/13] drm/amd/display: Fix indentation in dm_suspend() Tom St Denis
2017-10-17 16:19   ` [PATCH 03/13] drm/amd/display: Fix indentation in dm_resume() Tom St Denis
2017-10-17 16:19   ` [PATCH 04/13] drm/amd/display: Fix brace style in amdgpu_dm_update_connector_after_detect() Tom St Denis
2017-10-17 16:19   ` [PATCH 05/13] drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq() Tom St Denis
2017-10-17 16:19   ` Tom St Denis [this message]
2017-10-17 16:19   ` [PATCH 07/13] drm/amd/display: Fix brace style in amdgpu_dm_initialize_drm_device() Tom St Denis
2017-10-17 16:19   ` [PATCH 08/13] drm/amd/display: Replace block with strncpy() in fill_audio_info() Tom St Denis
2017-10-17 16:19   ` [PATCH 09/13] drm/amd/display: Fix indentation in create_eml_sink() Tom St Denis
2017-10-17 16:19   ` [PATCH 10/13] drm/amd/display: Tidy up dm_drm_plane_reset() Tom St Denis
2017-10-17 16:19   ` [PATCH 11/13] drm/amd/display: Fix brace style in amdgpu_dm_connector_ddc_get_modes() Tom St Denis
2017-10-17 16:19   ` [PATCH 12/13] drm/amd/display: Remove needless cast in amdgpu_dm_connector_init() Tom St Denis
2017-10-17 16:19   ` [PATCH 13/13] drm/amd/display: Fix brace style Tom St Denis
2017-10-17 17:16   ` Various cleanups for amdgpu_dm Andrey Grodzovsky
2017-10-17 20:30   ` Harry Wentland
     [not found]     ` <5eaea6a7-e3d9-e19d-4d75-3d26e4db9aaf-5C7GfCeVMHo@public.gmane.org>
2017-10-17 21:43       ` Tom St Denis
     [not found]         ` <6dadea86-5a2c-e193-d02f-27515408b24c-5C7GfCeVMHo@public.gmane.org>
2017-10-17 23:23           ` Harry Wentland

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=20171017161912.11357-7-tom.stdenis@amd.com \
    --to=tom.stdenis-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-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 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.