Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maarten Lankhorst and committed by
Dave Airlie
9b5edbf7 531e63e1

+2
+2
drivers/gpu/drm/drm_atomic_helper.c
··· 1563 1563 1564 1564 crtc_state->enable = 1565 1565 drm_atomic_connectors_for_crtc(state, crtc); 1566 + if (!crtc_state->enable) 1567 + crtc_state->active = false; 1566 1568 } 1567 1569 1568 1570 return 0;