1. 08 Oct, 2018 10 commits
    • Sam Ravnborg's avatar
      atmel_lcdfb: support native-mode display-timings · 60e5e48d
      Sam Ravnborg authored
      When a device tree set a display-timing using native-mode
      then according to the bindings doc this should:
      
          native-mode:
          The native mode for the display, in case multiple
          modes are provided.
          When omitted, assume the first node is the native.
      
      The atmel_lcdfb used the last timing subnode and did not
      respect the timing mode specified with native-mode.
      
      Introduce use of of_get_videomode() which allowed
      a nice simplification of the code while also
      added support for native-mode.
      
      As a nice side-effect this fixes a memory leak where the
      data used for timings and the display_np was not freed.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      60e5e48d
    • Mehdi Bounya's avatar
      Video: vgastate: fixed a spacing coding style · 811ab8db
      Mehdi Bounya authored
      Removed a space between function name and open parant.
      Signed-off-by: default avatarMehdi Bounya <mehdi.bounya@gmail.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      811ab8db
    • Mikulas Patocka's avatar
      atyfb: fix debugging printks · ee6fbb20
      Mikulas Patocka authored
      This patch fixes the debugging printks. Use pr_cont, so that the lines are
      not broken up. Use printk when starting a new line (a long string of
      pr_cont's without any printks causes missing characters in the console
      output on sparc).
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      ee6fbb20
    • Mikulas Patocka's avatar
      mach64: optimize wait_for_fifo · 01c40a17
      Mikulas Patocka authored
      This is a simple optimization for fifo waiting that improves scrolling
      performance by 5%. If the queue has more free entries that what we
      consume, we can skip the costly register read next time.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <syrjala@sci.fi>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      01c40a17
    • Mikulas Patocka's avatar
      mach64: fix image corruption due to reading accelerator registers · c09bcc91
      Mikulas Patocka authored
      Reading the registers without waiting for engine idle returns
      unpredictable values. These unpredictable values result in display
      corruption - if atyfb_imageblit reads the content of DP_PIX_WIDTH with the
      bit DP_HOST_TRIPLE_EN set (from previous invocation), the driver would
      never ever clear the bit, resulting in display corruption.
      
      We don't want to wait for idle because it would degrade performance, so
      this patch modifies the driver so that it never reads accelerator
      registers.
      
      HOST_CNTL doesn't have to be read, we can just write it with
      HOST_BYTE_ALIGN because no other part of the driver cares if
      HOST_BYTE_ALIGN is set.
      
      DP_PIX_WIDTH is written in the functions atyfb_copyarea and atyfb_fillrect
      with the default value and in atyfb_imageblit with the value set according
      to the source image data.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <syrjala@sci.fi>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      c09bcc91
    • Mikulas Patocka's avatar
      mach64: fix display corruption on big endian machines · 3c6c6a78
      Mikulas Patocka authored
      The code for manual bit triple is not endian-clean. It builds the variable
      "hostdword" using byte accesses, therefore we must read the variable with
      "le32_to_cpu".
      
      The patch also enables (hardware or software) bit triple only if the image
      is monochrome (image->depth). If we want to blit full-color image, we
      shouldn't use the triple code.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <syrjala@sci.fi>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      3c6c6a78
    • Mikulas Patocka's avatar
      mach64: detect the dot clock divider correctly on sparc · ceadddde
      Mikulas Patocka authored
      On Sun Ultra 5, it happens that the dot clock is not set up properly for
      some videomodes. For example, if we set the videomode "r1024x768x60" in
      the firmware, Linux would incorrectly set a videomode with refresh rate
      180Hz when booting (suprisingly, my LCD monitor can display it, although
      display quality is very low).
      
      The reason is this: Older mach64 cards set the divider in the register
      VCLK_POST_DIV. The register has four 2-bit fields (the field that is
      actually used is specified in the lowest two bits of the register
      CLOCK_CNTL). The 2 bits select divider "1, 2, 4, 8". On newer mach64 cards,
      there's another bit added - the top four bits of PLL_EXT_CNTL extend the
      divider selection, so we have possible dividers "1, 2, 4, 8, 3, 5, 6, 12".
      The Linux driver clears the top four bits of PLL_EXT_CNTL and never sets
      them, so it can work regardless if the card supports them. However, the
      sparc64 firmware may set these extended dividers during boot - and the
      mach64 driver detects incorrect dot clock in this case.
      
      This patch makes the driver read the additional divider bit from
      PLL_EXT_CNTL and calculate the initial refresh rate properly.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Reviewed-by: default avatarVille Syrjälä <syrjala@sci.fi>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      ceadddde
    • Mikulas Patocka's avatar
      udlfb: handle unplug properly · 68a958a9
      Mikulas Patocka authored
      The udlfb driver maintained an open count and cleaned up itself when the
      count reached zero. But the console is also counted in the reference count
      - so, if the user unplugged the device, the open count would not drop to
      zero and the driver stayed loaded with console attached. If the user
      re-plugged the adapter, it would create a device /dev/fb1, show green
      screen and the access to the console would be lost.
      
      The framebuffer subsystem has reference counting on its own - in order to
      fix the unplug bug, we rely the framebuffer reference counting. When the
      user unplugs the adapter, we call unregister_framebuffer unconditionally.
      unregister_framebuffer will unbind the console, wait until all users stop
      using the framebuffer and then call the fb_destroy method. The fb_destroy
      cleans up the USB driver.
      
      This patch makes the following changes:
      * Drop dlfb->kref and rely on implicit framebuffer reference counting
        instead.
      * dlfb_usb_disconnect calls unregister_framebuffer, the rest of driver
        cleanup is done in the function dlfb_ops_destroy. dlfb_ops_destroy will
        be called by the framebuffer subsystem when no processes have the
        framebuffer open or mapped.
      * We don't use workqueue during initialization, but initialize directly
        from dlfb_usb_probe. The workqueue could race with dlfb_usb_disconnect
        and this racing would produce various kinds of memory corruption.
      * We use usb_get_dev and usb_put_dev to make sure that the USB subsystem
        doesn't free the device under us.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      cc: Dave Airlie <airlied@redhat.com>
      Cc: Bernie Thompson <bernie@plugable.com>,
      Cc: Ladislav Michl <ladis@linux-mips.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      68a958a9
    • Jia-Ju Bai's avatar
      video: fbdev: add the dependency of broadsheetfb in Kconfig · ad4366ad
      Jia-Ju Bai authored
      broadsheetfb is a platform driver and it should not be used on x86.
      It should be used only by single ARM PXA board so add the dependency
      in Kconfig.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      ad4366ad
    • Bartlomiej Zolnierkiewicz's avatar
      Merge tag 'v4.19-rc7' of... · e0d81d92
      Bartlomiej Zolnierkiewicz authored
      Merge tag 'v4.19-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
      
      This is the 4.19-rc7 release
      
      Sync with upstream (which now contains fbdev-v4.19-rc7 changes) to
      prepare a base for fbdev-v4.20 changes.
      e0d81d92
  2. 07 Oct, 2018 7 commits
  3. 06 Oct, 2018 1 commit
    • Greg Kroah-Hartman's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · c1d84a1b
      Greg Kroah-Hartman authored
      Dave writes:
        "Networking fixes:
      
        1) Fix truncation of 32-bit right shift in bpf, from Jann Horn.
      
        2) Fix memory leak in wireless wext compat, from Stefan Seyfried.
      
        3) Use after free in cfg80211's reg_process_hint(), from Yu Zhao.
      
        4) Need to cancel pending work when unbinding in smsc75xx otherwise
           we oops, also from Yu Zhao.
      
        5) Don't allow enslaving a team device to itself, from Ido Schimmel.
      
        6) Fix backwards compat with older userspace for rtnetlink FDB dumps.
           From Mauricio Faria.
      
        7) Add validation of tc policy netlink attributes, from David Ahern.
      
        8) Fix RCU locking in rawv6_send_hdrinc(), from Wei Wang."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (26 commits)
        net: mvpp2: Extract the correct ethtype from the skb for tx csum offload
        ipv6: take rcu lock in rawv6_send_hdrinc()
        net: sched: Add policy validation for tc attributes
        rtnetlink: fix rtnl_fdb_dump() for ndmsg header
        yam: fix a missing-check bug
        net: bpfilter: Fix type cast and pointer warnings
        net: cxgb3_main: fix a missing-check bug
        bpf: 32-bit RSH verification must truncate input before the ALU op
        net: phy: phylink: fix SFP interface autodetection
        be2net: don't flip hw_features when VXLANs are added/deleted
        net/packet: fix packet drop as of virtio gso
        net: dsa: b53: Keep CPU port as tagged in all VLANs
        openvswitch: load NAT helper
        bnxt_en: get the reduced max_irqs by the ones used by RDMA
        bnxt_en: free hwrm resources, if driver probe fails.
        bnxt_en: Fix enables field in HWRM_QUEUE_COS2BW_CFG request
        bnxt_en: Fix VNIC reservations on the PF.
        team: Forbid enslaving team device to itself
        net/usb: cancel pending work when unbinding smsc75xx
        mlxsw: spectrum: Delete RIF when VLAN device is removed
        ...
      c1d84a1b
  4. 05 Oct, 2018 22 commits