1. 13 5月, 2014 1 次提交
  2. 06 5月, 2014 1 次提交
    • V
      drm/i915: Make sprite updates atomic · 8d7849db
      Ville Syrjälä 提交于
      Add a mechanism by which we can evade the leading edge of vblank. This
      guarantees that no two sprite register writes will straddle on either
      side of the vblank start, and that means all the writes will be latched
      together in one atomic operation.
      
      We do the vblank evade by checking the scanline counter, and if it's too
      close to the start of vblank (too close has been hardcoded to 100usec
      for now), we will wait for the vblank start to pass. In order to
      eliminate random delayes from the rest of the system, we operate with
      interrupts disabled, except when waiting for the vblank obviously.
      
      Note that we now go digging through pipe_to_crtc_mapping[] in the
      vblank interrupt handler, which is a bit dangerous since we set up
      interrupts before the crtcs. However in this case since it's the vblank
      interrupt, we don't actually unmask it until some piece of code
      requests it.
      
      v2: preempt_check_resched() calls after local_irq_enable() (Jesse)
          Hook up the vblank irq stuff on BDW as well
      v3: Pass intel_crtc instead of drm_crtc (Daniel)
          Warn if crtc.mutex isn't locked (Daniel)
          Add an explicit compiler barrier and document the barriers (Daniel)
          Note the irq vs. modeset setup madness in the commit message (Daniel)
      v4: Use prepare_to_wait() & co. directly and eliminate vbl_received
      v5: Refactor intel_pipe_handle_vblank() vs. drm_handle_vblank() (Chris)
          Check for min/max scanline <= 0 (Chris)
          Don't call intel_pipe_update_end() if start failed totally (Chris)
          Check that the vblank counters match on both sides of the critical
          section (Chris)
      v6: Fix atomic update for interlaced modes
      v7: Reorder code for better readability (Chris)
      v8: Drop preempt_check_resched(). It's not available to modules
          anymore and isn't even needed unless we ourselves cause
          a wakeup needing reschedule while interrupts are off
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NSourab Gupta <sourabgupta@gmail.com>
      Reviewed-by: NAkash Goel <akash.goels@gmail.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8d7849db
  3. 05 5月, 2014 2 次提交
  4. 23 4月, 2014 1 次提交
  5. 10 4月, 2014 2 次提交
    • 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
  6. 09 4月, 2014 1 次提交
  7. 02 4月, 2014 4 次提交
  8. 21 3月, 2014 1 次提交
  9. 19 3月, 2014 4 次提交
  10. 18 3月, 2014 4 次提交
  11. 11 3月, 2014 1 次提交
    • V
      drm/i915: Make encoder cloning more flexible · bc079e8b
      Ville Syrjälä 提交于
      Currently we allow encoders to indicate whether they can be part of a
      cloned set with just one flag. That's not flexible enough to describe
      the actual hardware capabilities. Instead make it a bitmask of encoder
      types with which the current encoder can be cloned.
      
      For now we set the bitmask to allow DVO+DVO and DVO+VGA, which should
      match what the old boolean flag allowed. We will add some more cloning
      options in the future.
      
      Note that this patch also removes the encoder.possible_clones setting
      from encoder setup code - we compute this dynamically.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Add Ville's explanation why removing the encoder
      possible_clones is save.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc079e8b
  12. 08 3月, 2014 5 次提交
    • J
      drm/i915: remove early fb allocation dependency on CONFIG_FB v2 · 484b41dd
      Jesse Barnes 提交于
      By stuffing the fb allocation into the crtc, we get mode set lifetime
      refcounting for free, but have to handle the initial pin & fence
      slightly differently.  It also means we can move the shared fb handling
      into the core rather than leaving it out in the fbdev code.
      
      v2: null out crtc->fb on error (Daniel)
          take fbdev fb ref and remove unused error path (Daniel)
      Requested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      484b41dd
    • J
      drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon v12 · d978ef14
      Jesse Barnes 提交于
      Retrieve current framebuffer config info from the regs and create an fb
      object for the buffer the BIOS or boot loader left us.  This should
      allow for smooth transitions to userspace apps once we finish the
      initial configuration construction.
      
      v2: check for non-native modes and adjust (Jesse)
          fixup aperture and cmap frees (Imre)
          use unlocked unref if init_bios fails (Jesse)
          fix curly brace around DSPADDR check (Imre)
          comment failure path for pin_and_fence (Imre)
      v3: fixup fixup of aperture frees (Chris)
      v4: update to current bits (locking & pin_and_fence hack) (Jesse)
      v5: move fb config fetch to display code (Jesse)
          re-order hw state readout on initial load to suit fb inherit (Jesse)
          re-add pin_and_fence in fbdev code to make sure we refcount properly (Je
      v6: rename to plane_config (Daniel)
          check for valid object when initializing BIOS fb (Jesse)
          split from plane_config readout and other display changes (Jesse)
          drop use_bios_fb option (Chris)
          update comments (Jesse)
          rework fbdev_init_bios for clarity (Jesse)
          drop fb obj ref under lock (Chris)
      v7: use fb object from plane_config instead (Ville)
          take ref on fb object (Jesse)
      v8: put under i915_fastboot option (Jesse)
          fix fb ptr checking (Jesse)
          inform drm_fb_helper if we fail to enable a connector (Jesse)
          drop unnecessary enabled[] modifications in failure cases (Chris)
          split from BIOS connector config readout (Daniel)
          don't memset the fb buffer if preallocated (Chris)
          alloc ifbdev up front and pass to init_bios (Chris)
          check for bad ifbdev in restore_mode too (Chris)
      v9: fix up !fastboot bpp setting (Jesse)
          fix up !fastboot helper alloc (Jesse)
          make sure BIOS fb is sufficient for biggest active pipe (Jesse)
      v10:fix up size calculation for proposed fbs (Chris)
          go back to two pass pipe fb assignment (Chris)
          add warning for active pipes w/o fbs (Chris)
          clean up num_pipes checks in fbdev_init and fbdev_restore_mode (Chris)
          move i915.fastboot into fbdev_init (Chris)
      v11:make BIOS connector config usage unconditional (Daniel)
      v12:fix up fb vs pipe size checking (Chris)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d978ef14
    • J
      drm/i915: add plane_config fetching infrastructure v2 · 46f297fb
      Jesse Barnes 提交于
      Early at init time, we can try to read out the plane config structure
      and try to preserve it if possible.
      
      v2: alloc fb obj at init time after fetching plane config
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      46f297fb
    • I
      drm/i915: power domains: add vlv power wells · 77961eb9
      Imre Deak 提交于
      Based on an early draft from Jesse.
      
      Add support for powering on/off the dynamic power wells on VLV by
      registering its display and dpio dynamic power wells with the power
      domain framework.
      
      For now power on all PHY TX lanes regardless of the actual lane
      configuration. Later this can be optimized when the PHY side setup
      enables only the required lanes. Atm, it enables all lanes in all
      cases.
      
      v2:
      - undef function local COND macro after its last use (Ville)
      - Take dev_priv->irq_lock around the whole sequence of
        intel_set_cpu_fifo_underrun_reporting_nolock() and
        valleyview_disable_display_irqs(). They are short and releasing
        the lock in between only makes proving correctness more difficult.
      - sanitize local var names in vlv_power_well_enabled()
      v3:
      - rebase on latest -nightly
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Resolve conflict due to my changes in the previous patch.
      Also throw in an assert_spin_locked for safety. And finally appease
      checkpatch.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      77961eb9
    • I
      drm/i915: add port power domains · 319be8ae
      Imre Deak 提交于
      Parts that poke port specific HW blocks like the encoder HW state
      readout or connector hotplug detect code need a way to check whether
      required power domains are on or enable/disable these. For this purpose
      add a set of power domains that refer to the port HW blocks. Get the
      proper port power domains during modeset.
      
      For now when requesting the power domain for a DDI port get it for a 4
      lane configuration. This can be optimized later to request only the 2
      lane power domain, when proper support is added on the VLV PHY side for
      this. Atm, the PHY setup code assumes a 4 lane config in all cases.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      319be8ae
  13. 06 3月, 2014 1 次提交
  14. 14 2月, 2014 1 次提交
    • I
      drm/i915: add unregister callback to connector · 4932e2c3
      Imre Deak 提交于
      Since
      
      commit d9255d57
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Thu Sep 26 20:05:59 2013 -0300
      
      it became clear that we need to separate the unload sequence into two
      parts:
      
      1. remove all interfaces through which new operations on some object
         (crtc, encoder, connector) can be started and make sure all pending
         operations are completed
      2. do the actual tear down of the internal representation of the above
         objects
      
      The above commit achieved this separation for connectors by splitting
      out the sysfs removal part from the connector's destroy callback and
      doing this removal before calling drm_mode_config_cleanup() which does
      the actual tear-down of all the drm objects.
      
      Since we'll have to customize the interface removal part for different
      types of connectors in the upcoming patches, add a new unregister
      callback and move the interface removal part to it.
      
      No functional change.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4932e2c3
  15. 13 2月, 2014 5 次提交
  16. 27 1月, 2014 1 次提交
    • R
      drm/i915: debugfs: Add support for probing DP sink CRC. · d2e216d0
      Rodrigo Vivi 提交于
      This debugfs interface will allow intel-gpu-tools test case
      to verify if screen has been updated properly on cases like PSR.
      
      v2: Accepted all Daniel's suggestions:
          * grab modeset lock
          * loop over connector and check DPMS on
          * return errors
          * use _eDP1 suffix for easy future extension
          * don't cache crc_supported neither latest crc
          * return crc as a full array and read it at once with aux.
          * use 0 to turn TEST_SINK off.
          * split the drm_helpers definitions in another patch.
      
      v3: Accepted 2 Damien's suggestion: remove h from printf hexa
          and return ENODEV when eDP not present instead of EAGAIN.
      
      v4: Accepted 2 Jani' s suggestion: 1 path for unlock and remove
          _retry from aux read.
      
      v5: removing last missing useless _retry (by Damien)
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d2e216d0
  17. 25 1月, 2014 5 次提交