1. 05 6月, 2014 12 次提交
    • S
      drm/i915: Detect if MIPI panel based on VBT and initialize only if present · 3e6bd011
      Shobhit Kumar 提交于
      It seems by default the VBT has MIPI configuration block as well. The
      Generic driver will assume always MIPI if MIPI configuration block is found.
      This is causing probelm when actually there is eDP. Fix this by looking
      into general definition block which will have device configurations. From here
      we can figure out what is the LFP type and initialize MIPI only if MIPI
      is found.
      
      v2: Addressed review comments by Damien
          - Moved PORT definitions to intel_bios.h and renamed as DVO_PORT_MIPIA
          - renamed is_mipi to has_mipi and moved definition as suggested
          - Check has_mipi inside parse_mipi and intel_dsi_init insted of outside
      
      v3: Make has_mipi as a bitfield as suggested
      Signed-off-by: NShobhit Kumar <shobhit.kumar@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: fold in conditions to pack everything neatly below 80 chars.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3e6bd011
    • A
      drm/i915/vlv: Modifying WA 'WaDisableL3Bank2xClockGate for vlv · c98f5062
      Akash Goel 提交于
      For disabling L3 clock gating we need to set bit 25 of MMIO
      register 940c. Earlier this was being done by just writing 1
      into bit 25 and resetting all other bits.
      This patch modifies the routine to read-modify-write of the
      register, so that the values of other bits are not destroyed.
      
      v2: Modifying the comments and the patch commit message (Chris)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NSourab Gupta <sourab.gupta@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Apply checkpatch fixup.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c98f5062
    • S
      drm/i915: Add support for Generic MIPI panel driver · 2ab8b458
      Shobhit Kumar 提交于
      This driver makes use of the generic panel information from the VBT.
      Panel information is classified into two - panel configuration and panel
      power sequence which is unique to each panel. The generic driver uses the
      panel configuration and sequence parsed from VBT block #52 and #53
      
      v2: Address review comments by Jani
          - Move all of the things in driver c file from header
          - Make all functions static
          - Make use of video/mipi_display.c instead of redefining
          - Null checks during sequence execution
      
      v3: Address review comments by Damien
          - Rename the panel driver file as intel_dsi_panel_vbt.c
          - Fix style changes as suggested
          - Correct comments for lp->hs and hs->lp count calculations
          - General updating comments to have more clarity
          - using max() instead of ternary operator
          - Fix names (ui_num, ui_den) while using UI in calculations
          - compute max of lp_to_hs switch and hs_to_lp switch while computing
            hs_lp_switch_count
      Signed-off-by: NShobhit Kumar <shobhit.kumar@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2ab8b458
    • D
      drm/i915: Extract gen8_gt_irq_reset · d6e3cca3
      Daniel Vetter 提交于
      Fallout from an intermediate patch revision that I deemed worth saving.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d6e3cca3
    • D
      drm/i915: Improve irq handling after gpu resets · 78ad455f
      Daniel Vetter 提交于
      Currently we do a full re-init of all interrupts after a gpu hang.
      Which is pretty bad since we don't restore the interrupts we've
      enabled at runtime correctly. Even with that addressed it's rather
      horribly race.
      
      But on g4x and later we only reset the gt and not the entire gpu.
      Which means we only need to reset the GT interrupt bits. Which has the
      nice benefit that vblank waits, pipe CRC interrupts and everything
      else display related just keeps on working.
      
      The downside is that gt interrupt handling (i.e. ring->get/put_irq) is
      still racy. But as long as the gpu hang reliably wakes all waters and
      we have a short time where the refcount drops to 0 we'll recover. So
      not that bad really.
      
      v2: Ville noticed that GTIMR and PMIMR don't get cleared, only the
      subordinate per-ring registers. So let's rip out all the interrupt dancing.
      The FIXME comment is still required though since the ring irq handling
      happens at the per-ring interrupt mask registers, too.
      
      Testcase: igt/kms_flip/vblank-vs-hang
      Testcase: igt/kms_pipe_crc_basic/hang-*
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      78ad455f
    • D
      drm/i915: Inline ilk/gen8_irq_reset · 723761b8
      Daniel Vetter 提交于
      No point in having this indirection.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      723761b8
    • D
      drm/i915: Disable gpu reset on i965g/gm · 85ab3998
      Daniel Vetter 提交于
      Ville figured out that it needs a full display reset since apparently
      a lot more goes down than just the GT. Until that's address it's
      better to just diable gpu reset.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      85ab3998
    • D
      drm/i915: Fix up fifo underrun tracking, take N · 2ae2a50c
      Daniel Vetter 提交于
      So apparently this is tricky.
      
      We need to consider:
      - We start out with all the hw enabling bits disabled, both the
        individual fifo underrun interrupts and the shared display error
        interrupts masked. Otherwise if the bios config is broken we'll blow
        up with a NULL deref in our interrupt handler since the crtc
        structures aren't set up yet at driver load time.
      - On gmch we need to mask fifo underruns on the sw side, so always
        need to set that in sanitize_crtc for those platforms.
      - On other platforms we try to set the sw tracking so that it reflects
        the real state. But since a few platforms have shared bits we must
        _not_ disable fifo underrun reporting. Otherwise we'll never enable
        the shared error interrupt.
      
      This is the state before out patch, but unfortunately this is not good
      enough. But after a suspend resume operation this is broken:
      1. We don't enable the hw interrupts since the same code runs on
      resume as on driver load.
      2. The fifo underrun state adjustments we do in sanitize_crtc doesn't
      fire on resume since (except for hilarious firmware) all pipes are off
      at that point. But they also don't hurt since the subsequent crtc
      enabling due to force_restore will enable fifo underruns.
      
      Which means when we enable fifo underrun reporting we notice that the
      per-crtc state is already correct and short-circuit everthing out. And
      the interrupt doesn't get enabled.
      
      A similar problem would happen if the bios doesn't light up anything
      when the driver loads. Which is exactly what happens when we reload
      the driver since our unload functions disables all outputs.
      
      Now we can't just rip out the short-circuit logic and unconditionally
      update the fifo underrun reporting interrupt masking: We have some
      checks for shared error interrupts to catch issues that happened when
      the shared error interrupt was disabled.
      
      The right fix is to push down this logic so that we can always update
      the hardware state, but only check for missed fifo underruns on a real
      enabled->disabled transition and ignore them when we're already
      disabled.
      
      On platforms with shared error interrupt the pipe CRC interrupts are
      grouped together with the fifo underrun reporting this fixes pipe CRC
      support after suspend and driver reloads.
      
      Testcase: igt/kms_pipe_crc_basic/suspend-*
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2ae2a50c
    • D
      drm/i915: Add fifo underrun reporting state to debugfs · cace841c
      Daniel Vetter 提交于
      On platforms with shared interrupt enable bits (which are shared even
      with the pipe CRC logic) there's some tricky corner cases. Add
      information to make debugging those easier.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cace841c
    • R
      drm: add drm_fb_helper_restore_fbdev_mode_unlocked() · 5ea1f752
      Rob Clark 提交于
      All drm_fb_helper_restore_fbdev_mode() call sites, save one, do the same
      locking.  Simplify this into drm_fb_helper_restore_fbdev_mode_unlocked().
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5ea1f752
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
    • D
      drm/dp: add a hw mutex around the transfer functions. (v2) · 4f71d0cb
      Dave Airlie 提交于
      This should avoid races between connector probing and HPD
      irqs in the future, currently mode_config.mutex blocks this
      possibility.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4f71d0cb
  2. 04 6月, 2014 21 次提交
  3. 03 6月, 2014 6 次提交
  4. 02 6月, 2014 1 次提交