drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 1 Jun 2015 06:59:53 +0000 (08:59 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 3 Jun 2015 23:20:31 +0000 (09:20 +1000)
commit9b5edbf7a462b7c846e9d4675b9b72b7a4e84de9
tree68ec413e34ecaceca947f929779e2bec268418de
parent531e63e163072e325d9cc82acc095a009f07b6ef
drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config.

This fixes some regressions in i915 when converting to atomic.
set_config failed with -EINVAL, and I received the following warning
in dmesg:

[drm:drm_atomic_crtc_check] [CRTC:20] active without enabled

Solve this by clearing active when a crtc is disabled.

Because crtc_state->enable implies that connectors are active the
change from disabled->enabled can only happen for the crtc that's
being set_config'd, and checking for !crtc_state->enable is sufficient
here.

Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_atomic_helper.c