git: drm: Improve integration with syscons. Move taskqueue handling to syscons.

Imre Vadasz ivadasz at crater.dragonflybsd.org
Sun Nov 27 16:10:38 PST 2016


commit ba409a882dc5e1cc866af08fb776472b17c11826
Author: Imre Vadász <imre at vdsz.com>
Date:   Sun Nov 20 22:01:40 2016 +0100

    drm: Improve integration with syscons. Move taskqueue handling to syscons.
    
    * Adds asynctd_lk to syscons' softc to synchronize unregister_framebuffer
      code with the asynchronous screen refresh threads.
    
    * Use a generation counter in syscons to check if sc_update_render() needs
      to update the VT resolution/mode. Remove struct fb_info *fbi pointer
      from scr_stat, and always check the struct fb_info *fbi pointer in the
      softc struct instead.
    
    * Use videio_in_progress flag to make initial fb_set_par call a bit safer.
    
    * Moves driver callbacks from struct fb_info itself into struct fb_ops,
      and adds fb_blank and fb_debug_enter callbacks which will be wired up
      in future commits.
    
    * Add unregister_framebuffer() function to syscons, which is needed for
      cleanly detaching a drm graphics driver which is used as framebuffer
      console. The screen will turn off, blank or display a frozen screen,
      after the graphics driver has detached.
    
    * Use drm_fb_helper_unregister_framebuffer() and drm_fb_helper_release_fbi()
      functions in radeon and i915, which are needed for cleanly detaching the
      drivers.
    
    * With radeonkms detaching and re-attaching is working very reliably
      on an AMD G-T44R APU (i.e. HD6250 graphics).
    
    * Detaching i915 on a Haswell notebook barely worked with several errors,
      and trying to re-attach i915 caused the machine to hang.

Summary of changes:
 sys/dev/drm/drm_fb_helper.c             |  61 +++++++--------
 sys/dev/drm/drm_modeset_lock.c          |   5 +-
 sys/dev/drm/i915/intel_fbdev.c          |  19 +++--
 sys/dev/drm/include/drm/drm_fb_helper.h |   4 -
 sys/dev/drm/radeon/radeon_fb.c          |  33 ++++----
 sys/dev/misc/syscons/scvidctl.c         |  40 +++++-----
 sys/dev/misc/syscons/syscons.c          | 131 ++++++++++++++++++++++++++++----
 sys/dev/misc/syscons/syscons.h          |   5 +-
 sys/platform/pc64/include/framebuffer.h |  11 ++-
 sys/platform/pc64/x86_64/machdep.c      |   4 +-
 10 files changed, 211 insertions(+), 102 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ba409a882dc5e1cc866af08fb776472b17c11826


-- 
DragonFly BSD source repository



More information about the Commits mailing list