Displaying 20 results from an estimated 34 matches for "drm_connector_list_iter_end".
2019 Sep 13
1
[PATCH v2 23/27] drm/amdgpu: Iterate through DRM connectors correctly
On Tue, Sep 3, 2019 at 4:49 PM Lyude Paul <lyude at redhat.com> wrote:
>
> Currently, every single piece of code in amdgpu that loops through
> connectors does it incorrectly and doesn't use the proper list iteration
> helpers, drm_connector_list_iter_begin() and
> drm_connector_list_iter_end(). Yeesh.
>
> So, do that.
In fairness, I think the origin of this code predated the iterators.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
>
> Cc: Juston Li <juston.li at intel.com>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Ville Syrjälä <...
2019 Sep 03
0
[PATCH v2 23/27] drm/amdgpu: Iterate through DRM connectors correctly
Currently, every single piece of code in amdgpu that loops through
connectors does it incorrectly and doesn't use the proper list iteration
helpers, drm_connector_list_iter_begin() and
drm_connector_list_iter_end(). Yeesh.
So, do that.
Cc: Juston Li <juston.li at intel.com>
Cc: Imre Deak <imre.deak at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Harry Wentland <hwentlan at amd.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Lyude Paul...
2018 Jul 13
2
[PATCH v2 0/2] drm/nouveau: Fix connector memory corruption issues
This fixes some nasty issues I found in nouveau that were being caused
looping through connectors using racy legacy methods, along with some
caused by making incorrect assumptions about the drm_connector structs
in nouveau's connector list. Most of these memory corruption issues
could be reproduced by using an MST hub with nouveau.
Next version of
2019 Dec 10
2
[PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
...ne as early as possible, since we need
+ * them for MST)
+ */
+ drm_connector_list_iter_begin(dev, &conn_iter);
+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
+ struct nouveau_connector *conn = nouveau_connector(connector);
+ nvif_notify_get(&conn->hpd);
+ }
+ drm_connector_list_iter_end(&conn_iter);
+
ret = disp->init(dev, resume, runtime);
if (ret)
return ret;
@@ -416,14 +427,6 @@ nouveau_display_init(struct drm_device *dev, bool resume, bool runtime)
*/
drm_kms_helper_poll_enable(dev);
- /* enable hotplug interrupts */
- drm_connector_list_iter_begin(dev, &a...
2018 Jul 13
3
[PATCH 0/2] drm/nouveau: Fix connector memory corruption issues
This fixes some nasty issues I found in nouveau that were being caused
looping through connectors using racy legacy methods, along with some
caused by making incorrect assumptions about the drm_connector structs
in nouveau's connector list. Most of these memory corruption issues
could be reproduced by using an MST hub with nouveau.
Cc: Karol Herbst <karolherbst at gmail.com>
Cc: stable
2019 Oct 22
17
[PATCH v5 00/14] DP MST Refactors + debugging tools + suspend/resume reprobing
This is the final portion of the large series for adding MST
suspend/resume reprobing that I've been working on for quite a while
now. In addition, I:
* Refactored and cleaned up any code I ended up digging through in the
process of understanding how some parts of these helpers worked.
* Added some debugging tools along the way that I ended up needing to
figure out some issues in my own
2019 Sep 03
50
[PATCH v2 00/27] DP MST Refactors + debugging tools + suspend/resume reprobing
This is the large series for adding MST suspend/resume reprobing that
I've been working on for quite a while now. In addition, I:
- Refactored and cleaned up any code I ended up digging through in the
process of understanding how some parts of these helpers worked.
- Added some debugging tools along the way that I ended up needing to
figure out some issues in my own code
Note that
2019 Oct 22
0
[PATCH v5 10/14] drm/nouveau: Resume hotplug interrupts earlier
...ne as early as possible, since we need
+ * them for MST)
+ */
+ drm_connector_list_iter_begin(dev, &conn_iter);
+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
+ struct nouveau_connector *conn = nouveau_connector(connector);
+ nvif_notify_get(&conn->hpd);
+ }
+ drm_connector_list_iter_end(&conn_iter);
+
ret = disp->init(dev, resume, runtime);
if (ret)
return ret;
@@ -416,14 +427,6 @@ nouveau_display_init(struct drm_device *dev, bool resume, bool runtime)
*/
drm_kms_helper_poll_enable(dev);
- /* enable hotplug interrupts */
- drm_connector_list_iter_begin(dev, &a...
2019 Dec 10
0
[PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
...gt; + * them for MST)
> + */
> + drm_connector_list_iter_begin(dev, &conn_iter);
> + nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
> + struct nouveau_connector *conn = nouveau_connector(connector);
> + nvif_notify_get(&conn->hpd);
> + }
> + drm_connector_list_iter_end(&conn_iter);
> +
> ret = disp->init(dev, resume, runtime);
> if (ret)
> return ret;
> @@ -416,14 +427,6 @@ nouveau_display_init(struct drm_device *dev, bool
> resume, bool runtime)
> */
> drm_kms_helper_poll_enable(dev);
>
> - /* enable hotplug int...
2023 Jun 20
1
[PATCH] drm/nouveau/disp: use drm_kms_helper_connector_hotplug_event()
...tor;
+ }
+
drm_dbg_kms(dev, "[CONNECTOR:%d:%s] status updated from %s to %s (epoch counter %llu->%llu)\n",
connector->base.id, connector->name,
drm_get_connector_status_name(old_status),
@@ -520,9 +526,14 @@ nouveau_display_hpd_work(struct work_struct *work)
drm_connector_list_iter_end(&conn_iter);
mutex_unlock(&dev->mode_config.mutex);
- if (changed)
+ if (changed == 1)
+ drm_kms_helper_connector_hotplug_event(first_changed_connector);
+ else if (changed > 0)
drm_kms_helper_hotplug_event(dev);
+ if (first_changed_connector)
+ drm_connector_put(first_chan...
2024 May 28
1
[PATCH] drm/nouveau: don't attempt to schedule hpd_work on headless cards
...>headless);
> +
> + if (drm->headless)
> + return;
> +
Same here.
> pm_runtime_get_sync(dev->dev);
>
> spin_lock_irq(&drm->hpd_lock);
> @@ -635,7 +643,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
> }
> drm_connector_list_iter_end(&conn_iter);
>
> - if (!runtime)
> + if (!runtime && !drm->headless)
> cancel_work_sync(&drm->hpd_work);
>
> drm_kms_helper_poll_disable(dev);
> @@ -729,6 +737,7 @@ nouveau_display_create(struct drm_device *dev)
> /* no display hw */
&g...
2018 Jul 31
2
[PATCH 1/2] drm/nouveau: Print debug message on ACPI probe event
Signed-off-by: Lyude Paul <lyude at redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index ec7861457b84..b2a93e3fa67b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -387,6 +387,7 @@
2020 Aug 20
0
[RFC v2 06/20] drm/nouveau/kms: Search for encoders' connectors properly
...or_list_iter conn_iter;
+ struct nouveau_connector *nv_connector = NULL;
+
+ drm_connector_list_iter_begin(dev, &conn_iter);
+ drm_for_each_connector_iter(connector, &conn_iter) {
+ if (connector->encoder == to_drm_encoder(encoder))
+ nv_connector = nouveau_connector(connector);
+ }
+ drm_connector_list_iter_end(&conn_iter);
+
+ return nv_connector;
+}
+
static void
nv04_display_fini(struct drm_device *dev, bool suspend)
{
diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.h b/drivers/gpu/drm/nouveau/dispnv04/disp.h
index 495d3284e8766..5ace5e906949a 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/dis...
2018 Aug 28
0
[PATCH v2 4/4] drm/i915: Remove i915_drm_dp_mst_status
...e;
-
- intel_dig_port = enc_to_dig_port(&intel_encoder->base);
- if (!intel_dig_port->dp.can_mst)
- continue;
-
- seq_printf(m, "MST Source Port %c\n",
- port_name(intel_dig_port->base.port));
- drm_dp_mst_dump_topology(m, &intel_dig_port->dp.mst_mgr);
- }
- drm_connector_list_iter_end(&conn_iter);
-
- return 0;
-}
-
static ssize_t i915_displayport_test_active_write(struct file *file,
const char __user *ubuf,
size_t len, loff_t *offp)
@@ -4733,7 +4702,6 @@ static const struct drm_info_list i915_debugfs_list[] = {
{"i915_rcs_topology", i915_rcs_t...
2018 Aug 07
0
[PATCH] drm/nouveau: Don't forget to cancel hpd_work on suspend/unload
...truct drm_device *dev, bool suspend)
+nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
{
struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_drm *drm = nouveau_drm(dev);
@@ -450,6 +450,9 @@ nouveau_display_fini(struct drm_device *dev, bool suspend)
}
drm_connector_list_iter_end(&conn_iter);
+ if (!runtime)
+ cancel_work_sync(&drm->hpd_work);
+
drm_kms_helper_poll_disable(dev);
disp->fini(dev);
}
@@ -618,11 +621,11 @@ nouveau_display_suspend(struct drm_device *dev, bool runtime)
}
}
- nouveau_display_fini(dev, true);
+ nouveau_display_fini(...
2024 Jun 11
0
[PATCH v2] drm/nouveau: don't attempt to schedule hpd_work on headless cards
...> + if (drm->headless)
> + return;
> +
> spin_lock_irq(&drm->hpd_lock);
> drm->hpd_pending = ~0;
> spin_unlock_irq(&drm->hpd_lock);
> @@ -635,7 +638,7 @@ nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
> }
> drm_connector_list_iter_end(&conn_iter);
>
> - if (!runtime)
> + if (!runtime && !drm->headless)
> cancel_work_sync(&drm->hpd_work);
>
> drm_kms_helper_poll_disable(dev);
> @@ -729,6 +732,7 @@ nouveau_display_create(struct drm_device *dev)
> /* no display hw */
&g...
2020 Nov 14
0
[PATCH 8/8] drm/nouveau/kms/nv50-: Fix locking for audio callbacks
...v_crtc = nouveau_crtc(nv_encoder->crtc);
- drm_connector_list_iter_begin(drm_dev, &conn_iter);
- drm_for_each_connector_iter(connector, &conn_iter) {
- if (connector->state->best_encoder == encoder) {
- nv_connector = nouveau_connector(connector);
- break;
- }
- }
- drm_connector_list_iter_end(&conn_iter);
- if (!nv_connector)
+ if (!nv_crtc || nv_encoder->or != port || nv_crtc->index != dev_id)
continue;
- nv_crtc = nouveau_crtc(nv_encoder->crtc);
- if (!nv_crtc || nv_encoder->or != port ||
- nv_crtc->index != dev_id)
- continue;
- *enabled = nv_enco...
2018 Jul 31
0
[PATCH 2/2] drm/nouveau: Prevent redundant connector probes from ACPI
...,
#endif
int
-nouveau_display_init(struct drm_device *dev)
+nouveau_display_init(struct drm_device *dev, bool runtime)
{
struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_drm *drm = nouveau_drm(dev);
@@ -420,13 +423,20 @@ nouveau_display_init(struct drm_device *dev)
}
drm_connector_list_iter_end(&conn_iter);
+ /* disable ACPI hotplug handling to prevent duplicate connector
+ * probes
+ * FIXME: make sure that WRITE_ONCE() implies a store barrier
+ * beforehand
+ */
+ WRITE_ONCE(drm->acpi_hpd_enabled, false);
+
/* enable flip completion events */
nvif_notify_get(&drm-&g...
2018 Jul 13
0
[PATCH 2/2] drm/nouveau: Avoid looping through fake MST connectors
...ndex)
bool dummy;
drm_connector_list_iter_begin(dev, &conn_iter);
- drm_for_each_connector_iter(connector, &conn_iter) {
+ nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
nv_connector = nouveau_connector(connector);
if (nv_connector->index == index) {
drm_connector_list_iter_end(&conn_iter);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
index a8cbb4b56fc7..aaf3a213c685 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.h
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
@@ -33,6 +33,7 @@
#include <drm/drm...
2020 Aug 20
22
[RFC v2 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
To start off: this patch series is less work to review then it looks -
most (but not all) of the nouveau related work has already been reviewed
elsewhere. Most of the reason I'm asking for an RFC here is because this
code pulls a lot of code out of i915 and into shared DP helpers.
Anyway-nouveau's HPD related code has been collecting dust for a while.
Other then the occasional runtime PM