OSDN Git Service

drm/fbdev: Return -EBUSY when oopsing
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 Jul 2015 11:18:40 +0000 (13:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Aug 2015 12:13:01 +0000 (14:13 +0200)
commitc50bfd08d60cefbe1714c4a53b1c325982858549
tree4de43ddad4f8af4f396ef02357781a333ba28c17
parent85f2edf2115d6aa0d7613f96dd3903b8d5f4a56d
drm/fbdev: Return -EBUSY when oopsing

Trying to do anything with kms drivers when oopsing has become a
failing proposition. But since we can end up in the fbdev code simply
due to the console unblanking that's done unconditionally just
removing our panic handler isn't enough. We need to block all fbdev
callbacks when oopsing.

There was already one in the blank handler, but it failed silently.
That makes it impossible for drivers (like i915) who subclass these
functions to figure this out.

Instead consistently return -EBUSY so that everyone knows that we
really don't want to be bothered right now. This also allows us to
remove a pile of FIXMEs from the i915 fbdev code (since due to the
failure code they now won't attempt to grab dangerous locks any more).

Cc: Dave Airlie <airlied@gmail.com>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/i915/intel_fbdev.c