b/drivers/gpu/drm/drm_atomic_helper.c
@@ -485,6 +485,7 @@ void drm_atomic_helper_init_crtc_state(struct
drm_crtc *crtc,
/* this should never happen.. but make sure! */
WARN_ON(cstate->event);
cstate->event = NULL;
+ cstate->commit_state = false;
}
EXPORT_SYMBOL(drm_atomic_helper_init_crtc_state);
@@ -631,6 +632,9 @@ drm_atomic_helper_commit_crtc_state(struct drm_crtc *crtc,
struct drm_atomic_helper_state *a = cstate->state;
int ret = -EINVAL;
+ if (!cstate->commit_state)
+ return 0;
+
if (cstate->set_config)
return set_config(crtc, cstate);
@@ -959,6 +959,7 @@ int drm_crtc_set_property(struct drm_crtc *crtc,
struct drm_device *dev = crtc->dev;
struct drm_mode_config *config = &dev->mode_config;
+ state->commit_state = true;
drm_object_property_set_value(&crtc->base,
&state->propvals, property, value, blob_data);
@@ -482,6 +482,7 @@ struct drm_crtc_state {
bool set_config : 1;
bool new_fb : 1;
bool connectors_change : 1;
+ bool commit_state : 1;
uint8_t num_connector_ids;
uint32_t *connector_ids;