summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
diff options
context:
space:
mode:
authorSinclair Yeh <syeh@vmware.com>2017-03-23 21:48:44 +0300
committerSinclair Yeh <syeh@vmware.com>2017-03-31 21:13:27 +0300
commitd7721ca71126b222fb5d66af444d33950a0e3ba3 (patch)
treebfa3849231a07f8571300702824b1f85aad5d954 /drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
parentcc5ec459de323fe32514d5f47a4d00460ee30f7b (diff)
downloadlinux-d7721ca71126b222fb5d66af444d33950a0e3ba3.tar.xz
drm/vmwgfx: Connector atomic state
Add connector handling functions. Start tracking is_implicity in the connector state. Eventually, this field should be tracked exclusively in a connector state. Now that plane and connector states have been created, we can also activate the code that use CRTC state. Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_kms.h')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index 5602c2430719..cc50bf35aeca 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -142,7 +142,8 @@ static const uint32_t vmw_cursor_plane_formats[] = {
#define vmw_crtc_state_to_vcs(x) container_of(x, struct vmw_crtc_state, base)
#define vmw_plane_state_to_vps(x) container_of(x, struct vmw_plane_state, base)
-
+#define vmw_connector_state_to_vcs(x) \
+ container_of(x, struct vmw_connector_state, base)
/**
* Derived class for crtc state object
@@ -172,6 +173,20 @@ struct vmw_plane_state {
int pinned;
};
+
+/**
+ * Derived class for connector state object
+ *
+ * @base DRM connector object
+ * @is_implicit connector property
+ *
+ */
+struct vmw_connector_state {
+ struct drm_connector_state base;
+
+ bool is_implicit;
+};
+
/**
* Base class display unit.
*
@@ -241,6 +256,15 @@ int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);
int vmw_du_connector_set_property(struct drm_connector *connector,
struct drm_property *property,
uint64_t val);
+int vmw_du_connector_atomic_set_property(struct drm_connector *connector,
+ struct drm_connector_state *state,
+ struct drm_property *property,
+ uint64_t val);
+int
+vmw_du_connector_atomic_get_property(struct drm_connector *connector,
+ const struct drm_connector_state *state,
+ struct drm_property *property,
+ uint64_t *val);
int vmw_du_connector_dpms(struct drm_connector *connector, int mode);
void vmw_du_connector_save(struct drm_connector *connector);
void vmw_du_connector_restore(struct drm_connector *connector);
@@ -326,6 +350,12 @@ void vmw_du_crtc_reset(struct drm_crtc *crtc);
struct drm_crtc_state *vmw_du_crtc_duplicate_state(struct drm_crtc *crtc);
void vmw_du_crtc_destroy_state(struct drm_crtc *crtc,
struct drm_crtc_state *state);
+void vmw_du_connector_reset(struct drm_connector *connector);
+struct drm_connector_state *
+vmw_du_connector_duplicate_state(struct drm_connector *connector);
+
+void vmw_du_connector_destroy_state(struct drm_connector *connector,
+ struct drm_connector_state *state);
/*
* Legacy display unit functions - vmwgfx_ldu.c