1. 29 May, 2014 38 commits
  2. 23 May, 2014 2 commits
    • Mikulas Patocka's avatar
      tgafb: fix mode setting with fbset · a1c6804a
      Mikulas Patocka authored
      commit 62496658 upstream.
      
      Mode setting in the TGA driver is broken for these reasons:
      
      - info->fix.line_length is set just once in tgafb_init_fix function. If
        we change videomode, info->fix.line_length is not recalculated - so
        the video mode is changed but the screen is corrupted because of wrong
        info->fix.line_length.
      
      - info->fix.smem_len is set in tgafb_init_fix to the size of the default
        video mode (640x480). If we set a higher resolution,
        info->fix.smem_len is smaller than the current screen size, preventing
        the userspace program from mapping the framebuffer.
      
      This patch fixes it:
      
      - info->fix.line_length initialization is moved to tgafb_set_par so that
        it is recalculated with each mode change.
      
      - info->fix.smem_len is set to a fixed value representing the real
        amount of video ram (the values are taken from xfree86 driver).
      
      - add a check to tgafb_check_var to prevent us from setting a videomode
        that doesn't fit into videoram.
      
      - in tgafb_register, tgafb_init_fix is moved upwards, to be called
        before fb_find_mode (because fb_find_mode already needs the videoram
        size set in tgafb_init_fix).
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vga.kernel.org
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      a1c6804a
    • Richard Guy Briggs's avatar
      sched: declare pid_alive as inline · 67ded015
      Richard Guy Briggs authored
      commit 80e0b6e8 upstream.
      
      We accidentally declared pid_alive without any extern/inline connotation.
      Some platforms were fine with this, some like ia64 and mips were very angry.
      If the function is inline, the prototype should be inline!
      
      on ia64:
      include/linux/sched.h:1718: warning: 'pid_alive' declared inline after
      being called
      Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      67ded015