1. 08 8月, 2014 7 次提交
    • V
      drm/i915: Kill intel_crtc->vbl_wait · 210871b6
      Ville Syrjälä 提交于
      Share the waitqueue that drm_irq uses when performing the vblank evade
      trick for atomic pipe updates.
      
      v2: Keep intel_pipe_handle_vblank() (Chris)
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      210871b6
    • V
      drm: Add drm_crtc_vblank_waitqueue() · 020178a1
      Ville Syrjälä 提交于
      Add a small static inline helper to grab the vblank wait queue based on
      the drm_crtc.
      
      This is useful for drivers to do internal vblank waits using
      wait_event() & co.
      
      v2: Pimp commit message (Daniel)
          Add kernel doc (Daniel)
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      020178a1
    • V
      drm/i915: State readout and cross-checking for dp_m2_n2 · b95af8be
      Vandana Kannan 提交于
      Adding relevant read out comparison code, in check_crtc_state, for the new
      member of crtc_config, dp_m2_n2, which was introduced to store link_m_n
      values for a DP downclock mode (if available). Suggested by Daniel.
      
      v2: Changed patch title.
      Daniel's review comments incorporated.
      Added relevant state readout code for M2_N2. dp_m2_n2 comparison to be done
      only when high RR is not in use (This is because alternate m_n register
      programming will be done only when low RR is being used).
      
      v3: Modified call to get_m2_n2 which had dp_m_n as param by mistake.
      Compare dp_m_n and dp_m2_n2 for gen 7 and below. compare the structures
      based on DRRS state for gen 8 and above.
      Save and restore M2 N2 registers for gen 7 and below
      
      v4: For Gen>=8, check M_N registers against dp_m_n and dp_m2_n2 as there is
      only one set of M_N registers
      
      v5: Removed the chunk which saves and restores M2_N2 registers. Modified
      get_m_n() to get M2_N2 registers as well. Modified the macro which compares
      hw.dp_m_n against sw.dp_m2_n2/sw.dp_m_n for gen > 8.
      
      v6: Added check to compare dp_m2_n2 only when DRRS is enabled
      
      v7: Modified drrs check to use has_drrs
      
      v8: Add has_drrs check before reading M2_N2 registers
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b95af8be
    • V
      drm/i915: Set M2_N2 registers during mode set · f769cd24
      Vandana Kannan 提交于
      For Gen < 8, set M2_N2 registers on every mode set. This is required to make
      sure M2_N2 registers are set during boot, resume from sleep for cross-
      checking the state. The register is set only if DRRS is supported.
      
      v2: Patch rebased
      
      v3: Daniel's review comments
      	- Removed HAS_DRRS(dev) and added bool has_drrs to pipe_config to
      	track drrs support
      
      v4: Jesse's review comments
      	- Made changes to set m2_n2 in intel_dp_set_m_n()
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f769cd24
    • R
      Revert "drm/i915: Enable semaphores on BDW" · be71eabe
      Rodrigo Vivi 提交于
      This reverts commit 521e62e4.
      
      Although POST_SYNC brought a bit of stability to Semaphores on BDW
      it didn't solved all issues and some hungs can still occour when
      semaphores are enabled on BDW. Also some sloweness can be found on some
      igt tests, althoguth it apparently doesn't affect real workloads.
      
      Besides that, no real performance gain was found on our tests with different
      and even multiple workloads.
      
      Let's disable it again for now. At least until we are sure it is safe
      to re-enable it.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      be71eabe
    • J
      drm/i915: read HEAD register back in init_ring_common() to enforce ordering · ece4a17d
      Jiri Kosina 提交于
      Withtout this, ring initialization fails reliabily during resume with
      
      	[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head ffffff8804 tail 00000000 start 000e4000
      
      This is not a complete fix, but it is verified to make the ring
      initialization failures during resume much less likely.
      
      We were not able to root-cause this bug (likely HW-specific to Gen4 chips)
      yet. This is therefore used as a ducttape before problem is fully
      understood and proper fix created, so that people don't suffer from
      completely unusable systems in the meantime.
      
      The discussion and debugging is happening at
      
      	https://bugs.freedesktop.org/show_bug.cgi?id=76554Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ece4a17d
    • R
      drm/i915: Fix crash when failing to parse MIPI VBT · ed3b6679
      Rafael Barbalho 提交于
      This particular nasty presented itself while trying to register the
      intelfb device (intel_fbdev.c). During the process of registering the device
      the driver will disable the crtc via i9xx_crtc_disable. These will
      also disable the panel using the generic mipi panel functions in
      dsi_mod_vbt_generic.c. The stale MIPI generic data sequence pointers would
      cause a crash within those functions. However, all of this is happening
      while console_lock is held from do_register_framebuffer inside fbcon.c. Which
      means that you got kernel log and just the device appearing to reboot/hang for
      no apparent reason.
      
      The fault started from the FB_EVENT_FB_REGISTERED event using the
      fb_notifier_call_chain call in fbcon.c.
      
      This regression has been introduced in
      
      commit d3b542fc
      Author: Shobhit Kumar <shobhit.kumar@intel.com>
      Date:   Mon Apr 14 11:00:34 2014 +0530
      
          drm/i915: Add parsing support for new MIPI blocks in VBT
      
      Cc: Shobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: NRafael Barbalho <rafael.barbalho@intel.com>
      Reviewed-by: NShobhit Kumar <shobhit.kumar@intel.com>
      [danvet: Add regression citation.]
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ed3b6679
  2. 07 8月, 2014 17 次提交
  3. 05 8月, 2014 12 次提交
    • D
      drm/i915: Update DRIVER_DATE to 20140725 · 72b79c9b
      Daniel Vetter 提交于
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      72b79c9b
    • T
      drm/ttm: Pass GFP flags in order to avoid deadlock. · a91576d7
      Tetsuo Handa 提交于
      Commit 7dc19d5a "drivers: convert shrinkers to new count/scan API" added
      deadlock warnings that ttm_page_pool_free() and ttm_dma_page_pool_free()
      are currently doing GFP_KERNEL allocation.
      
      But these functions did not get updated to receive gfp_t argument.
      This patch explicitly passes sc->gfp_mask or GFP_KERNEL to these functions,
      and removes the deadlock warning.
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: stable <stable@kernel.org> [2.6.35+]
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a91576d7
    • T
      drm/ttm: Fix possible stack overflow by recursive shrinker calls. · 71336e01
      Tetsuo Handa 提交于
      While ttm_dma_pool_shrink_scan() tries to take mutex before doing GFP_KERNEL
      allocation, ttm_pool_shrink_scan() does not do it. This can result in stack
      overflow if kmalloc() in ttm_page_pool_free() triggered recursion due to
      memory pressure.
      
        shrink_slab()
        => ttm_pool_shrink_scan()
           => ttm_page_pool_free()
              => kmalloc(GFP_KERNEL)
                 => shrink_slab()
                    => ttm_pool_shrink_scan()
                       => ttm_page_pool_free()
                          => kmalloc(GFP_KERNEL)
      
      Change ttm_pool_shrink_scan() to do like ttm_dma_pool_shrink_scan() does.
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: stable <stable@kernel.org> [2.6.35+]
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      71336e01
    • T
      drm/ttm: Use mutex_trylock() to avoid deadlock inside shrinker functions. · 22e71691
      Tetsuo Handa 提交于
      I can observe that RHEL7 environment stalls with 100% CPU usage when a
      certain type of memory pressure is given. While the shrinker functions
      are called by shrink_slab() before the OOM killer is triggered, the stall
      lasts for many minutes.
      
      One of reasons of this stall is that
      ttm_dma_pool_shrink_count()/ttm_dma_pool_shrink_scan() are called and
      are blocked at mutex_lock(&_manager->lock). GFP_KERNEL allocation with
      _manager->lock held causes someone (including kswapd) to deadlock when
      these functions are called due to memory pressure. This patch changes
      "mutex_lock();" to "if (!mutex_trylock()) return ...;" in order to
      avoid deadlock.
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: stable <stable@kernel.org> [3.3+]
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      22e71691
    • T
      drm/ttm: Choose a pool to shrink correctly in ttm_dma_pool_shrink_scan(). · 46c2df68
      Tetsuo Handa 提交于
      We can use "unsigned int" instead of "atomic_t" by updating start_pool
      variable under _manager->lock. This patch will make it possible to avoid
      skipping when choosing a pool to shrink in round-robin style, after next
      patch changes mutex_lock(_manager->lock) to !mutex_trylock(_manager->lork).
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: stable <stable@kernel.org> [3.3+]
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      46c2df68
    • T
      drm/ttm: Fix possible division by 0 in ttm_dma_pool_shrink_scan(). · 11e504cc
      Tetsuo Handa 提交于
      list_empty(&_manager->pools) being false before taking _manager->lock
      does not guarantee that _manager->npools != 0 after taking _manager->lock
      because _manager->npools is updated under _manager->lock.
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: stable <stable@kernel.org> [3.3+]
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      11e504cc
    • D
      drm/tda998x: update for new drm connector APIs. · 74cd62ea
      Dave Airlie 提交于
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      74cd62ea
    • D
      drm/sti: fix warning in build. · 8bb652eb
      Dave Airlie 提交于
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8bb652eb
    • D
      Merge branch 'drm_kms_for_next-v8' of... · 96b1b971
      Dave Airlie 提交于
      Merge branch 'drm_kms_for_next-v8' of git://git.linaro.org/people/benjamin.gaignard/kernel into drm-next
      
      This series of patches add the support of DRM/KMS drivers for STMicroelectronics
      chipsets stih416 and stih407.
      
      Hardware is split in two main blocks: Compositor and TVout. Each of them
      includes specific hardware IPs and the display timing are controlled by a specific
      Video Timing Generator hardware IP (VTG).
      
      Compositor is made of the follow hardware IPs:
       - GDP (Generic Display Pipeline) which is an entry point for graphic (RGB)
         buffers
       - VDP (Video Diplay Pipeline) which is an entry point for video (YUV) buffers
       - HQVDP (High Quality Video Display Processor) that supports scaling,
         deinterlacing and some miscellaneous image quality improvements.
         It fetches the Video decoded buffers from memory, processes them and pushes
         them to the Compositor through a HW dedicated bus.
       - Mixer is responsible of mixing all the entries depending of their
         respective z-order and layout
      
      TVout is divided in 3 parts:
       - HDMI to generate HDMI signals, depending of chipset version HDMI phy can
         change.
       - HDA to generate signals for HD analog TV
       - VIP to control/switch data path coming from Compositor
      
      On stih416 compositor and Tvout are on different dies so a Video Trafic Advance
      inter-die Communication mechanism (VTAC) is needed.
      
      +---------------------------------------------+   +----------------------------------------+
      | +-------------------------------+   +----+  |   |  +----+   +--------------------------+ |
      | |                               |   |    |  |   |  |    |   |  +---------+     +----+  | |
      | | +----+              +------+  |   |    |  |   |  |    |   |  | VIP     |---->|HDMI|  | |
      | | |GPD +------------->|      |  |   |    |  |   |  |    |   |  |         |     +----+  | |
      | | +----+              |Mixer |--|-->|    |  |   |  |    |---|->| switcher|             | |
      | |                     |      |  |   |    |  |   |  |    |   |  |         |     +----+  | |
      | |                     |      |  |   |    |  |   |  |    |   |  |         |---->|HDA |  | |
      | |                     +------+  |   |VTAC|========>|VTAC|   |  +---------+     +----+  | |
      | |                               |   |    |  |   |  |    |   |                          | |
      | |         Compositor            |   |    |  |   |  |    |   |           TVout          | |
      | +-------------------------------+   |    |  |   |  |    |   +--------------------------+ |
      |                      ^              |    |  |   |  |    |             ^                  |
      |                      |              |    |  |   |  |    |             |                  |
      |               +--------------+      |    |  |   |  |    |      +-------------+           |
      |               | VTG (master) |----->|    |  |   |  |    |----->| VTG (slave) |           |
      |               +--------------+      +----+  |   |  +----+      +-------------+           |
      |Digital die                                  |   |                              Analog Die|
      +---------------------------------------------+   +----------------------------------------+
      
      On stih407 Compositor and Tvout are on the same die
      
      +-----------------------------------------------------------------+
      | +-------------------------------+  +--------------------------+ |
      | |                               |  |  +---------+     +----+  | |
      | | +----+              +------+  |  |  | VIP     |---->|HDMI|  | |
      | | |GPD +------------->|      |  |  |  |         |     +----+  | |
      | | +----+              |Mixer |--|--|->| switcher|             | |
      | | +----+   +-----+    |      |  |  |  |         |     +----+  | |
      | | |VDP +-->+HQVDP+--->|      |  |  |  |         |---->|HDA |  | |
      | | +----+   +-----+    +------+  |  |  +---------+     +----+  | |
      | |                               |  |                          | |
      | |         Compositor            |  |           TVout          | |
      | +-------------------------------+  +--------------------------+ |
      |                              ^        ^                         |
      |                              |        |                         |
      |                           +--------------+                      |
      |                           |     VTG      |                      |
      |                           +--------------+                      |
      |Digital die                                                      |
      +-----------------------------------------------------------------+
      
      In addition of the drivers for the IPs listed before a thin I2C driver (hdmiddc) is used
      by HDMI driver to retrieve EDID for monitor.
      
      To unify interfaces of GDP and VDP we create a "layer" interface called by
      compositor to control both GPD and VDP.
      
      Hardware have memory contraints (alignment, contiguous) so we use CMA drm helpers functions
      to allocate frame buffer.
      
      File naming convention is:
       - sti_* for IPs drivers
       - sti_drm_* for drm functions implementation.
      
      * 'drm_kms_for_next-v8' of git://git.linaro.org/people/benjamin.gaignard/kernel:
        drm: sti: Add DRM driver itself
        drm: sti: add Compositor
        drm: sti: add Mixer
        drm: sti: add VID layer
        drm: sti: add GDP layer
        drm: sti: add TVOut driver
        drm: sti: add HDA driver
        drm: sti: add HDMI driver
        drm: sti: add VTAC drivers
        drm: sti: add VTG driver
        drm: sti: add bindings for DRM driver
      96b1b971
    • D
      Merge branch 'tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-next · 920f9464
      Dave Airlie 提交于
      This builds upon the previous set of fixes which were pulled on 6th July.
      Included in this set are:
      - an update from Jean-Francois to add the missing reg documentation entry
        to the device tree documentation.
      - conversion of the tda998x driver to the component helpers.
      
      * 'tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox:
        drm/i2c: tda998x: add component support
        drm/i2c: tda998x: allow re-use of tda998x support code
        drm/i2c: tda998x: fix lack of required reg in DT documentation
      
      Conflicts:
      	drivers/gpu/drm/i2c/tda998x_drv.c
      920f9464
    • D
      Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next · eceb55a0
      Dave Airlie 提交于
      This time around we have a mix of new hw enablement (mdp5 v1.3 /
      apq8084), plus devicetree and various upstream changes (mostly
      adapting to CCF vs downstream clk driver differences) for mdp4 /
      apq8064.  With these drm/msm patches plus a few other small patchsets
      (from linaro qcom integration branch.. mostly stuff queued up for
      3.17) we have the inforce ifc6410 board working, with gpu.  Much nicer
      to work with than ancient vendor android branch :-)
      
      * 'msm-next' of git://people.freedesktop.org/~robclark/linux:
        drm/msm/hdmi: fix HDMI_MUX_EN gpio request typo
        drm/msm/hdmi: enable lpm-mux if it is present
        drm/msm/mdp5: add support for MDP5 v1.3
        drm/msm: fix potential deadlock in gpu init
        drm/msm: use upstream iommu
        drm/msm: no mmu is only error if not using vram carveout
        drm/msm: fix BUG_ON() in error cleanup path
        drm/msm/mdp4: add mdp axi clk
        drm/msm: hdmi phy 8960 phy pll
        drm/msm: update generated headers
        drm/msm: DT support for 8960/8064 (v3)
        drm/msm: Implement msm drm fb_mmap callback function
        drm/msm: activate iommu support
        drm/msm: fix double struct_mutex acquire
      eceb55a0
    • D
      Merge tag 'v3.16' into drm-next · 5d42f82a
      Dave Airlie 提交于
      Linux 3.16
      
      backmerge requested by i915, nouveau and radeon authors
      
      Conflicts:
      	drivers/gpu/drm/i915/i915_gem_render_state.c
      	drivers/gpu/drm/i915/intel_drv.h
      5d42f82a
  4. 04 8月, 2014 4 次提交