summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drm/drmP.h13
-rw-r--r--include/drm/drm_atomic.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index a9cfd33..8671ddd 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -634,6 +634,19 @@ struct drm_device {
int switch_power_state;
};
+/**
+ * drm_drv_uses_atomic_modeset - check if the driver implements
+ * atomic_commit()
+ * @dev: DRM device
+ *
+ * This check is useful if drivers do not have DRIVER_ATOMIC set but
+ * have atomic modesetting internally implemented.
+ */
+static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
+{
+ return dev->mode_config.funcs->atomic_commit != NULL;
+}
+
#include <drm/drm_irq.h>
#define DRM_SWITCH_POWER_ON 0
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 8cc7ca2..b0ebe0f 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -419,5 +419,4 @@ drm_atomic_crtc_needs_modeset(const struct drm_crtc_state *state)
state->connectors_changed;
}
-
#endif /* DRM_ATOMIC_H_ */
OpenPOWER on IntegriCloud