Displaying 20 results from an estimated 53 matches for "drm_connector_list_it".
Did you mean:
drm_connector_list_iter
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.de...
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...
2018 Jul 13
2
[PATCH v2 0/2] drm/nouveau: Fix connector memory corruption issues
...e
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 https://patchwork.freedesktop.org/series/46498/
Lyude Paul (2):
drm/nouveau: Use drm_connector_list_iter_* for iterating connectors
drm/nouveau: Avoid looping through fake MST connectors
drivers/gpu/drm/nouveau/nouveau_backlight.c | 6 ++--
drivers/gpu/drm/nouveau/nouveau_connector.c | 9 ++++--
drivers/gpu/drm/nouveau/nouveau_connector.h | 36 ++++++++++++++++++---
drivers/gpu/drm/nouveau/nou...
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
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
2023 Jun 20
1
[PATCH] drm/nouveau/disp: use drm_kms_helper_connector_hotplug_event()
...ay.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index ec3ffff487fc..99977e5fe716 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -465,7 +465,8 @@ nouveau_display_hpd_work(struct work_struct *work)
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
u32 pending;
- bool changed = false;
+ int changed = 0;
+ struct drm_connector *first_changed_connector = NULL;
pm_runtime_get_sync(dev->dev);
@@ -509,7 +510,12 @@ nouveau_display_hpd_work(struct work_struct *work)
if (old_epoch_counter == connector->epoch_counter)...
2018 Jul 13
3
[PATCH 0/2] drm/nouveau: Fix connector memory corruption issues
...ng 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 at vger.kernel.org
Lyude Paul (2):
drm/nouveau: Use drm_connector_list_iter_* for iterating ues connectors
drm/nouveau: Avoid looping through fake MST connectors
drivers/gpu/drm/nouveau/nouveau_backlight.c | 6 ++--
drivers/gpu/drm/nouveau/nouveau_connector.c | 9 ++++--
drivers/gpu/drm/nouveau/nouveau_connector.h | 36 ++++++++++++++++++---
drivers/gpu/drm/nouveau...
2019 Dec 10
2
[PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
...uveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 6f038511a03a9..53f9bceaf17a5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -407,6 +407,17 @@ nouveau_display_init(struct drm_device *dev, bool resume, bool runtime)
struct drm_connector_list_iter conn_iter;
int ret;
+ /*
+ * Enable hotplug interrupts (done 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_c...
2018 Aug 06
1
[PATCH v4 7/8] drm/nouveau: Fix deadlocks in nouveau_connector_detect()
...worker/6:2/320:
> [ 861.545896] #0: 00000000d9e1bc59 ((wq_completion)"pm"){+.+.}, at: process_one_work+0x1b3/0x620
> [ 861.546702] #1: 00000000c9f92d84 ((work_completion)(&dev->power.work)){+.+.}, at: process_one_work+0x1b3/0x620
> [ 861.547443] #2: 000000004afc5de1 (drm_connector_list_iter){.+.+}, at: nouveau_display_fini+0x96/0x170 [nouveau]
> [ 861.548146] 1 lock held by dmesg/983:
> [ 861.548889] 2 locks held by zsh/1250:
> [ 861.549605] #0: 00000000348e3cf6 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40
> [ 861.550393] #1: 000000007009a7a8 (&...
2018 Aug 01
0
[PATCH v4 7/8] drm/nouveau: Fix deadlocks in nouveau_connector_detect()
...locks held by kworker/6:2/320:
[ 861.545896] #0: 00000000d9e1bc59 ((wq_completion)"pm"){+.+.}, at: process_one_work+0x1b3/0x620
[ 861.546702] #1: 00000000c9f92d84 ((work_completion)(&dev->power.work)){+.+.}, at: process_one_work+0x1b3/0x620
[ 861.547443] #2: 000000004afc5de1 (drm_connector_list_iter){.+.+}, at: nouveau_display_fini+0x96/0x170 [nouveau]
[ 861.548146] 1 lock held by dmesg/983:
[ 861.548889] 2 locks held by zsh/1250:
[ 861.549605] #0: 00000000348e3cf6 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40
[ 861.550393] #1: 000000007009a7a8 (&ldata->atomic_re...
2017 Feb 21
2
[PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...tomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2427,9 +2427,13 @@ int drm_atomic_helper_disable_all(struct drm_device *dev,
struct drm_modeset_acquire_ctx *ctx)
{
struct drm_atomic_state *state;
+ struct drm_connector_state *conn_state;
struct drm_connector *conn;
- struct drm_connector_list_iter conn_iter;
- int err;
+ struct drm_plane_state *plane_state;
+ struct drm_plane *plane;
+ struct drm_crtc_state *crtc_state;
+ struct drm_crtc *crtc;
+ int ret, i;
state = drm_atomic_state_alloc(dev);
if (!state)
@@ -2437,29 +2441,48 @@ int drm_atomic_helper_disable_all(struct drm_device *d...
2020 Aug 20
0
[RFC v2 06/20] drm/nouveau/kms: Search for encoders' connectors properly
....c
+++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c
@@ -35,6 +35,24 @@
#include <nvif/if0004.h>
+struct nouveau_connector *
+nv04_encoder_get_connector(struct nouveau_encoder *encoder)
+{
+ struct drm_device *dev = to_drm_encoder(encoder)->dev;
+ struct drm_connector *connector;
+ struct drm_connector_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_connec...
2018 Aug 28
0
[PATCH v2 4/4] drm/i915: Remove i915_drm_dp_mst_status
...i915_dp_mst_info(struct seq_file *m, void *unused)
-{
- struct drm_i915_private *dev_priv = node_to_i915(m->private);
- struct drm_device *dev = &dev_priv->drm;
- struct intel_encoder *intel_encoder;
- struct intel_digital_port *intel_dig_port;
- struct drm_connector *connector;
- struct drm_connector_list_iter conn_iter;
-
- drm_connector_list_iter_begin(dev, &conn_iter);
- drm_for_each_connector_iter(connector, &conn_iter) {
- if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)
- continue;
-
- intel_encoder = intel_attached_encoder(connector);
- if (!intel_encoder || intel...
2019 Oct 22
0
[PATCH v5 10/14] drm/nouveau: Resume hotplug interrupts earlier
...nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 6f038511a03a..53f9bceaf17a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -407,6 +407,17 @@ nouveau_display_init(struct drm_device *dev, bool resume, bool runtime)
struct drm_connector_list_iter conn_iter;
int ret;
+ /*
+ * Enable hotplug interrupts (done 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_c...
2019 Dec 10
0
[PATCH AUTOSEL 5.4 143/350] drm/nouveau: Resume hotplug interrupts earlier
...drm/nouveau/nouveau_display.c
> index 6f038511a03a9..53f9bceaf17a5 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -407,6 +407,17 @@ nouveau_display_init(struct drm_device *dev, bool
> resume, bool runtime)
> struct drm_connector_list_iter conn_iter;
> int ret;
>
> + /*
> + * Enable hotplug interrupts (done 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) {
>...
2017 Jan 09
0
[PATCH 3/3] drm/atomic: Make disable_all helper fully disable the crtc.
...tomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2436,9 +2436,13 @@ int drm_atomic_helper_disable_all(struct drm_device *dev,
struct drm_modeset_acquire_ctx *ctx)
{
struct drm_atomic_state *state;
+ struct drm_connector_state *conn_state;
struct drm_connector *conn;
- struct drm_connector_list_iter conn_iter;
- int err;
+ struct drm_plane_state *plane_state;
+ struct drm_plane *plane;
+ struct drm_crtc_state *crtc_state;
+ struct drm_crtc *crtc;
+ int ret, i;
state = drm_atomic_state_alloc(dev);
if (!state)
@@ -2446,29 +2450,48 @@ int drm_atomic_helper_disable_all(struct drm_device *d...
2019 Feb 02
0
[PATCH v3 4/4] drm/nouveau: Move PBN and VCPI allocation into nv50_head_atom
...*encoder)
{
struct nv50_head *head = nv50_head(encoder->crtc);
+ struct nv50_head_atom *armh = nv50_head_atom(head->base.base.state);
struct nv50_msto *msto = nv50_msto(encoder);
struct nv50_mstc *mstc = NULL;
struct nv50_mstm *mstm = NULL;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
u8 proto, depth;
- int slots;
bool r;
drm_connector_list_iter_begin(encoder->dev, &conn_iter);
@@ -808,8 +815,8 @@ nv50_msto_enable(struct drm_encoder *encoder)
if (WARN_ON(!mstc))
return;
- slots = drm_dp_find_vcpi_slots(&mstm->mgr, mstc->pbn);
- r = dr...
2017 Feb 23
0
[Intel-gfx] [PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...m/drm_atomic_helper.c
> @@ -2427,9 +2427,13 @@ int drm_atomic_helper_disable_all(struct drm_device *dev,
> struct drm_modeset_acquire_ctx *ctx)
> {
> struct drm_atomic_state *state;
> + struct drm_connector_state *conn_state;
> struct drm_connector *conn;
> - struct drm_connector_list_iter conn_iter;
> - int err;
> + struct drm_plane_state *plane_state;
> + struct drm_plane *plane;
> + struct drm_crtc_state *crtc_state;
> + struct drm_crtc *crtc;
> + int ret, i;
>
> state = drm_atomic_state_alloc(dev);
> if (!state)
> @@ -2437,29 +2441,48 @@ int...
2020 Nov 14
0
[PATCH 8/8] drm/nouveau/kms/nv50-: Fix locking for audio callbacks
...v50/disp.c
@@ -607,34 +607,27 @@ nv50_audio_component_get_eld(struct device *kdev, int port, int dev_id,
struct nouveau_drm *drm = nouveau_drm(drm_dev);
struct drm_encoder *encoder;
struct nouveau_encoder *nv_encoder;
- struct drm_connector *connector;
struct nouveau_crtc *nv_crtc;
- struct drm_connector_list_iter conn_iter;
int ret = 0;
*enabled = false;
+ mutex_lock(&drm->audio.lock);
+
drm_for_each_encoder(encoder, drm->dev) {
struct nouveau_connector *nv_connector = NULL;
+ if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST)
+ continue; /* TODO */
+
nv_encoder = nouve...
2019 Nov 15
0
[PATCH 2/3] drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom
...urn 0x2;
+ case 8: return 0x5;
+ case 10: /* fall-through */
+ default: return 0x6;
+ }
+}
+
static void
nv50_msto_enable(struct drm_encoder *encoder)
{
@@ -812,7 +833,7 @@ nv50_msto_enable(struct drm_encoder *encoder)
struct nv50_mstm *mstm = NULL;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
- u8 proto, depth;
+ u8 proto;
bool r;
drm_connector_list_iter_begin(encoder->dev, &conn_iter);
@@ -841,14 +862,8 @@ nv50_msto_enable(struct drm_encoder *encoder)
else
proto = 0x9;
- switch (mstc->connector.display_info.bpc) {
- case 6: depth = 0x2; break;
- cas...