drm: Consider drivers setting DRIVER_ATOMIC as atomic.
authorEric Anholt <eric@anholt.net>
Thu, 21 Jun 2018 19:54:28 +0000 (12:54 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 22 Jun 2018 20:47:43 +0000 (13:47 -0700)
commit46d8f405e16cdc47962edbe7771246c8d5b8c795
treef3fff8941484ab60dd96714c3f34f84d51d548a8
parent4adc18371f14cf9dfd169d9b8ebdfdaee13c2639
drm: Consider drivers setting DRIVER_ATOMIC as atomic.

Drivers such as vc4 don't initialize mode_config.funcs until later in
initialization, but we know they're atomic since they've got the flag
set.  This avoids oopsing on dereferencing funcs in the new atomic
methods sanity checks.

I moved the atomic check function down below the core flag check, to
avoid needing a prototype.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: ba1f665f161c ("drm: Add checks for atomic_[duplicate/destroy]_state with atomic drivers")
Link: https://patchwork.freedesktop.org/patch/msgid/20180621195428.17447-1-eric@anholt.net
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
include/drm/drmP.h