Thread (1 message) flat view 1 message, 1 author, 2021-05-04

Re: [PATCH 5/9] drm/i915: Associate ACPI connector nodes with connector entries

From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date: 2021-05-04 14:56:11
Also in: dri-devel, intel-gfx, platform-driver-x86

Hi Andy,
quoted
+/* NOTE: The connector order must be final before this is called. */
+void intel_acpi_assign_connector_fwnodes(struct drm_i915_private *i915)
+{
+       struct drm_connector_list_iter conn_iter;
+       struct drm_device *drm_dev = &i915->drm;
+       struct device *kdev = &drm_dev->pdev->dev;
+       struct fwnode_handle *fwnode = NULL;
+       struct drm_connector *connector;
+       struct acpi_device *adev;
+
+       drm_connector_list_iter_begin(drm_dev, &conn_iter);
+       drm_for_each_connector_iter(connector, &conn_iter) {
+               /* Always getting the next, even when the last was not
used. */
+               fwnode = device_get_next_child_node(kdev, fwnode);
+               if (!fwnode)
+                       break;
Who is dropping reference counting on fwnode ?

I’m in the middle of a pile of fixes for fwnode refcounting when
for_each_child or get_next_child is used. So, please double check you drop
a reference.
Sorry Andy. This patch is from time before the software nodes
implementation of the get_next_child callback handled the ref counting
properly.

Br,

-- 
heikki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help