1. 07 Mar, 2014 2 commits
  2. 06 Mar, 2014 2 commits
  3. 05 Mar, 2014 2 commits
  4. 28 Feb, 2014 8 commits
  5. 14 Feb, 2014 2 commits
  6. 11 Feb, 2014 13 commits
    • Michal Simek's avatar
      video: xilinxfb: Move xilinxfb_platform_data directly to the driver · c4a41bcc
      Michal Simek authored
      No reason to have separate file in header in include/linux folder
      if this is purely driver specific structure.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      c4a41bcc
    • Alexander Shiyan's avatar
      video: imxfb: Use regulator API with LCD class for powering · 9fe21fdc
      Alexander Shiyan authored
      This patch replaces custom lcd_power() callback with
      regulator API over LCD class.
      Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
      Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      9fe21fdc
    • Mikulas Patocka's avatar
      tgafb: avoid restriction on modes with line length not a multiple of 64 · e62cabb5
      Mikulas Patocka authored
      In tgafb there is a restriction that prevents the user from setting a
      videomode with line length not a multiple of 64 bytes (for example,
      800x600 is not allowed).
      
      The reason for this restriction it that functions copyarea_line_8bpp and
      copyarea_line_32bpp can not handle a line length that is not a multiple
      of 64 bytes.
      
      This patch removes this restriction on mode setting and makes sure that
      the functions copyarea_line_8bpp and copyarea_line_32bpp are called only
      if line length is a multiple of 64 bytes. If we set a mode 800x600,
      the functions copyarea_line_8bpp and copyarea_line_32bpp are not used,
      generic functions for copying are used instead and it works just fine.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      e62cabb5
    • Mikulas Patocka's avatar
      tgafb: fix data copying · 6b0df682
      Mikulas Patocka authored
      The functions for data copying copyarea_foreward_8bpp and
      copyarea_backward_8bpp are buggy, they produce screen corruption.
      
      This patch fixes the functions and moves the logic to one function
      "copyarea_8bpp". For simplicity, the function only handles copying that
      is aligned on 8 pixes. If we copy an unaligned area, generic function
      cfb_copyarea is used.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      6b0df682
    • Mikulas Patocka's avatar
      tgafb: fix mode setting with fbset · 62496658
      Mikulas Patocka authored
      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>
      62496658
    • Mikulas Patocka's avatar
      mach64: fix cursor when character width is not a multiple of 8 pixels · 43751a1b
      Mikulas Patocka authored
      This patch fixes the hardware cursor on mach64 when font width is not a
      multiple of 8 pixels.
      
      If you load such a font, the cursor is expanded to the next 8-byte
      boundary and a part of the next character after the cursor is not
      visible.
      For example, when you load a font with 12-pixel width, the cursor width
      is 16 pixels and when the cursor is displayed, 4 pixels of the next
      character are not visible.
      
      The reason is this: atyfb_cursor is called with proper parameters to
      load an image that is 12-pixel wide. However, the number is aligned on
      the next 8-pixel boundary on the line
      "unsigned int width = (cursor->image.width + 7) >> 3;" and the whole
      function acts as it is was loading a 16-pixel image.
      
      This patch fixes it so that the value written to the framebuffer is
      padded with 0xaaaa (the transparent pattern) when the image size it not
      a multiple of 8 pixels. The transparent pattern causes that the cursor
      will not interfere with the next character.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      43751a1b
    • Mikulas Patocka's avatar
      atyfb: set FBINFO_READS_FAST · c38882e3
      Mikulas Patocka authored
      Set FBINFO_READS_FAST so that the console code uses scrolling instead of
      rewriting. This improves scrolling speed.
      
      A time to do ls -la /usr/bin:
      	original patched
      32bpp	4.9	3.6
      24bpp	4.9	2.9
      16bpp	4.9	2.1
      8bpp	4.9	1.7
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      c38882e3
    • Mikulas Patocka's avatar
      mach64: use unaligned access · c29dd869
      Mikulas Patocka authored
      This patch fixes mach64 to use unaligned access to the font bitmap.
      
      This fixes unaligned access warning on sparc64 when 14x8 font is loaded.
      
      On x86(64), unaligned access is handled in hardware, so both functions
      le32_to_cpup and get_unaligned_le32 perform the same operation.
      
      On RISC machines, unaligned access is not handled in hardware, so we
      better use get_unaligned_le32 to avoid the unaligned trap and warning.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      c29dd869
    • Mikulas Patocka's avatar
      atyfb: remove resolution limit 1600 · bf26e6d2
      Mikulas Patocka authored
      The card works fine in 1980x1080 resolution. Therefore, there is no need
      to limit the resolution to 1600 pixels.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      bf26e6d2
    • Mikulas Patocka's avatar
      framebuffer: fix cfb_copyarea · 00a9d699
      Mikulas Patocka authored
      The function cfb_copyarea is buggy when the copy operation is not aligned on
      long boundary (4 bytes on 32-bit machines, 8 bytes on 64-bit machines).
      
      How to reproduce:
      - use x86-64 machine
      - use a framebuffer driver without acceleration (for example uvesafb)
      - set the framebuffer to 8-bit depth
      	(for example fbset -a 1024x768-60 -depth 8)
      - load a font with character width that is not a multiple of 8 pixels
      	note: the console-tools package cannot load a font that has
      	width different from 8 pixels. You need to install the packages
      	"kbd" and "console-terminus" and use the program "setfont" to
      	set font width (for example: setfont Uni2-Terminus20x10)
      - move some text left and right on the bash command line and you get a
      	screen corruption
      
      To expose more bugs, put this line to the end of uvesafb_init_info:
      info->flags |= FBINFO_HWACCEL_COPYAREA | FBINFO_READS_FAST;
      - Now framebuffer console will use cfb_copyarea for console scrolling.
      You get a screen corruption when console is scrolled.
      
      This patch is a rewrite of cfb_copyarea. It fixes the bugs, with this
      patch, console scrolling in 8-bit depth with a font width that is not a
      multiple of 8 pixels works fine.
      
      The cfb_copyarea code was very buggy and it looks like it was written
      and never tried with non-8-pixel font.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      00a9d699
    • Mikulas Patocka's avatar
      matroxfb: restore the registers M_ACCESS and M_PITCH · a772d473
      Mikulas Patocka authored
      When X11 is running and the user switches back to console, the card
      modifies the content of registers M_MACCESS and M_PITCH in periodic
      intervals.
      
      This patch fixes it by restoring the content of these registers before
      issuing any accelerator command.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      a772d473
    • Mikulas Patocka's avatar
      matroxfb: set FBINFO_READS_FAST · a2317e6a
      Mikulas Patocka authored
      Set FBINFO_READS_FAST so that the console code uses scrolling instead of
      rewriting. This improves scrolling speed.
      
      A time to do ls -la /usr/bin:
      	original patched
      32bpp	5.4	3.6
      24bpp	5.1	3.0
      16bpp	4.9	2.5
      8bpp	4.9	2.0
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      a2317e6a
    • Keith Packard's avatar
      fbcon: Clean up fbcon data in fb_info on FB_EVENT_FB_UNBIND with 0 fbs · 5f4dc28b
      Keith Packard authored
      When FB_EVENT_FB_UNBIND is sent, fbcon has two paths, one path taken
      when there is another frame buffer to switch any affected vcs to and
      another path when there isn't.
      
      In the case where there is another frame buffer to use,
      fbcon_fb_unbind calls set_con2fb_map to remap all of the affected vcs
      to the replacement frame buffer. set_con2fb_map will eventually call
      con2fb_release_oldinfo when the last vcs gets unmapped from the old
      frame buffer.
      
      con2fb_release_oldinfo frees the fbcon data that is hooked off of the
      fb_info structure, including the cursor timer.
      
      In the case where there isn't another frame buffer to use,
      fbcon_fb_unbind simply calls fbcon_unbind, which doesn't clear the
      con2fb_map or free the fbcon data hooked from the fb_info
      structure. In particular, it doesn't stop the cursor blink timer. When
      the fb_info structure is then freed, we end up with a timer queue
      pointing into freed memory and "bad things" start happening.
      
      This patch first changes con2fb_release_oldinfo so that it can take a
      NULL pointer for the new frame buffer, but still does all of the
      deallocation and cursor timer cleanup.
      
      Finally, the patch tries to replicate some of what set_con2fb_map does
      by clearing the con2fb_map for the affected vcs and calling the
      modified con2fb_release_info function to clean up the fb_info structure.
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      5f4dc28b
  7. 10 Feb, 2014 4 commits
  8. 09 Feb, 2014 7 commits
    • Al Viro's avatar
      fix a kmap leak in virtio_console · c9efe511
      Al Viro authored
      While we are at it, don't do kmap() under kmap_atomic(), *especially*
      for a page we'd allocated with GFP_KERNEL.  It's spelled "page_address",
      and had that been more than that, we'd have a real trouble - kmap_high()
      can block, and doing that while holding kmap_atomic() is a Bad Idea(tm).
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c9efe511
    • Al Viro's avatar
      fix O_SYNC|O_APPEND syncing the wrong range on write() · d311d79d
      Al Viro authored
      It actually goes back to 2004 ([PATCH] Concurrent O_SYNC write support)
      when sync_page_range() had been introduced; generic_file_write{,v}() correctly
      synced
      	pos_after_write - written .. pos_after_write - 1
      but generic_file_aio_write() synced
      	pos_before_write .. pos_before_write + written - 1
      instead.  Which is not the same thing with O_APPEND, obviously.
      A couple of years later correct variant had been killed off when
      everything switched to use of generic_file_aio_write().
      
      All users of generic_file_aio_write() are affected, and the same bug
      has been copied into other instances of ->aio_write().
      
      The fix is trivial; the only subtle point is that generic_write_sync()
      ought to be inlined to avoid calculations useless for the majority of
      calls.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      d311d79d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 9c1db779
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "This is a small collection of fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix data corruption when reading/updating compressed extents
        Btrfs: don't loop forever if we can't run because of the tree mod log
        btrfs: reserve no transaction units in btrfs_ioctl_set_features
        btrfs: commit transaction after setting label and features
        Btrfs: fix assert screwup for the pending move stuff
      9c1db779
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6f2a1c1e
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Tooling fixes, mostly related to the KASLR fallout, but also other
        fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf buildid-cache: Check relocation when checking for existing kcore
        perf tools: Adjust kallsyms for relocated kernel
        perf tests: No need to set up ref_reloc_sym
        perf symbols: Prevent the use of kcore if the kernel has moved
        perf record: Get ref_reloc_sym from kernel map
        perf machine: Set up ref_reloc_sym in machine__create_kernel_maps()
        perf machine: Add machine__get_kallsyms_filename()
        perf tools: Add kallsyms__get_function_start()
        perf symbols: Fix symbol annotation for relocated kernel
        perf tools: Fix include for non x86 architectures
        perf tools: Fix AAAAARGH64 memory barriers
        perf tools: Demangle kernel and kernel module symbols too
        perf/doc: Remove mention of non-existent set_perf_event_pending() from design.txt
      6f2a1c1e
    • Filipe David Borba Manana's avatar
      Btrfs: fix data corruption when reading/updating compressed extents · a2aa75e1
      Filipe David Borba Manana authored
      When using a mix of compressed file extents and prealloc extents, it
      is possible to fill a page of a file with random, garbage data from
      some unrelated previous use of the page, instead of a sequence of zeroes.
      
      A simple sequence of steps to get into such case, taken from the test
      case I made for xfstests, is:
      
         _scratch_mkfs
         _scratch_mount "-o compress-force=lzo"
         $XFS_IO_PROG -f -c "pwrite -S 0x06 -b 18670 266978 18670" $SCRATCH_MNT/foobar
         $XFS_IO_PROG -c "falloc 26450 665194" $SCRATCH_MNT/foobar
         $XFS_IO_PROG -c "truncate 542872" $SCRATCH_MNT/foobar
         $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar
      
      This results in the following file items in the fs tree:
      
         item 4 key (257 INODE_ITEM 0) itemoff 15879 itemsize 160
             inode generation 6 transid 6 size 542872 block group 0 mode 100600
         item 5 key (257 INODE_REF 256) itemoff 15863 itemsize 16
             inode ref index 2 namelen 6 name: foobar
         item 6 key (257 EXTENT_DATA 0) itemoff 15810 itemsize 53
             extent data disk byte 0 nr 0 gen 6
             extent data offset 0 nr 24576 ram 266240
             extent compression 0
         item 7 key (257 EXTENT_DATA 24576) itemoff 15757 itemsize 53
             prealloc data disk byte 12849152 nr 241664 gen 6
             prealloc data offset 0 nr 241664
         item 8 key (257 EXTENT_DATA 266240) itemoff 15704 itemsize 53
             extent data disk byte 12845056 nr 4096 gen 6
             extent data offset 0 nr 20480 ram 20480
             extent compression 2
         item 9 key (257 EXTENT_DATA 286720) itemoff 15651 itemsize 53
             prealloc data disk byte 13090816 nr 405504 gen 6
             prealloc data offset 0 nr 258048
      
      The on disk extent at offset 266240 (which corresponds to 1 single disk block),
      contains 5 compressed chunks of file data. Each of the first 4 compress 4096
      bytes of file data, while the last one only compresses 3024 bytes of file data.
      Therefore a read into the file region [285648 ; 286720[ (length = 4096 - 3024 =
      1072 bytes) should always return zeroes (our next extent is a prealloc one).
      
      The solution here is the compression code path to zero the remaining (untouched)
      bytes of the last page it uncompressed data into, as the information about how
      much space the file data consumes in the last page is not known in the upper layer
      fs/btrfs/extent_io.c:__do_readpage(). In __do_readpage we were correctly zeroing
      the remainder of the page but only if it corresponds to the last page of the inode
      and if the inode's size is not a multiple of the page size.
      
      This would cause not only returning random data on reads, but also permanently
      storing random data when updating parts of the region that should be zeroed.
      For the example above, it means updating a single byte in the region [285648 ; 286720[
      would store that byte correctly but also store random data on disk.
      
      A test case for xfstests follows soon.
      Signed-off-by: default avatarFilipe David Borba Manana <fdmanana@gmail.com>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      a2aa75e1
    • Josef Bacik's avatar
      Btrfs: don't loop forever if we can't run because of the tree mod log · 27a377db
      Josef Bacik authored
      A user reported a 100% cpu hang with my new delayed ref code.  Turns out I
      forgot to increase the count check when we can't run a delayed ref because of
      the tree mod log.  If we can't run any delayed refs during this there is no
      point in continuing to look, and we need to break out.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      27a377db
    • David Sterba's avatar
      btrfs: reserve no transaction units in btrfs_ioctl_set_features · 8051aa1a
      David Sterba authored
      Added in patch "btrfs: add ioctls to query/change feature bits online"
      modifications to superblock don't need to reserve metadata blocks when
      starting a transaction.
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarChris Mason <clm@fb.com>
      8051aa1a