aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm/drm_client.h
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2019-06-08 17:26:53 +0200
committerNoralf Trønnes <noralf@tronnes.org>2019-06-11 14:46:44 +0200
commite5852bee90d6cb7d9bd2c635c056e7746f137e06 (patch)
treef48cfd49731716d984d5fb581f72f420e793cad2 /include/drm/drm_client.h
parentdrm/virtio: Add memory barriers for capset cache. (diff)
downloadwireguard-linux-e5852bee90d6cb7d9bd2c635c056e7746f137e06.tar.xz
wireguard-linux-e5852bee90d6cb7d9bd2c635c056e7746f137e06.zip
drm/fb-helper: Remove drm_fb_helper_connector
All drivers add all their connectors so there's no need to keep around an array of available connectors. Instead we just put the useable (not writeback) connectors in a temporary array using drm_client_for_each_connector_iter() everytime we probe the outputs. Other places where it's necessary to look at the connectors, we just iterate over them using the same iterator function. Rename functions which signature is changed since they will be moved to drm_client in a later patch. v6: Improve commit message (Sam Ravnborg) Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190608152657.36613-2-noralf@tronnes.org
Diffstat (limited to 'include/drm/drm_client.h')
-rw-r--r--include/drm/drm_client.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drm_client.h b/include/drm/drm_client.h
index 6cf48419f77f..8d94880bbe25 100644
--- a/include/drm/drm_client.h
+++ b/include/drm/drm_client.h
@@ -7,6 +7,7 @@
#include <linux/mutex.h>
#include <linux/types.h>
+#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
struct drm_client_dev;
@@ -169,6 +170,20 @@ int drm_client_modeset_dpms(struct drm_client_dev *client, int mode);
for (({ lockdep_assert_held(&(client)->modeset_mutex); }), \
modeset = (client)->modesets; modeset->crtc; modeset++)
+/**
+ * drm_client_for_each_connector_iter - connector_list iterator macro
+ * @connector: &struct drm_connector pointer used as cursor
+ * @iter: &struct drm_connector_list_iter
+ *
+ * This iterates the connectors that are useable for internal clients (excludes
+ * writeback connectors).
+ *
+ * For more info see drm_for_each_connector_iter().
+ */
+#define drm_client_for_each_connector_iter(connector, iter) \
+ drm_for_each_connector_iter(connector, iter) \
+ if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
+
int drm_client_debugfs_init(struct drm_minor *minor);
#endif