1. 25 1月, 2017 3 次提交
  2. 27 10月, 2016 4 次提交
    • J
      vgacon: remove prehistoric macros · b9c8b7fc
      Jiri Slaby 提交于
      These macros:
      * CAN_LOAD_EGA_FONTS
      * CAN_LOAD_PALETTE
      * TRIDENT_GLITCH
      * VGA_CAN_DO_64KB
      * SLOW_VGA
      are either always set or always unset. They come from the linux 2.1
      times. And given nobody switched them to some configurable options, I
      assume nobody actually uses them.
      
      So remove the macros and leave in place appropriate branches of the
      conditional code.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: <linux-fbdev@vger.kernel.org>
      Cc: <linux-doc@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b9c8b7fc
    • J
      vgacon: switch boolean variables to bool · 96fd9554
      Jiri Slaby 提交于
      These variables:
      * vga_can_do_color
      * vgacon_text_mode_force
      * vga_font_is_default
      * vga_hardscroll_enabled
      * vga_hardscroll_user_enable
      * vga_init_done
      * vga_is_gfx
      * vga_palette_blanked
      * vga_512_chars
      are used exclusively as a boolean value, so make them really a bool.
      
      Remove also useless "? true : false".
      
      __read_mostly annotations removed too as they obfuscate the code and I
      doubt they improve anything measurable given the variables are used
      from .con_scroll, .con_startup and such.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: <linux-fbdev@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      96fd9554
    • J
      tty: vgacon+sisusb, move scrolldelta to a common helper · 35cc56f9
      Jiri Slaby 提交于
      The code is mirrorred in scrolldelta implementations of both vgacon
      and sisusb. Let's move the code to a separate helper where we will
      perform a common cleanup and further changes.
      
      While we are moving the code, make it linear and save one indentation
      level. This is done by returning from the "!lines" then-branch
      immediatelly. This allows flushing the else-branch 1 level to the
      left, obviously.
      
      Few more new lines and comments were added too.
      
      And do not forget to export the helper function given sisusb can be
      built as module.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: <linux-fbdev@vger.kernel.org>
      Cc: <linux-usb@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      35cc56f9
    • J
      tty: vt, cleanup and document con_scroll · d705ff38
      Jiri Slaby 提交于
      Scrolling helpers scrup and scrdown both accept 'top' and 'bottom' as
      unsigned int. Number of lines 'nr' is accepted as int, but all callers
      pass down unsigned too. So change the type of 'nr' to unsigned too.
      Now, promote unsigned int from the helpers up to the con_scroll
      hook which actually accepted all those as signed int.
      
      Next, the 'dir' parameter can have only two values and we define
      constants for that: SM_UP and SM_DOWN. Switch them to enum and do
      proper type checking on 'dir' too.
      
      Finally, document the behaviour of the hook.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: <linux-fbdev@vger.kernel.org>
      Cc: <linux-usb@vger.kernel.org>
      Cc: <linux-parisc@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d705ff38
  3. 26 6月, 2016 4 次提交
    • J
      tty: vt, convert more macros to functions · 6ca8dfd7
      Jiri Slaby 提交于
      Namely convert:
      * IS_FG -> con_is_fg
      * DO_UPDATE -> con_should_update
      * CON_IS_VISIBLE -> con_is_visible
      
      DO_UPDATE was a weird name for a yes/no answer, so the new name is
      con_should_update.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: linux-usb@vger.kernel.org
      Cc: linux-fbdev@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6ca8dfd7
    • J
      tty: vt, remove consw->con_bmove · 52ad1f38
      Jiri Slaby 提交于
      It is never called since commit 81732c3b (tty vt: Fix line
      garbage in virtual console on command line edition) in 3.7. So remove
      all the callbacks.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: linux-usb@vger.kernel.org
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      52ad1f38
    • J
      tty: vt, consw->con_set_palette cleanup · 709280da
      Jiri Slaby 提交于
      * allow NULL consw->con_set_palette (some consoles define an empty
        hook)
      * => remove empty hooks now
      * return value of consw->con_set_palette is never checked => make the
        function void
      * document consw->con_set_palette a bit
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: linux-usb@vger.kernel.org
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      709280da
    • J
      tty: vt, consw->con_scrolldelta cleanup · 97293de9
      Jiri Slaby 提交于
      * allow NULL consw->con_scrolldelta (some consoles define an empty
        hook)
      * => remove empty hooks now
      * return value of consw->con_scrolldelta is never checked => make the
        function void
      * document consw->con_scrolldelta a bit
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Thomas Winischhofer <thomas@winischhofer.net>
      Cc: linux-usb@vger.kernel.org
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: linux-fbdev@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      97293de9
  4. 01 5月, 2016 1 次提交
  5. 22 10月, 2014 1 次提交
  6. 10 6月, 2014 1 次提交
    • D
      drm/i915: Kick out vga console · a4de0526
      Daniel Vetter 提交于
      Touching the VGA resources on an IVB EFI machine causes hard hangs when
      we then kick out the efifb. Ouch.
      
      Apparently this also prevents unclaimed register errors on hsw and
      hard machine hangs on my i855gm when trying to unbind fbcon.
      
      Also, we want this to make I915_FBDEV=n safe.
      
      v2: Rebase and pimp commit message.
      
      v3: We also need to unregister the vga console, otherwise the unbind
      of the fb console before module unload might resurrect it again.
      
      v4: Ignore errors when the vga console is already unregistered - this
      can happen when e.g. reloading i915.ko.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: linux-fbdev@vger.kernel.org
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a4de0526
  7. 29 5月, 2014 2 次提交
    • T
      console: Use explicit pointer type for vc_uni_pagedir* fields · e4bdab70
      Takashi Iwai 提交于
      The vc_data.vc_uni_pagedir filed is currently long int, supposedly to
      be served generically.  This, however, leads to lots of cast to
      pointer, and rather it worsens the readability significantly.
      
      Actually, we have now only a single uni_pagedir map implementation,
      and this won't change likely.  So, it'd be much more simple and
      error-prone to just use the exact pointer for struct uni_pagedir
      instead of long.
      
      Ditto for vc_uni_pagedir_loc.  It's a pointer to the uni_pagedir, thus
      it can be changed similarly to the exact type.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4bdab70
    • T
      vgacon: Fix & cleanup refcounting · 0f2893f0
      Takashi Iwai 提交于
      The vgacon driver prepares a two element array of uni_pagedir_loc and
      uses the second item as its own reference counter for sharing the
      uni_pagedir.  And the code assumes blindly that the second item is
      available if the assigned vc_uni_pagedir isn't the standard one, which
      might be wrong (although currently it's so).
      
      This patch fixes that wrong assumption, and gives a slight cleanup
      along with it: namely, instead of array, just give the uni_pagedir_loc
      and a separate refcount variable.  It makes the code a bit more
      understandable at first glance.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0f2893f0
  8. 27 6月, 2013 1 次提交
  9. 26 6月, 2013 1 次提交
  10. 07 2月, 2013 1 次提交
    • D
      vgacon/vt: clear buffer attributes when we load a 512 character font (v2) · 2a248307
      Dave Airlie 提交于
      When we switch from 256->512 byte font rendering mode, it means the
      current contents of the screen is being reinterpreted. The bit that holds
      the high bit of the 9-bit font, may have been previously set, and thus
      the new font misrenders.
      
      The problem case we see is grub2 writes spaces with the bit set, so it
      ends up with data like 0x820, which gets reinterpreted into 0x120 char
      which the font translates into G with a circumflex. This flashes up on
      screen at boot and is quite ugly.
      
      A current side effect of this patch though is that any rendering on the
      screen changes color to a slightly darker color, but at least the screen
      no longer corrupts.
      
      v2: as suggested by hpa, always clear the attribute space, whether we
      are are going to or from 512 chars.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      2a248307
  11. 13 9月, 2011 1 次提交
  12. 25 1月, 2011 1 次提交
  13. 14 1月, 2011 1 次提交
    • Y
      vgacon: check for efi machine · 554ec37a
      Yannick Heneault 提交于
      It seems there is a small problem of VGA palette corruption on EFI
      machine.  When the kernel initializes the architecture, it checks if the
      machine is a EFI machine and assumes that a VGA console can exist.
      
      When it initializes the console in vgacon_startup it checks if it can
      really use the VGA console.  I think this is where a check is missing.
      Currently, the function can fail if a VESA boot mode is detected but not if
      a EFI boot mode was used.
      
      Thus vgacon_startup() doesn't fail and initialize the video card for a real
      VGA mode.  This function changes the first 16entries of the VGA palette.
      
      When the efifb driver kicks in, the palette is not restored to default
      ramp value, thus the 16 first entry remain in a modified state.  The
      following patch prevent this corruption.
      Signed-off-by: NYannick Heneault <yheneaul@matrox.com>
      Cc: Dave Airlie <airlied@linux.ie>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      554ec37a
  14. 18 11月, 2010 1 次提交
  15. 11 8月, 2010 2 次提交
  16. 07 3月, 2010 1 次提交
  17. 14 11月, 2009 2 次提交
  18. 23 9月, 2009 1 次提交
  19. 20 9月, 2009 1 次提交
  20. 12 6月, 2009 1 次提交
  21. 03 5月, 2009 1 次提交
  22. 06 1月, 2009 1 次提交
  23. 29 12月, 2008 1 次提交
    • D
      DRM: add mode setting support · f453ba04
      Dave Airlie 提交于
      Add mode setting support to the DRM layer.
      
      This is a fairly big chunk of work that allows DRM drivers to provide
      full output control and configuration capabilities to userspace.  It was
      motivated by several factors:
        - the fb layer's APIs aren't suited for anything but simple
          configurations
        - coordination between the fb layer, DRM layer, and various userspace
          drivers is poor to non-existent (radeonfb excepted)
        - user level mode setting drivers makes displaying panic & oops
          messages more difficult
        - suspend/resume of graphics state is possible in many more
          configurations with kernel level support
      
      This commit just adds the core DRM part of the mode setting APIs.
      Driver specific commits using these new structure and APIs will follow.
      
      Co-authors: Jesse Barnes <jbarnes@virtuousgeek.org>, Jakob Bornecrantz <jakob@tungstengraphics.com>
      Contributors: Alan Hourihane <alanh@tungstengraphics.com>, Maarten Maathuis <madman2003@gmail.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f453ba04
  24. 17 10月, 2008 2 次提交
  25. 15 10月, 2008 1 次提交
  26. 29 4月, 2008 1 次提交
    • J
      vt: fix background color on line feed · c9e587ab
      Jan Engelhardt 提交于
      A command that causes a line feed while a background color is active,
      such as
      
      	perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
      and
      	perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'
      
      causes the line that was started as a result of the line feed to be completely
      filled with the currently active background color instead of the default
      color.
      
      When scrolling, part of the current screen is memcpy'd/memmove'd to the new
      region, and the new line(s) that will appear as a result are cleared using
      memset.  However, the lines are cleared with vc->vc_video_erase_char, causing
      them to be colored with the currently active background color.  This is
      different from X11 terminal emulators which always paint the new lines with
      the default background color (e.g.  `xterm -bg black`).
      
      The clear operation (\e[1J and \e[2J) also use vc_video_erase_char, so a new
      vc->vc_scrl_erase_char is introduced with contains the erase character used
      for scrolling, which is built from vc->vc_def_color instead of vc->vc_color.
      Signed-off-by: NJan Engelhardt <jengelh@computergmbh.de>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c9e587ab
  27. 07 2月, 2008 1 次提交
  28. 17 10月, 2007 1 次提交