An error occurred fetching the project authors.
  1. 17 Feb, 2016 1 commit
  2. 01 Feb, 2016 3 commits
  3. 12 Dec, 2015 1 commit
  4. 10 Dec, 2015 1 commit
  5. 07 Dec, 2015 1 commit
  6. 24 Nov, 2015 4 commits
    • Rodrigo Vivi's avatar
      drm/i915: Also disable PSR on Sink when disabling it on Source. · b6e4d534
      Rodrigo Vivi authored
      It is not a bad idea to disable the PSR feature on Sink
      when we are disabling on the Source.
      
      v2: Move dpcd write inside mutex protected area as suggested by Sonika.
      
      Cc: Sonika Jindal <sonika.jindal@intel.com>
      Suggested-by: default avatarSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b6e4d534
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Mask LPSP hw tracking back again. · bb929cbc
      Rodrigo Vivi authored
      When we introduced PSR we let LPSP masked allowing us to get PSR
      independently from the audio runtime PM. However in one of the
      attempts to get PSR enabled by default one user reported one specific
      case where he would miss screen updates if scrolling the firefox in a
      Gnome environment when i915 runtime pm was enabled. So for
      this specific case that (I could never create an i-g-t test case)
      we decided to remove the LPSP mask and let HW tracking taking care of
      this case. The mask got removed later by my
      commit 09108b90 ("drm/i915: PSR: Remove Low Power HW tracking mask.")
      
      So we started depending on audio driver again, what is bad.
      
      With previous commit
      "drm/i915: PSR: Let's rely more on frontbuffer tracking."
      we transfered the PSR exit responsability totally to SW frontbuffer
      tracking. So now can safelly shut off a bit the HW tracking, or
      at least this case that makes us to depend on other drivers.
      
      v2: Update commit message since this patch by itself doesn't solve
          the bugzilla entries.
      
      v3: Another attempt to improve commit message.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: default avatarBrian Norris <briannorris@chromium.org>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Damien Lespiau damien.lespiau@intel.com
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      bb929cbc
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Let's rely more on frontbuffer tracking. · 921ec285
      Rodrigo Vivi authored
      The ultimate goal here is to remove the dependency we
      currently have on audio driver power to get PSR working.
      Since with audio driver runtime PM disabled the Hardware tracking
      believes graphics is fully active and prevent PSR Entry, or
      in other words continuously exit PSR.
      
      So, the idea is to transfer the PSR exit responsability
      from the HW tracking to the SW tracking (frontbuffer tracking),
      who is really mature right now.
      
      However with LPSP masked out there might be cases where we could
      miss exit from HW tracking since it can be relying on this,
      like a specific case reported at our mailing list who
      user reported he would miss screen updates if scrolling firefox
      in a Gnome environment when i915 runtimepm was enabled.
      
      So before masking out LPSP again to make us independent from
      the audio driver we need to make sure that all our cases
      are coverred from the frontbuffer tracking perspective,
      where the flush means invalidate and flush.
      
      Without this patch for HSW, BDW and SKL we just do the
      invalidate part when the flush wasn't originated by a page flip
      because we were trusting the HW tracking for the flip case.
      
      So let's rely more on frontbuffer tracking and do the
      invalidation regardless the origin as expected for all platforms.
      
      v2: Improve commit message as suggested by Paulo.
      
      v3: Another attempt to let commit message more clear.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Damien Lespiau damien.lespiau@intel.com
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      921ec285
    • Rodrigo Vivi's avatar
      drm/i915: Remove duplicated dpcd write on hsw_psr_enable_sink. · ca1a9533
      Rodrigo Vivi authored
      Commit (89251b17) intended to remove this line and let only one
      DP_PSR_EN_CFG set, but it was wrong and this call is now duplicated
      at the code.
      
      Also "& ~DP_PSR_MAIN_LINK_ACTIVE" doesn't do anything at all. It
      was like that since I introduced this call but probably the idea
      was to be informative and make clear statement that we were not using
      the link standby. So it is better to remove this one here and let
      the code a bit cleaner.
      
      v2: Improve commit message as requested by Paulo.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: default avatarBrian Norris <briannorris@chromium.org>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Damien Lespiau damien.lespiau@intel.com
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ca1a9533
  7. 18 Nov, 2015 5 commits
    • Rodrigo Vivi's avatar
      drm/i915: Send TP1 TP2/3 even when panel claims no NO_TRAIN_ON_EXIT. · 81e4e0c9
      Rodrigo Vivi authored
      On the commit 3301d409 ("drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT logic")'
      we already had identified that DP_PSR_NO_TRAIN_ON_EXIT
      doesn't mean we shouldn't send TPS patterns, however we start sending the
      minimal TP1 as possible and no TP2.
      
      For most of the panels this is ok, but we found a reported case where
      this is not true and panel keeps frozen without updating the screen for a while.
      
      We could just get this case after patch "PSR: Don't Skip aux handshake on
      DP_PSR_NO_TRAIN_ON_EXIT." is applied since that one fix the
      hard freeze on this kind of panels.
      
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=91436#c19
      
      Cc: Ivan Mitev <ivan.mitev@gmail.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      81e4e0c9
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Don't Skip aux handshake on DP_PSR_NO_TRAIN_ON_EXIT. · bebbeaca
      Rodrigo Vivi authored
      Since the beginning there is a confusion on the meaning of this bit.
      
      A previous patch had identified this already and fixed it partially:
      'commit 3301d409 ("drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT logic")
      
      DP_PSR_NO_TRAIN_ON_EXIT means the source doesn't need to do the
      training, but it doesn't tell to avoid TP patterns or to skip
      aux handshake.
      
      This patch fixes the hard freeze reported.
      
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=91436
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=91437
      
      Cc: Ivan Mitev <ivan.mitev@gmail.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      bebbeaca
    • Rodrigo Vivi's avatar
      drm/i915: Reduce PSR re-activation time for VLV/CHV. · 20bb97fe
      Rodrigo Vivi authored
      With 'commit 30886c5a ("drm/i915: VLV/CHV PSR: Increase wait delay
       time before active PSR.")' we fixed a blank screen when first
      activation was happening immediately after PSR being enabled.
      There we gave more time for idleness by increasing the delay
      between re-activating sequences.
      
      However, commit "drm/i915: Delay first PSR activation."
      delay the first activation in a better way keeping a good PSR
      residency. So, we can now reduce the delay on re-enable.
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      20bb97fe
    • Rodrigo Vivi's avatar
      drm/i915: Delay first PSR activation. · d0ac896a
      Rodrigo Vivi authored
      When debuging the frozen screen caused by HW tracking with low
      power state I noticed that if we keep moving the mouse non stop
      you will miss the screen updates for a while. At least
      until we stop moving the mouse for a small time and move again.
      
      The actual enabling should happen immediately after
      Display Port enabling sequence finished with links trained and
      everything enabled. However we face many issues when enabling PSR
      right after a modeset.
      
      On VLV/CHV we face blank screens on this scenario and on HSW+
      we face a recoverable frozen screen, at least until next
      exit-activate sequence.
      
      Another workaround for the same issue here would be to increase
      re-enable idle time from 100 to 500 as we did for VLV/CHV.
      However this patch workaround this issue in a better
      way since it doesn't reduce PSR residency and also
      allow us to reduce the delay time between re-enables at least
      on VLV/CHV.
      
      This is also important to make the sysfs toggle working properly.
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d0ac896a
    • Ville Syrjälä's avatar
      drm/i915: Type safe register read/write · f0f59a00
      Ville Syrjälä authored
      Make I915_READ and I915_WRITE more type safe by wrapping the register
      offset in a struct. This should eliminate most of the fumbles we've had
      with misplaced parens.
      
      This only takes care of normal mmio registers. We could extend the idea
      to other register types and define each with its own struct. That way
      you wouldn't be able to accidentally pass the wrong thing to a specific
      register access function.
      
      The gpio_reg setup is probably the ugliest thing left. But I figure I'd
      just leave it for now, and wait for some divine inspiration to strike
      before making it nice.
      
      As for the generated code, it's actually a bit better sometimes. Eg.
      looking at i915_irq_handler(), we can see the following change:
        lea    0x70024(%rdx,%rax,1),%r9d
        mov    $0x1,%edx
      - movslq %r9d,%r9
      - mov    %r9,%rsi
      - mov    %r9,-0x58(%rbp)
      - callq  *0xd8(%rbx)
      + mov    %r9d,%esi
      + mov    %r9d,-0x48(%rbp)
       callq  *0xd8(%rbx)
      
      So previously gcc thought the register offset might be signed and
      decided to sign extend it, just in case. The rest appears to be
      mostly just minor shuffling of instructions.
      
      v2: i915_mmio_reg_{offset,equal,valid}() helpers added
          s/_REG/_MMIO/ in the register defines
          mo more switch statements left to worry about
          ring_emit stuff got sorted in a prep patch
          cmd parser, lrc context and w/a batch buildup also in prep patch
          vgpu stuff cleaned up and moved to a prep patch
          all other unrelated changes split out
      v3: Rebased due to BXT DSI/BLC, MOCS, etc.
      v4: Rebased due to churn, s/i915_mmio_reg_t/i915_reg_t/
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1447853606-2751-1-git-send-email-ville.syrjala@linux.intel.com
      f0f59a00
  8. 16 Nov, 2015 3 commits
  9. 13 Oct, 2015 1 commit
  10. 05 Aug, 2015 1 commit
    • Rodrigo Vivi's avatar
      drm/i915: VLV/CHV PSR: Increase wait delay time before active PSR. · 30886c5a
      Rodrigo Vivi authored
      Since active function on VLV immediately activate PSR let's give more
      time for idleness. Different from core platforms where we have idle_frames
      count.
      
      Also kms_psr_sink_crc now is automated and always get this:
      
      [drm:intel_enable_pipe] enabling pipe A
      [drm:intel_edp_backlight_on]
      [drm:intel_panel_enable_backlight] pipe
      [drm:intel_panel_enable_backlight] pipe A
      [drm:intel_panel_actually_set_backlight] set backlight PWM = 7812
      
      PSR gets enabled somewhere here after backlight.
      
      [drm:intel_get_hpd_pins] hotplug event received, stat 0x00000000, dig 0x0
      [drm:vlv_pipe_set_fifo_size] Pipe A FIFO split 511 / 511 / 511
      [drm:vlv_update_wm] Setting FIFO watermarks - A: plane=391, cursor=63, sp
      
      PSR gets flushed around here by intel_atomic_commit
      
      [drm:vlv_pipe_set_fifo_size] Pipe A FIFO split 511 / 511 / 511
      [drm:vlv_update_wm] Setting FIFO watermarks - A: plane=391, cursor=63, sp
      [drm:intel_set_memory_cxsr] memory self-refresh is enabled
      [drm:intel_connector_check_state] [CONNECTOR:39:eDP-1]
      [drm:check_encoder_state] [ENCODER:30:DAC-30]
      [drm:check_encoder_state] [ENCODER:31:TMDS-31]
      [drm:check_encoder_state] [ENCODER:36:TMDS-36]
      [drm:check_encoder_state] [ENCODER:38:TMDS-38]
      [drm:check_crtc_state] [CRTC:21]
      [drm:check_crtc_state] [CRTC:26]
      [drm:intel_psr_activate [i915]] *ERROR* PSR Active
      [drm:intel_get_hpd_pins] hotplug event received, stat 0x00000000, dig 0x
      [drm:intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* pipe A underrun
      [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO
      Underrun.
      
      It is true that in a product we won't keep disabling and enabling planes so
      frequently, but for safeness let's stay conservative.
      
      It is also true that 500ms is an etternity. But PSR is anyway a power saving
      feature for idle scenario. So if it is idle feature stays on and 500ms to get
      it reanabled is not that insane.
      
      v2: Rebase over intel_psr.c and fix typo.
      v3: Revival: Manual tests indicated that this is needed. With a short delay
          there is a huge risk of getting blank screens when planes are being enabled.
      v4: Revival 2 with reasonable delay. 1/2 sec instead of 5. VBT is 10 sec but
          actually time for link training what we aren't doing, but with only 100 sec
          in some cases kms_psr_sink_crc manual was showing blank screen,
          so let's use this for now. Also changed comment by a FIXME.
      v5: Rebase after a long time, remove FIXME and update comment above.
      v6: msecs_to_jiffies is already on delay. remove duplication.
      v7: use msecs_to_jiffies on schedule_delayed_work call.
      
      Reviewed-by: Durgadoss R <durgadoss.r@intel.com> (v4)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      30886c5a
  11. 09 Jul, 2015 3 commits
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Increase idle_frames · 97173eaf
      Rodrigo Vivi authored
      Idle frames the number of identical frames needed
      before panel can enter PSR.
      
      There are some panels that requires up to minimum of 4 idle
      frames available on the market. For these cases usually
      VBT should be used to configure the number of idle frames,
      but unfortunately this isn't always true and VBT isn't being
      set at all.
      
      Let's trust VBT when it is set + 1  and use minimum of 4 + 1
      when VBT isn't set. "+1" covers the "of-by-one" case.
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      97173eaf
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Remove Low Power HW tracking mask. · 09108b90
      Rodrigo Vivi authored
      By Spec we should only mask memup and hotplug detection
      for hardware tracking cases. However we always masked
      LPSP because with power well always enabled on audio
      PSR was never being activated and residency was always
      zeroed.
      
      Apparently audio driver is tying power well management
      and runtime PM for some reason. But with audio runtime
      PM working or with audio completely out of picture
      we should remove this mask, otherwise we have a high
      risk of miss screen updates as faced by Matthew.
      
      WARNING: With this patch if snd_intel_hda driver is
      running and not releasing power well properly PSR will
      constant Exit and Performance Counter will be 0.
      
      But the best thing of this patch is that with one more
      HW tracking working the risks of missed blank screen
      are minimized at most.
      
      This affects just core platforms where PSR exit are also
      helped by HW tracking: Haswell, Broadwell and Skylake
      for now.
      
      v2: Fix commit message explanation. It has nothing to do
      with runtime PM on i915 as previously advertised.
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      09108b90
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Flush means invalidate + flush · 169de131
      Rodrigo Vivi authored
      Since flush actually means invalidate + flush we need to force psr
      exit on PSR flush.
      
      On Core platforms there is no way to disable hw tracking and
      do the pure sw tracking so we simulate it by fully disable psr and
      reschedule a enable back.
      So a good idea is to minimize sequential disable/enable in cases we
      know that HW tracking like when flush has been originated by a flip.
      Also flip had just invalidated it already.
      
      It also uses origin to minimize the a bit the amount of
      disable/enabled, mainly when flip already had invalidated.
      
      With this patch in place it is possible to do a flush on dirty areas
      properly in a following patch.
      
      v2: Remove duplicated exit on HSW+Sprites as pointed out by Paulo.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      169de131
  12. 23 Jun, 2015 2 commits
  13. 14 Apr, 2015 4 commits
    • Rodrigo Vivi's avatar
      drm/i915: PSR VLV: Add single frame update. · c7240c3b
      Rodrigo Vivi authored
      According to spec: "In PSR HW or SW mode, SW set this bit before writing
      registers for a flip. It will be self-clear when it gets to the PSR
      active state."
      
      Some versions of spec mention that this is needed when in
      "Persistent mode" but define it as same as "SW mode". Since this
      fix the page flip case let's assume this is exactly what we need.
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c7240c3b
    • Rodrigo Vivi's avatar
      drm/i915: PSR: deprecate link_standby support for core platforms. · 89251b17
      Rodrigo Vivi authored
      On Haswell and Broadwell with link in standby when exit event happens
      between vblank and VSC packet, PSR exit on panel but DPA transmitter
      still sends black pixel. When this condition hits, panel will intermittently
      display black frame.
      
      The known W/A for this case involve the of single_frame update
      that isn't supported on Haswell and to be supported on Broadwell
      3 other workarounds would be required. So it is better and safe to
      just deprecate link_standby for now.
      
      Also, link fully off saves more power than link_standby and afwk
      no OEM is requesting link standby on VBT. There is no reason for that.
      
      For Skylake let's just consider it behaves like Broadwell until
      we prove otherwise.
      
      v2: Fix commit message (Durga).
      
      v3: Fix conflict with PSR2.
      
      Reference: HSD: bdwgfx/1912559
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      89251b17
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT logic · 3301d409
      Rodrigo Vivi authored
      Since the beginning there is a missunderstanding on the meaning of this
      dpcd bit.
      This bit shouldn't indicate whether to use link standby or not, but just
      be used to configure TP1, TP2 and TP3 times and tell hw aux should be skiped
      since HW is the responsible one.
      
      Even with help of frontbuffer tracking, HW is still fully responsible for
      PSR exit logic with/without DP training.
      
      DP_PSR_NO_TRAIN_ON_EXIT means the source doesn't need to do the training, but
      it doesn't tell to avoid TP patterns, so we will send minimal TP1 and avoid
      TP2. It also means that sink itself can take up to 5 idle frames for training.
      6 in our case since we might be off by 1. So we also increment idle_frames by 4
      here.
      
      v2: Fix and improve commit message (Durga).
      v3: Use minimal TP1 time avoiding TP2 and increase idle frame.
      
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Cc: Arthur Runyan <arthur.j.runyan@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      3301d409
    • Rodrigo Vivi's avatar
      drm/i915: PSR: Remove wrong LINK_DISABLE. · cff5190c
      Rodrigo Vivi authored
      This wrong logic and useless define came from first versions and
      came along with all rework. Just now I notice how ugly, wrong and
      useless this is.
      
      val is already defined as 0 anyway and logic is completelly wrong
      and useless. So let's starting the link_standby fix with this
      cleaning.
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      cff5190c
  14. 07 Apr, 2015 1 commit
  15. 30 Mar, 2015 1 commit
  16. 26 Mar, 2015 1 commit
  17. 28 Jan, 2015 1 commit
    • Sonika Jindal's avatar
      drm/i915/skl: Enabling PSR on Skylake · e3d99845
      Sonika Jindal authored
      Mainly taking care of some register offsets, otherwise things are similar to
      hsw. Also, programming ddi aux to use hardcoded values for psr data select.
      
      v2: introduce  EDP_PSR_AUX_BASE macro (Chris)
      v3: Moving to HW tracking for SKL+ platforms, so activating source psr during
      psr_enabling and then avoiding psr entries and exits for each frontbuffer
      updates.
      v4: Using SKL DDI AUX regs instead of changing PSR_AUX regs definition (Rodrigo)
      Signed-off-by: default avatarSonika Jindal <sonika.jindal@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      [danvet: Drop the hunks to short-circuit sw tracking: We'd need to
      push this down one level, and I don't fully trust the test coverage
      yet to do so. So much prefer we pick a whitelist approach for the
      cases we know work correctly.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e3d99845
  18. 27 Jan, 2015 2 commits
    • Ander Conselvan de Oliveira's avatar
      drm/i915: Make intel_crtc->config a pointer · 6e3c9717
      Ander Conselvan de Oliveira authored
      To match the semantics of drm_crtc->state, which this will eventually
      become. The allocation of the memory for config will be fixed in a
      followup patch. By adding the extra _config field to intel_crtc it was
      possible to generate this entire patch with the cocci script below.
      
      @@ @@
      struct intel_crtc {
      ...
      -struct intel_crtc_state config;
      +struct intel_crtc_state _config;
      +struct intel_crtc_state *config;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -memset(&crtc->config, 0, sizeof(crtc->config));
      +memset(crtc->config, 0, sizeof(*crtc->config));
      @@ @@
      __intel_set_mode(...) {
      <...
      -to_intel_crtc(crtc)->config = *pipe_config;
      +(*(to_intel_crtc(crtc)->config)) = *pipe_config;
      ...>
      }
      @@ @@
      intel_crtc_init(...) {
      ...
      WARN_ON(drm_crtc_index(&intel_crtc->base) != intel_crtc->pipe);
      +intel_crtc->config = &intel_crtc->_config;
      return;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -&crtc->config
      +crtc->config
      @@ struct intel_crtc *crtc; identifier member; @@
      -crtc->config.member
      +crtc->config->member
      @@ expression E; @@
      -&(to_intel_crtc(E)->config)
      +to_intel_crtc(E)->config
      @@ expression E; identifier member; @@
      -to_intel_crtc(E)->config.member
      +to_intel_crtc(E)->config->member
      
      v2: Clarify manual changes by splitting them into another patch. (Matt)
          Improve cocci script to generate even more of the changes. (Ander)
      Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6e3c9717
    • Ander Conselvan de Oliveira's avatar
      drm/i915: Embedded struct drm_crtc_state in intel_crtc_state · 2d112de7
      Ander Conselvan de Oliveira authored
      And get rid of the duplicate mode structures. This patch was generated
      with the following semantic patch:
      
      @@ @@
      struct intel_crtc_state {
      +struct drm_crtc_state base;
      +
      ...
      -struct drm_display_mode requested_mode;
      -struct drm_display_mode adjusted_mode;
      ...
      }
      @@ struct intel_crtc_state *state; @@
      -state->adjusted_mode
      +state->base.adjusted_mode
      @@ struct intel_crtc_state *state; @@
      -state->requested_mode
      +state->base.mode
      @@ struct intel_crtc_state state; @@
      -state.adjusted_mode
      +state.base.adjusted_mode
      @@ struct intel_crtc_state state; @@
      -state.requested_mode
      +state.base.mode
      @@ struct drm_crtc *crtc; @@
      -to_intel_crtc(crtc)->config.adjusted_mode
      +to_intel_crtc(crtc)->config.base.adjusted_mode
      @@ identifier member; expression E; @@
      -PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
      +PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_I(adjusted_mode.member);
      +PIPE_CONF_CHECK_I(base.adjusted_mode.member);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
      +PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);
      
      v2: Completely generate the patch with cocci. (Ander)
      Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      2d112de7
  19. 15 Jan, 2015 4 commits