All of lore.kernel.org
 help / color / mirror / Atom feed
From: <mikita.lipski-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 07/15] drm/dp_mst: Fill branch->num_ports
Date: Wed, 18 Sep 2019 16:26:44 -0400	[thread overview]
Message-ID: <bf44b422ebb2c6c41e95d44764691719d5977e4c.1568833906.git.mikita.lipski@amd.com> (raw)
In-Reply-To: <cover.1568833906.git.mikita.lipski-5C7GfCeVMHo@public.gmane.org>

From: David Francis <David.Francis@amd.com>

This field on drm_dp_mst_branch was never filled

It is initialized to zero when the port is kzallocced.
When a port is added to the list, increment num_ports,
and when a port is removed from the list, decrement num_ports.

v2: remember to decrement on port removal
v3: don't explicitly init to 0

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index c1a7ddfdc4bd..ae2f986d76a2 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -1670,6 +1670,7 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
 		mutex_lock(&mstb->mgr->lock);
 		drm_dp_mst_topology_get_port(port);
 		list_add(&port->next, &mstb->ports);
+		mstb->num_ports++;
 		mutex_unlock(&mstb->mgr->lock);
 	}
 
@@ -1704,6 +1705,7 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
 			/* remove it from the port list */
 			mutex_lock(&mstb->mgr->lock);
 			list_del(&port->next);
+			mstb->num_ports--;
 			mutex_unlock(&mstb->mgr->lock);
 			/* drop port list reference */
 			drm_dp_mst_topology_put_port(port);
-- 
2.17.1

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

  parent reply	other threads:[~2019-09-18 20:26 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   ` mikita.lipski-5C7GfCeVMHo [this message]
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
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=bf44b422ebb2c6c41e95d44764691719d5977e4c.1568833906.git.mikita.lipski@amd.com \
    --to=mikita.lipski-5c7gfcevmho@public.gmane.org \
    --cc=David.Francis-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 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.