summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_connector.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-11-16 11:54:31 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-11-29 09:57:58 +1000
commit4f6029da58ba9204c98e33f4f3737fe085c87a6f (patch)
tree90e25888ee8438f5d0ab56e0ae718d959a3e9e6b /drivers/gpu/drm/nouveau/nouveau_connector.h
parentf9887d091149406de5c8b388f7e0bb6932dd621b (diff)
drm/nv50-nvc0: switch to common disp impl, removing previous version
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_connector.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
index ebdb87670a8f..20eb84cce9e6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.h
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
@@ -28,6 +28,7 @@
#define __NOUVEAU_CONNECTOR_H__
#include <drm/drm_edid.h>
+#include "nouveau_crtc.h"
struct nouveau_i2c_port;
@@ -80,6 +81,21 @@ static inline struct nouveau_connector *nouveau_connector(
return container_of(con, struct nouveau_connector, base);
}
+static inline struct nouveau_connector *
+nouveau_crtc_connector_get(struct nouveau_crtc *nv_crtc)
+{
+ struct drm_device *dev = nv_crtc->base.dev;
+ struct drm_connector *connector;
+ struct drm_crtc *crtc = to_drm_crtc(nv_crtc);
+
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ if (connector->encoder && connector->encoder->crtc == crtc)
+ return nouveau_connector(connector);
+ }
+
+ return NULL;
+}
+
struct drm_connector *
nouveau_connector_create(struct drm_device *, int index);