1. 23 7月, 2014 10 次提交
  2. 11 7月, 2014 2 次提交
  3. 09 7月, 2014 1 次提交
    • M
      drm/i915: Make use of intel_fb_obj() (v2) · 2ff8fde1
      Matt Roper 提交于
      This should hopefully simplify the display code slightly and also
      solves at least one mistake in intel_pipe_set_base() where
      to_intel_framebuffer(fb)->obj is referenced during local variable
      initialization, before 'if (!fb)' gets checked.
      
      Potential uses of this macro were identified via the following
      Coccinelle patch:
      
              @@
              expression E;
              @@
              * to_intel_framebuffer(E)->obj
      
              @@
              expression E;
              identifier I;
              @@
                I = to_intel_framebuffer(E);
                ...
              * I->obj
      
      v2: Rewrite some NULL tests in terms of the obj rather than the fb.
          Also add a WARN() if trying to pageflip with a disabled primary
          plane.  [Suggested by Chris Wilson]
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2ff8fde1
  4. 08 7月, 2014 1 次提交
  5. 07 7月, 2014 1 次提交
    • D
      drm/i915: rework digital port IRQ handling (v2) · 13cf5504
      Dave Airlie 提交于
      The digital ports from Ironlake and up have the ability to distinguish
      between long and short HPD pulses. Displayport 1.1 only uses the short
      form to request link retraining usually, so we haven't really needed
      support for it until now.
      
      However with DP 1.2 MST we need to handle the short irqs on their
      own outside the modesetting locking the long hpd's involve. This
      patch adds the framework to distinguish between short/long to the
      current code base, to lay the basis for future DP 1.2 MST work.
      
      This should mean we get better bisectability in case of regression
      due to the new irq handling.
      
      v2: add GM45 support (untested, due to lack of hw)
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NTodd Previte <tprevite@gmail.com>
      [danvet: Fix conflicts in i915_irq.c with Oscar Mateo's irq handling
      race fixes and a trivial one in intel_drv.h with the psr code.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      13cf5504
  6. 19 6月, 2014 3 次提交
  7. 17 6月, 2014 3 次提交
  8. 14 6月, 2014 1 次提交
    • R
      drm/i915: Force PSR exit by inactivating it. · 7c8f8a70
      Rodrigo Vivi 提交于
      The perfect solution for psr_exit is the hardware tracking the changes and
      doing the psr exit by itself. This scenario works for HSW and BDW with some
      environments like Gnome and Wayland.
      
      However there are many other scenarios that this isn't true. Mainly one right
      now is KDE users on HSW and BDW with PSR on. User would miss many screen
      updates. For instances any key typed could be seen only when mouse cursor is
      moved. So this patch introduces the ability of trigger PSR exit on kernel side
      on some common cases that.
      
      Most of the cases are coverred by psr_exit at set_domain. The remaining cases
      are coverred by triggering it at set_domain, busy_ioctl, sw_finish and
      mark_busy.
      
      The downside here might be reducing the residency time on the cases this
      already work very wall like Gnome environment. But so far let's get focused
      on fixinge issues sio PSR couild be used for everybody and we could even
      get it enabled by default. Later we can add some alternatives to choose the
      level of PSR efficiency over boot flag of even over crtc property.
      
      v2: remove exit from connector_dpms. Daniel pointed this is the wrong way and
      also this isn't needed for BDW and HSW anyway.
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NVijay Purushothaman <vijay.a.purushothaman@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7c8f8a70
  9. 13 6月, 2014 6 次提交
  10. 11 6月, 2014 3 次提交
  11. 05 6月, 2014 2 次提交
  12. 04 6月, 2014 3 次提交
    • D
      drm: Split connection_mutex out of mode_config.mutex (v3) · 6e9f798d
      Daniel Vetter 提交于
      After the split-out of crtc locks from the big mode_config.mutex
      there's still two major areas it protects:
      - Various connector probe states, like connector->status, EDID
        properties, probed mode lists and similar information.
      - The links from connector->encoder and encoder->crtc and other
        modeset-relevant connector state (e.g. properties which control the
        panel fitter).
      
      The later is used by modeset operations. But they don't really care
      about the former since it's allowed to e.g. enable a disconnected VGA
      output or with a mode not in the probed list.
      
      Thus far this hasn't been a problem, but for the atomic modeset
      conversion Rob Clark needs to convert all modeset relevant locks into
      w/w locks. This is required because the order of acquisition is
      determined by how userspace supplies the atomic modeset data. This has
      run into troubles in the detect path since the i915 load detect code
      needs _both_ protections offered by the mode_config.mutex: It updates
      probe state and it needs to change the modeset configuration to enable
      the temporary load detect pipe.
      
      The big deal here is that for the probe/detect users of this lock a
      plain mutex fits best, but for atomic modesets we really want a w/w
      mutex. To fix this lets split out a new connection_mutex lock for the
      modeset relevant parts.
      
      For simplicity I've decided to only add one additional lock for all
      connector/encoder links and modeset configuration states. We have
      piles of different modeset objects in addition to those (like bridges
      or panels), so adding per-object locks would be much more effort.
      
      Also, we're guaranteed (at least for now) to do a full modeset if we
      need to acquire this lock. Which means that fine-grained locking is
      fairly irrelevant compared to the amount of time the full modeset will
      take.
      
      I've done a full audit, and there's just a few things that justify
      special focus:
      - Locking in drm_sysfs.c is almost completely absent. We should
        sprinkle mode_config.connection_mutex over this file a bit, but
        since it already lacks mode_config.mutex this patch wont make the
        situation any worse. This is material for a follow-up patch.
      
      - omap has a omap_framebuffer_flush function which walks the
        connector->encoder->crtc links and is called from many contexts.
        Some look like they don't acquire mode_config.mutex, so this is
        already racy. Again fixing this is material for a separate patch.
      
      - The radeon hot_plug function to retrain DP links looks at
        connector->dpms. Currently this happens without any locking, so is
        already racy. I think radeon_hotplug_work_func should gain
        mutex_lock/unlock calls for the mode_config.connection_mutex.
      
      - Same applies to i915's intel_dp_hot_plug. But again, this is already
        racy.
      
      - i915 load_detect code needs to acquire this lock. Which means the
        w/w dance due to Rob's work will be nicely contained to _just_ this
        function.
      
      I've added fixme comments everywhere where it looks suspicious but in
      the sysfs code. After a quick irc discussion with Dave Airlie it
      sounds like the lack of locking in there is due to sysfs cleanup fun
      at module unload.
      
      v1: original (only compile tested)
      
      v2: missing mutex_init(), etc (from Rob Clark)
      
      v3: i915 needs more care in the conversion:
      - Protect the edp pp logic with the connection_mutex.
      - Use connection_mutex in the backlight code due to
        get_pipe_from_connector.
      - Use drm_modeset_lock_all in suspend/resume paths.
      - Update lock checks in the overlay code.
      
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      6e9f798d
    • J
      drm/i915: replace drm_get_encoder_name() with direct name field use · 8e329a03
      Jani Nikula 提交于
      Generated using semantic patches:
      
      @@
      expression E;
      @@
      
      - drm_get_encoder_name(&E)
      + E.name
      
      @@
      expression E;
      @@
      
      - drm_get_encoder_name(E)
      + E->name
      
      v2: Turn drm_get_encoder_name(&E) into E.name instead of &(E)->name.
      Acked-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      8e329a03
    • J
      drm/i915: replace drm_get_connector_name() with direct name field use · c23cc417
      Jani Nikula 提交于
      Generated using semantic patches:
      
      @@
      expression E;
      @@
      
      - drm_get_connector_name(&E)
      + E.name
      
      @@
      expression E;
      @@
      
      - drm_get_connector_name(E)
      + E->name
      
      v2: Turn drm_get_connector_name(&E) into E.name instead of &(E)->name.
      Acked-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c23cc417
  13. 21 5月, 2014 1 次提交
    • D
      drm/i915: Drop now misleading DDI comment from dp_link_down · bc76e320
      Daniel Vetter 提交于
      Since
      
      commit 2e82a720
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Fri Jan 17 15:46:43 2014 +0200
      
          drm/i915: don't disable DP port after a failed link training
      
      and
      
      commit 5d6a1116
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Thu Jan 16 18:35:57 2014 +0200
      
          drm/i915: don't disable the DP port if the link is lost
      
      we no longer call intel_dp_link_down from generic DP code, but only
      from the !HAS_DDI dp encoder functions. hsw/bdw have their own encoder
      disabling callback in intel_ddi.c.
      
      Hence the early return is no longer needed and the big comment just
      confusing, so let's rip it out. To ensure what we don't accidentally
      use this again on ddi encoders add a WARN_ON instead.
      
      Spotted while reading through intel_dp.c
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc76e320
  14. 20 5月, 2014 3 次提交