1. 05 5月, 2014 14 次提交
  2. 25 4月, 2014 2 次提交
  3. 24 4月, 2014 2 次提交
  4. 23 4月, 2014 4 次提交
    • D
      drm: pass the irq explicitly to drm_irq_install · bb0f1b5c
      Daniel Vetter 提交于
      Unfortunately this requires a drm-wide change, and I didn't see a sane
      way around that. Luckily it's fairly simple, we just need to inline
      the respective get_irq implementation from either drm_pci.c or
      drm_platform.c.
      
      With that we can now also remove drm_dev_to_irq from drm_irq.c.
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bb0f1b5c
    • D
      drm: Rip out totally bogus vga_switcheroo->can_switch locking · fc8fd40e
      Daniel Vetter 提交于
      So I just wanted to add a new field to struct drm_device and
      accidentally stumbled over something. According to comments
      dev->open_count is protected by dev->count_lock, but that's totally
      not the case. It's protected by drm_global_mutex.
      
      Unfortunately the vga switcheroo callbacks took this comment at face
      value. The problem is that we can't just take the drm_global_mutex
      because:
      - It would lead to a locking inversion with the driver load/unload
        paths.
      - It wouldn't actually protect anything, for that we'd need to wrap
        the entire vga switcheroo code in the drm_global_mutex. And I'm not
        sure whether that would actually solve anything.
      
      What we probably want is a try_to_grab_switcheroo reference kind of
      thing which is used in the driver's ->open callback. Then we could
      move all that ->can_switch madness into the vga switcheroo core where
      it really belongs.
      
      But since that would amount to real work take the easy way out and
      just add a comment. It's definitely not going to make anything worse
      since doing switcheroo state changes while restarting X just isn't
      recommended. Even though the delayed switching code does exactly that.
      
      v2:
      - Simplify the ->can_switch implementations more (Thierry)
      - Fix comment about the dev->open_count locking (Thierry)
      
      Cc: Thierry Reding <treding@nvidia.com>
      Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (v1)
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fc8fd40e
    • P
      drm/i915: get power domain in case the BIOS enabled eDP VDD · 63635217
      Paulo Zanoni 提交于
      If I unplug the eDP monitor, the BIOS of my machine will enable the
      VDD bit, then when the driver loads it will think VDD is enabled. It
      will detect that the eDP is not enabled and return false from
      intel_edp_init_connector. This will trigger a call to
      edp_panel_vdd_off_sync(), which trigger a WARN saying that the
      refcount of the power domain is less than zero.
      
      The problem happens because the driver gets a refcount whenever it
      enables the VDD bit, and puts the refcount whenever it disables the
      VDD bit. But on this case, the BIOS enabled VDD, so all we do is to
      call put() without calling get() first, so the code added is there to
      make sure we always have the get() in case the BIOS enabled the bit.
      
      This regression was introduced in
      commit e9cb81a2
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Thu Nov 21 13:47:23 2013 -0200
      
          drm/i915: get a runtime PM reference when the panel VDD is on
      
      v2: - Rebase
      
      Tested-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org (v3.13+)
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      63635217
    • D
      drm/i915: Don't check gmch state on inherited configs · 9953599b
      Daniel Vetter 提交于
      ... our current modeset code isn't good enough yet to handle this. The
      scenario is:
      
      1. BIOS sets up a cloned config with lvds+external screen on the same
      pipe, e.g. pipe B.
      
      2. We read out that state for pipe B and assign the gmch_pfit state to
      it.
      
      3. The initial modeset switches the lvds to pipe A but due to lack of
      atomic modeset we don't recompute the config of pipe B.
      
      -> both pipes now claim (in the sw pipe config structure) to use the
      gmch_pfit, which just won't work.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74081Tested-by: Nmax <manikulin@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      9953599b
  5. 22 4月, 2014 2 次提交
    • V
      drm/i915: Allow user modes to exceed DVI 165MHz limit · 40478455
      Ville Syrjälä 提交于
      In commit
       commit 6375b768
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Mon Mar 3 11:33:36 2014 +0200
      
          drm/i915: Reject >165MHz modes w/ DVI monitors
      
      the driver started to filter out display modes which exceed the
      single-link DVI 165Mz dotclock limits when the monitor doesn't report
      itself as being HDMI compliant. The intent was to filter out all
      EDID derived modes that require dual-link DVI to operate since we
      don't support dual-link.
      
      However the patch went a bit too far and also causes the driver to reject
      such modes even when specified by the user. Normally we don't check the
      sink limitations when setting a mode from the user. This allows the user
      to specify any mode whether the sink reports to support it or not. This
      can be useful since often the sinks support more modes than they report
      in the EDID.
      
      So relax the checks a bit, and apply the single-link DVI dotclock limit
      only when filtering the mode list, and ignore the limit when setting
      a user specified mode.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=72961Tested-by: NNicholas Vinson <nvinson@comcast.net>
      Cc: stable@vger.kernel.org [3.14]
      Reviewed-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      40478455
    • D
      drm/irq: remove cargo-culted locking from irq_install/uninstall · e090c53b
      Daniel Vetter 提交于
      The dev->struct_mutex locking in drm_irq.c only protects
      dev->irq_enabled. Which isn't really much at all and only prevents
      especially nasty ums userspace from concurrently installing the
      interrupt handling a few times. Or at least trying.
      
      There are tons of unlocked readers of dev->irqs_enabled in the vblank
      wait code (and by extension also in the pageflip code since that uses
      the same vblank timestamp engine).
      
      Real modesetting drivers should ensure that nothing can go haywire
      with a sane setup teardown sequence. So we only really need this for
      the drm_control ioctl, everywhere else this will just paper over
      nastiness.
      
      Note that drm/i915 is a bit specially due to the gem+ums combination.
      So there we also need to properly protect the entervt and leavevt
      ioctls. But it's definitely saner to do everything in one go than to
      drop the lock in-between.
      
      Finally there's the gpu reset code in drm/i915. That one's just race
      (concurrent userspace calls to for vblank waits of pageflips could
      spuriously fail). So wrap it up in with a nice comment since fixing
      this is more involved.
      
      v2: Rebase and fix commit message (Thierry)
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e090c53b
  6. 17 4月, 2014 1 次提交
  7. 16 4月, 2014 4 次提交
  8. 14 4月, 2014 1 次提交
  9. 13 4月, 2014 1 次提交
  10. 11 4月, 2014 4 次提交
  11. 10 4月, 2014 5 次提交
    • P
      drm/i915: Add support for DRRS to switch RR · 439d7ac0
      Pradeep Bhat 提交于
      This patch computes and stored 2nd M/N/TU for switching to different
      refresh rate dynamically. PIPECONF_EDP_RR_MODE_SWITCH bit helps toggle
      between alternate refresh rates programmed in 2nd M/N/TU registers.
      
      v2: Daniel's review comments
      Computing M2/N2 in compute_config and storing it in crtc_config
      
      v3: Modified reference to edp_downclock and edp_downclock_avail based on the
      changes made to move them from dev_private to intel_panel.
      
      v4: Modified references to is_drrs_supported based on the changes made to
      rename it to drrs_support.
      
      v5: Jani's review comments
      Removed superfluous return statements. Changed support for Gen 7 and above.
      Corrected indentation. Re-structured the code which finds crtc and connector
      from encoder. Changed some logs to be less verbose.
      
      v6: Modifying i915_drrs to include only intel connector as intel_dp can be
      derived from intel connector when required.
      
      v7: As per internal review comments, acquiring mutex just before accessing
      drrs RR. As per Chris's review comments, added documentation about the use
      of locking in the function.
      
      v8: Incorporated Jani's review comments.
      Removed reference to edp_downclock.
      
      v9: Jani's review comments. Modified comment in set_drrs. Changed index to
      type edp_drrs_refresh_rate_type. Check if PSR is enabled before setting
      registers fo DRRS.
      Signed-off-by: NPradeep Bhat <pradeep.bhat@intel.com>
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      439d7ac0
    • P
      drm/i915: Parse EDID probed modes for DRRS support · 4f9db5b5
      Pradeep Bhat 提交于
      This patch and finds out the lowest refresh rate supported for the resolution
      same as the fixed_mode.
      It also checks the VBT fields to see if panel supports seamless DRRS or not.
      Based on above data it marks whether eDP panel supports seamless DRRS or not.
      This information is needed for supporting seamless DRRS switch for certain
      power saving usecases. This patch is tested by enabling the DRM logs and
      user should see whether Seamless DRRS is supported or not.
      
      v2: Daniel's review comments
      Modified downclock deduction based on intel_find_panel_downclock
      
      v3: Chris's review comments
      Moved edp_downclock_avail and edp_downclock to intel_panel
      
      v4: Jani's review comments.
      Changed name of the enum edp_panel_type to drrs_support type.
      Change is_drrs_supported to drrs_support of type enum drrs_support_type.
      
      v5: Incorporated Jani's review comments
      Modify intel_dp_drrs_initialize to return downclock mode. Support for Gen7
      and above.
      
      v6: Incorporated Chris's review comments.
      Changed initialize to init in intel_drrs_initialize
      
      v7: Incorporated Jani's review comments.
      Removed edp_downclock and edp_downclock_avail. Return NULL explicitly.
      Make drrs_state and unnamed struct. Move Gen based check inside drrs_init.
      
      v8: Made changes to track PSR enable/disable throughout system use (instead
      of just in the init sequence) for disabling/enabling DRRS. Jani's review
      comments.
      
      v9: PSR tracking will be done as part of idleness detection patch. Removed
      PSR state tracker in i915_drrs. Jani's review comments.
      
      v10: Added log for DRRS not supported in drrs_init
      
      v11: Modification in drrs_init. suggested by Jani
      Signed-off-by: NPradeep Bhat <pradeep.bhat@intel.com>
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4f9db5b5
    • D
      drm/i915: Disable self-refresh for untiled fbs on i915gm · 2ab1bc9d
      Daniel Vetter 提交于
      Apparently it doesn't work. X-tiled self-refresh works flawlessly
      otoh. Apparently X still works correctly with linear framebuffers, so
      might just be an issue with the initial modeset. It's unclear whether
      this just borked wm setup from our side or a hw restriction, but just
      disabling gets things going.
      
      Note that this regression was only brought to light with
      
      commit 3f2dc5ac
      Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Date:   Fri Jan 10 14:06:47 2014 +0200
      
          drm/i915: Fix 915GM self-refresh enable/disable
      
      before that self-refresh for i915GM didn't work at all.
      
      Kudos to Ville for spotting a little bug in the original patch I've
      attached to the bug.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76103Tested-by: NKrzysztof Mazur <krzysiek@podlesie.net>
      Cc: Krzysztof Mazur <krzysiek@podlesie.net>
      Cc: stable@vger.kernel.org
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      [Jani: rebase on top of drm-next with primary plane support.]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      2ab1bc9d
    • D
      Revert "drm/i915: fix infinite loop at gen6_update_ring_freq" · fc1744ff
      Daniel Vetter 提交于
      This reverts commit 4b28a1f3.
      
      This patch duct-tapes over some issue in the current bdw rps patches
      which must wait with enabling rc6/rps until the very first batch has
      been submitted by userspace.
      
      But those patches aren't merged yet, and for upstream we need to have
      an in-kernel emission of the very first batch. I shouldn't have
      merged this patch so let's revert it again.
      
      Also Imre noticed that even when rps is set up normally there's a
      small window (due to the 1s delay of the async rps init work) where we
      could runtime suspend already and blow up all over the place. Imre has
      a proper fix to block runtime pm until the rps init work has
      successfully completed.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fc1744ff
    • D