Skip to content
Snippets Groups Projects
  1. May 26, 2014
  2. Mar 04, 2014
  3. Mar 03, 2014
    • Rob Clark's avatar
      drm backport from v3.14-rc5 · 8bf22a01
      Rob Clark authored
      Sync to commit:
      
      commit 0414855f
      Author:     Linus Torvalds <torvalds@linux-foundation.org>
      AuthorDate: Sun Mar 2 18:56:16 2014 -0800
      Commit:     Linus Torvalds <torvalds@linux-foundation.org>
      CommitDate: Sun Mar 2 18:56:16 2014 -0800
      
          Linux 3.14-rc5
      8bf22a01
    • Russell King's avatar
      drivers/base: fix devres handling for master device · 2b78ca19
      Russell King authored
      
      We weren't handling the devres issues for the master device failing a
      bind, or being unbound properly.  Add a devres group to contain these,
      and release the resources at the appropriate points.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b78ca19
    • Russell King's avatar
      drivers/base: provide an infrastructure for componentised subsystems · 0d262bab
      Russell King authored
      
      Subsystems such as ALSA, DRM and others require a single card-level
      device structure to represent a subsystem.  However, firmware tends to
      describe the individual devices and the connections between them.
      
      Therefore, we need a way to gather up the individual component devices
      together, and indicate when we have all the component devices.
      
      We do this in DT by providing a "superdevice" node which specifies
      the components, eg:
      
      	imx-drm {
      		compatible = "fsl,drm";
      		crtcs = <&ipu1>;
      		connectors = <&hdmi>;
      	};
      
      The superdevice is declared into the component support, along with the
      subcomponents.  The superdevice receives callbacks to locate the
      subcomponents, and identify when all components are present.  At this
      point, we bind the superdevice, which causes the appropriate subsystem
      to be initialised in the conventional way.
      
      When any of the components or superdevice are removed from the system,
      we unbind the superdevice, thereby taking the subsystem down.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0d262bab
    • Nicolas Pitre's avatar
      ARM: 7670/1: fix the memset fix · 1addd839
      Nicolas Pitre authored
      
      Commit 455bd4c4 ("ARM: 7668/1: fix memset-related crashes caused by
      recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
      with the memset return value.  However the memset itself became broken
      by that patch for misaligned pointers.
      
      This fixes the above by branching over the entry code from the
      misaligned fixup code to avoid reloading the original pointer.
      
      Also, because the function entry alignment is wrong in the Thumb mode
      compilation, that fixup code is moved to the end.
      
      While at it, the entry instructions are slightly reworked to help dual
      issue pipelines.
      
      Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
      Tested-by: default avatarAlexander Holler <holler@ahsoftware.de>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      1addd839
    • Ivan Djelic's avatar
      ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations · 5452539f
      Ivan Djelic authored
      
      Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
      assumptions about the implementation of memset and similar functions.
      The current ARM optimized memset code does not return the value of
      its first argument, as is usually expected from standard implementations.
      
      For instance in the following function:
      
      void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
      {
      	memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
      	waiter->magic = waiter;
      	INIT_LIST_HEAD(&waiter->list);
      }
      
      compiled as:
      
      800554d0 <debug_mutex_lock_common>:
      800554d0:       e92d4008        push    {r3, lr}
      800554d4:       e1a00001        mov     r0, r1
      800554d8:       e3a02010        mov     r2, #16 ; 0x10
      800554dc:       e3a01011        mov     r1, #17 ; 0x11
      800554e0:       eb04426e        bl      80165ea0 <memset>
      800554e4:       e1a03000        mov     r3, r0
      800554e8:       e583000c        str     r0, [r3, #12]
      800554ec:       e5830000        str     r0, [r3]
      800554f0:       e5830004        str     r0, [r3, #4]
      800554f4:       e8bd8008        pop     {r3, pc}
      
      GCC assumes memset returns the value of pointer 'waiter' in register r0; causing
      register/memory corruptions.
      
      This patch fixes the return value of the assembly version of memset.
      It adds a 'mov' instruction and merges an additional load+store into
      existing load/store instructions.
      For ease of review, here is a breakdown of the patch into 4 simple steps:
      
      Step 1
      ======
      Perform the following substitutions:
      ip -> r8, then
      r0 -> ip,
      and insert 'mov ip, r0' as the first statement of the function.
      At this point, we have a memset() implementation returning the proper result,
      but corrupting r8 on some paths (the ones that were using ip).
      
      Step 2
      ======
      Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:
      
      save r8:
      -       str     lr, [sp, #-4]!
      +       stmfd   sp!, {r8, lr}
      
      and restore r8 on both exit paths:
      -       ldmeqfd sp!, {pc}               @ Now <64 bytes to go.
      +       ldmeqfd sp!, {r8, pc}           @ Now <64 bytes to go.
      (...)
              tst     r2, #16
              stmneia ip!, {r1, r3, r8, lr}
      -       ldr     lr, [sp], #4
      +       ldmfd   sp!, {r8, lr}
      
      Step 3
      ======
      Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:
      
      save r8:
      -       stmfd   sp!, {r4-r7, lr}
      +       stmfd   sp!, {r4-r8, lr}
      
      and restore r8 on both exit paths:
              bgt     3b
      -       ldmeqfd sp!, {r4-r7, pc}
      +       ldmeqfd sp!, {r4-r8, pc}
      (...)
              tst     r2, #16
              stmneia ip!, {r4-r7}
      -       ldmfd   sp!, {r4-r7, lr}
      +       ldmfd   sp!, {r4-r8, lr}
      
      Step 4
      ======
      Rewrite register list "r4-r7, r8" as "r4-r8".
      
      Signed-off-by: default avatarIvan Djelic <ivan.djelic@parrot.com>
      Reviewed-by: default avatarNicolas Pitre <nico@linaro.org>
      Signed-off-by: default avatarDirk Behme <dirk.behme@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      5452539f
    • Micah Richert's avatar
      add ath6k wifi driver to the kernel · 3834e45f
      Micah Richert authored
      Note that building as =y requires compiling the firmware into the kernel
      or initrd and softmac is not loaded, so always defaults to one address.
      3834e45f
  4. Feb 07, 2014
    • Rob Clark's avatar
      drm/msm: bigger synchronization hammer · 881761f8
      Rob Clark authored
      
      Because we use a list_head in the bo to track it's position in a submit,
      we need to serialize at a higher layer.  Otherwise there are problems
      when multiple contexts are SUBMIT'ing in parallel cmdstreams referencing
      a shared bo.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      881761f8
    • Rob Clark's avatar
      drm/msm: fix deadlock in bo create fail path · 8b8214a4
      Rob Clark authored
      
      We already hold struct_mutex here.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      8b8214a4
    • Rob Clark's avatar
      drm/msm/mdp4: cursor fixes · 21853225
      Rob Clark authored
      
      It seems we need to update all cursor registers from vblank.  This
      appears to be the cause of intermittent underflows when enabling/
      disabling cursor.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      21853225
    • Rob Clark's avatar
      drm/msm/mdp4: pageflip fixes · b68f3f48
      Rob Clark authored
      
      Backport a few fixes found in the course of getting mdp5 working.
      There is a window of time after pageflip is requested, before we
      start scanning out the new fb (ie. while we are waiting for gpu).
      During that time we need to continue holding a reference to the
      still-current scanout fb, to avoid the backing gem bo's from being
      destroyed.
      
      Possibly a common mdp_crtc parent class could be useful to share
      some of this logic between mdp4_crtc and mdp5_crtc.  OTOH, this
      all can be removed from the driver once atomic is in place, as
      plane/crtc updates get deferred until all fb's are ready before
      calling in to .page_flip(), etc.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      b68f3f48
    • Rob Clark's avatar
      drm/msm/mdp5: fix ref leaks in error paths · dc4a6a2e
      Rob Clark authored
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      dc4a6a2e
    • Rob Clark's avatar
      drm/msm: fix inconsequential typo · 55a6c20f
      Rob Clark authored
      
      Small typo I noticed in the mdp4_plane code.. no consequence because
      PIPE_SRC_XY and PIPE_DST_XY have same register layout.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      55a6c20f
    • Rob Clark's avatar
      drm/msm: add a330/apq8x74 · acc17e02
      Rob Clark authored
      
      Add support for adreno 330.  Not too much different, just a few
      differences in initial configuration plus setting OCMEM base.
      Userspace support is already in upstream mesa.
      
      Note that the existing DT code is simply using the bindings from
      downstream android kernel, to simplify porting of this driver to
      existing devices.  These do not constitute any committed/stable
      DT ABI.  The addition of proper DT bindings will be a subsequent
      patch, at which point (as best as possible) I will try to support
      either upstream bindings or what is found in downstream android
      kernel, so that existing device DT files can be used.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      acc17e02
    • Rob Clark's avatar
      drm/msm: add mdp5/apq8x74 · 2dc23de6
      Rob Clark authored
      
      Add support for the new MDP5 display controller block.  The mapping
      between parts of the display controller and KMS is:
      
        plane   -> PIPE{RGBn,VIGn}             \
        crtc    -> LM (layer mixer)            |-> MDP "device"
        encoder -> INTF                        /
        connector -> HDMI/DSI/eDP/etc          --> other device(s)
      
      Unlike MDP4, it appears we can get by with a single encoder, rather
      than needing a different implementation for DTV, DSI, etc.  (Ie. the
      register interface is same, just different bases.)
      
      Also unlike MDP4, all the IRQs for other blocks (HDMI, DSI, etc) are
      routed through MDP.
      
      And finally, MDP5 has this "Shared Memory Pool" (called "SMP"), from
      which blocks need to be allocated to the active pipes based on fetch
      stride.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      2dc23de6
    • Rob Clark's avatar
      drm/msm: add hdmi support for apq8x74/mdp5 · 534273fc
      Rob Clark authored
      
      The HDMI block is basically the same between older SoC's with mdp4
      display controller, and newer ones with mdp5.
      
      So mostly this consists of better abstracting out the different sets of
      regulators, clks, etc.  In particular, for regulators and clks we can
      split it up by what is needed for hot plug detect to work, and what is
      needed to light up the display.
      
      Also, 8x74 has a new phy.. a very simple one, but split out into a
      different mmio space.  And with mdp5, the irq is shared with mdp, so we
      don't directly register our own irq handler.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      534273fc
    • Rob Clark's avatar
      drm/msm: move irq utils to mdp_kms · ea14ae82
      Rob Clark authored
      
      We'll want basically the same thing for mdp5, so refactor it out so it
      can be shared.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      ea14ae82
    • Rob Clark's avatar
      drm/msm: split out msm_kms.h · 613fd5e7
      Rob Clark authored
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      613fd5e7
    • Rob Clark's avatar
      drm/msm: mdp4_format -> mdp_format · 294cee36
      Rob Clark authored
      
      This can be shared between mdp4 and mdp5.  Both use the same set of
      parameters to describe the format to the hw.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      294cee36
    • Rob Clark's avatar
      drm/msm: resync generated headers · 6f9ed087
      Rob Clark authored
      
      resync to latest envytools db, add mdp5 registers
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      6f9ed087
    • Rob Clark's avatar
      drm/msm: move mdp4 -> mdp/mdp4 · 29ae1d94
      Rob Clark authored
      
      There are some little bits and pieces that mdp4 and mdp5 can share, so
      move things around so that we can have both in a common parent
      directory.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      29ae1d94
    • Rob Clark's avatar
      drm/msm: add support for msm8060ab/bstem · a1654b5c
      Rob Clark authored
      
      This adds the necessary configuration for the APQ8060A SoC (dual-core
      krait + a320 gpu) as found on the bstem board.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      a1654b5c
    • Rob Clark's avatar
      drm/msm: add support for non-IOMMU systems · 95513dcb
      Rob Clark authored
      
      Add a VRAM carveout that is used for systems which do not have an IOMMU.
      
      The VRAM carveout uses CMA.  The arch code must setup a CMA pool for the
      device (preferrably in highmem.. a 256m-512m VRAM pool in lowmem is not
      cool).  The user can configure the VRAM pool size using msm.vram module
      param.
      
      Technically, the abstraction of IOMMU behind msm_mmu is not strictly
      needed, but it simplifies the GEM code a bit, and will be useful later
      when I add support for a2xx devices with GPUMMU, so I decided to keep
      this part.
      
      It appears to be possible to configure the GPU to restrict access to
      addresses within the VRAM pool, but this is not done yet.  So for now
      the GPU will refuse to load if there is no sort of mmu.  Once address
      based limits are supported and tested to confirm that we aren't giving
      the GPU access to arbitrary memory, this restriction can be lifted
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      95513dcb
    • Rob Clark's avatar
      drm/msm: fix bus scaling · 37d2615b
      Rob Clark authored
      
      This got a bit broken with original patches when re-arranging things to
      move dependencies on mach-msm inside #ifndef OF.
      
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      37d2615b
Loading