* [PATCH 1/2] drm/nouveau: Expose nv50 MST structures in disp.h
2018-07-12 17:10 [PATCH 0/2] drm/nouveau: Add support for dp_mst_info in debugfs Lyude Paul
@ 2018-07-12 17:10 ` Lyude Paul
[not found] ` <20180712171056.26359-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-12 17:21 ` [PATCH 0/2] drm/nouveau: Add support for " Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Lyude Paul @ 2018-07-12 17:10 UTC (permalink / raw)
To: nouveau
Cc: Ben Skeggs, David Airlie, Daniel Vetter, Maarten Lankhorst,
Ville Syrjälä, Archit Taneja, dri-devel, linux-kernel
We're about to need this so that we can hook up dp_mst_info into debugfs
so we can walk the encoder list and find each mst mgr.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 34 ------------------------
drivers/gpu/drm/nouveau/dispnv50/disp.h | 35 +++++++++++++++++++++++++
2 files changed, 35 insertions(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index d9da69c83ae7..f76fe5f260a4 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -568,40 +568,6 @@ nv50_hdmi_enable(struct drm_encoder *encoder, struct drm_display_mode *mode)
/******************************************************************************
* MST
*****************************************************************************/
-#define nv50_mstm(p) container_of((p), struct nv50_mstm, mgr)
-#define nv50_mstc(p) container_of((p), struct nv50_mstc, connector)
-#define nv50_msto(p) container_of((p), struct nv50_msto, encoder)
-
-struct nv50_mstm {
- struct nouveau_encoder *outp;
-
- struct drm_dp_mst_topology_mgr mgr;
- struct nv50_msto *msto[4];
-
- bool modified;
- bool disabled;
- int links;
-};
-
-struct nv50_mstc {
- struct nv50_mstm *mstm;
- struct drm_dp_mst_port *port;
- struct drm_connector connector;
-
- struct drm_display_mode *native;
- struct edid *edid;
-
- int pbn;
-};
-
-struct nv50_msto {
- struct drm_encoder encoder;
-
- struct nv50_head *head;
- struct nv50_mstc *mstc;
- bool disabled;
-};
-
static struct drm_dp_payload *
nv50_msto_payload(struct nv50_msto *msto)
{
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h
index e48c5eb35b49..5ba7093f3c74 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h
@@ -3,6 +3,7 @@
#include <nvif/mem.h>
#include "nouveau_display.h"
+#include "nouveau_encoder.h"
struct nv50_disp {
struct nvif_disp *disp;
@@ -65,6 +66,40 @@ struct nv50_dmac {
struct mutex lock;
};
+#define nv50_mstm(p) container_of((p), struct nv50_mstm, mgr)
+#define nv50_mstc(p) container_of((p), struct nv50_mstc, connector)
+#define nv50_msto(p) container_of((p), struct nv50_msto, encoder)
+
+struct nv50_mstm {
+ struct nouveau_encoder *outp;
+
+ struct drm_dp_mst_topology_mgr mgr;
+ struct nv50_msto *msto[4];
+
+ bool modified;
+ bool disabled;
+ int links;
+};
+
+struct nv50_mstc {
+ struct nv50_mstm *mstm;
+ struct drm_dp_mst_port *port;
+ struct drm_connector connector;
+
+ struct drm_display_mode *native;
+ struct edid *edid;
+
+ int pbn;
+};
+
+struct nv50_msto {
+ struct drm_encoder encoder;
+
+ struct nv50_head *head;
+ struct nv50_mstc *mstc;
+ bool disabled;
+};
+
int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
const s32 *oclass, u8 head, void *data, u32 size,
u64 syncbuf, struct nv50_dmac *dmac);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] drm/nouveau: Add support for dp_mst_info in debugfs
2018-07-12 17:10 [PATCH 0/2] drm/nouveau: Add support for dp_mst_info in debugfs Lyude Paul
2018-07-12 17:10 ` [PATCH 1/2] drm/nouveau: Expose nv50 MST structures in disp.h Lyude Paul
[not found] ` <20180712171056.26359-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2018-07-12 17:21 ` Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2018-07-12 17:21 UTC (permalink / raw)
To: Lyude Paul
Cc: David Airlie, nouveau, linux-kernel, dri-devel, Ben Skeggs,
Daniel Vetter
On Thu, Jul 12, 2018 at 01:10:45PM -0400, Lyude Paul wrote:
> This hooks up the DRM helpers for dumping information on the current
> status of each MST topology from nouveau's perspective to debugfs files,
> similar to what i915 does (albeit, i915 labels their debugfs node for
> this as i915_dp_mst_info).
>
> Lyude Paul (2):
> drm/nouveau: Expose nv50 MST structures in disp.h
> drm/nouveau: Hook up dp_mst_info in debugfs
We already register the i2c-over-aux and dp_aux devnodes in
drm_dp_aux_register(). Could we do the same with a per-devnode debugfs
file for mst? The topology manager sits on top of the dp aux abstraction,
so this could work, with s/encoder->name/dp_aux->name/.
Would give us mst info on every driver for free (plus we could nuke the
ad-hoc version in i915).
-Daniel
>
> drivers/gpu/drm/nouveau/dispnv50/disp.c | 34 ----------------
> drivers/gpu/drm/nouveau/dispnv50/disp.h | 35 +++++++++++++++++
> drivers/gpu/drm/nouveau/nouveau_debugfs.c | 47 ++++++++++++++++++++++-
> 3 files changed, 80 insertions(+), 36 deletions(-)
>
> --
> 2.17.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread