mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
drm: introduce atomic_begin for connector
atomic_begin is used to prepare for update flush. Change-Id: I1d3a2afaea4022c065bda2b4c0746464cc0c1303 Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
parent
d534e6ca79
commit
773d508df7
|
|
@ -1558,6 +1558,26 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
|
|||
struct drm_connector_state *old_conn_state;
|
||||
int i;
|
||||
|
||||
for_each_connector_in_state(old_state, connector, old_conn_state, i) {
|
||||
const struct drm_connector_helper_funcs *funcs;
|
||||
|
||||
if (!connector->state->crtc)
|
||||
continue;
|
||||
|
||||
if (!connector->state->crtc->state->active)
|
||||
continue;
|
||||
|
||||
funcs = connector->helper_private;
|
||||
|
||||
if (!funcs || !funcs->atomic_begin)
|
||||
continue;
|
||||
|
||||
DRM_DEBUG_ATOMIC("flush beginning [CONNECTOR:%d:%s]\n",
|
||||
connector->base.id, connector->name);
|
||||
|
||||
funcs->atomic_begin(connector, old_conn_state);
|
||||
}
|
||||
|
||||
for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
|
||||
const struct drm_crtc_helper_funcs *funcs;
|
||||
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ struct drm_connector_helper_funcs {
|
|||
struct drm_encoder *(*best_encoder)(struct drm_connector *connector);
|
||||
struct drm_encoder *(*atomic_best_encoder)(struct drm_connector *connector,
|
||||
struct drm_connector_state *connector_state);
|
||||
void (*atomic_begin)(struct drm_connector *connector,
|
||||
struct drm_connector_state *conn_state);
|
||||
void (*atomic_flush)(struct drm_connector *connector,
|
||||
struct drm_connector_state *conn_state);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user