1. 18 11月, 2015 1 次提交
  2. 29 10月, 2015 1 次提交
    • R
      drm/i915/kbl: Introduce Kabylake platform defition. · ef11bdb3
      Rodrigo Vivi 提交于
      Kabylake is a Intel® Processor containing Intel® HD Graphics
      following Skylake.
      
      It is Gen9p5, so it inherits everything from Skylake.
      
      Let's start by adding the platform separated from Skylake
      but reusing most of all features, functions etc. Later we
      rebase the PCI-ID patch without is_skylake=1
      so we don't replace what original Author did there.
      
      Few IS_SKYLAKEs if statements are not being covered by this patch
      on purpose:
         - Workarounds: Kabylake is derivated from Skylake H0 so no
           		  W/As apply here.
         - GuC: A following patch removes Kabylake support with an
           	  explanation: No firmware available yet.
         - DMC/CSR: Done in a separated patch since we need to be carefull
           	      and load the version for revision 7 since
      	      Kabylake is Skylake H0.
      
      v2: relative cleaner commit message and added the missed
          IS_KABYLAKE to intel_i2c.c as pointed out by Jani.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      ef11bdb3
  3. 13 10月, 2015 1 次提交
  4. 09 6月, 2015 1 次提交
    • J
      drm/i915: Fix DDC probe for passive adapters · 3f5f1554
      Jani Nikula 提交于
      Passive DP->DVI/HDMI dongles on DP++ ports show up to the system as HDMI
      devices, as they do not have a sink device in them to respond to any AUX
      traffic. When probing these dongles over the DDC, sometimes they will
      NAK the first attempt even though the transaction is valid and they
      support the DDC protocol. The retry loop inside of
      drm_do_probe_ddc_edid() would normally catch this case and try the
      transaction again, resulting in success.
      
      That, however, was thwarted by the fix for [1]:
      
      commit 9292f37e
      Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
      Date:   Thu Jan 5 09:34:28 2012 -0200
      
          drm: give up on edid retries when i2c bus is not responding
      
      This added code to exit immediately if the return code from the
      i2c_transfer function was -ENXIO in order to reduce the amount of time
      spent in waiting for unresponsive or disconnected devices. That was
      possible because the underlying i2c bit banging algorithm had retries of
      its own (which, of course, were part of the reason for the bug the
      commit fixes).
      
      Since its introduction in
      
      commit f899fc64
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Jul 20 15:44:45 2010 -0700
      
          drm/i915: use GMBUS to manage i2c links
      
      we've been flipping back and forth enabling the GMBUS transfers, but
      we've settled since then. The GMBUS implementation does not do any
      retries, however, bailing out of the drm_do_probe_ddc_edid() retry loop
      on first encounter of -ENXIO. This, combined with Eugeni's commit, broke
      the retry on -ENXIO.
      
      Retry GMBUS once on -ENXIO on first message to mitigate the issues with
      passive adapters.
      
      This patch is based on the work, and commit message, by Todd Previte
      <tprevite@gmail.com>.
      
      [1] https://bugs.freedesktop.org/show_bug.cgi?id=41059
      
      v2: Don't retry if using bit banging.
      
      v3: Move retry within gmbux_xfer, retry only on first message.
      
      v4: Initialize GMBUS0 on retry (Ville).
      
      v5: Take index reads into account (Ville).
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85924
      Cc: Todd Previte <tprevite@gmail.com>
      Cc: stable@vger.kernel.org
      Tested-by: Oliver Grafe <oliver.grafe@ge.com> (v2)
      Tested-by: NJim Bride <jim.bride@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      3f5f1554
  5. 20 5月, 2015 2 次提交
  6. 24 4月, 2015 1 次提交
  7. 14 4月, 2015 1 次提交
    • J
      drm/i915: add bxt gmbus support · 4c272834
      Jani Nikula 提交于
      For BXT gmbus is pulled from PCH to CPU. From implementation point of
      view only pin pair configuration will change. The existing
      implementation supports all platforms previous to GEN8 and also SKL. But
      for BXT pin pair configuration is completely different than SKL or other
      previous GEN's. This patch introduces the new pin pair configuration
      structure specific to BXT and also ensures every real gmbus port has a
      gpio pin.
      
      v3 by Jani: with the platform independent prep work in place, the bxt
      enabling reduces to a fairly trivial patch. Credits are due Sunil for
      giving me the ideas (with his patches) what the platform independent
      parts should look like.
      
      v4: Fix intel_hdmi_init_connector() for bxt. Abstract gmbus_pin access
      more. s/GPU/PCH/ in commit message.
      
      v5: Rebase.
      
      Issue: VIZ-3574
      Signed-off-by: NA.Sunil Kamath <sunil.kamath@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c272834
  8. 01 4月, 2015 3 次提交
  9. 07 7月, 2014 2 次提交
  10. 07 2月, 2014 1 次提交
    • D
      drm/i915: Disable dp aux irq on g4x · 4e6b788c
      Daniel Vetter 提交于
      Apparently it's broken in the exact same way as the gmbus irq. For
      reference of the full story see
      
      commit c12aba5a
      Author: Jiri Kosina <jkosina@suse.cz>
      Date:   Tue Mar 19 09:56:57 2013 +0100
      
          drm/i915: stop using GMBUS IRQs on Gen4 chips
      
      The effect is that we have a storm of unclaimed interrupts on the
      legacy irq line. If that one is used by a different device then the
      kernel will complain and rather quickly kill the irq source. Which
      breaks any device trying to actually use the legacy irq line.
      
      This regression has been introduced
      
      commit 4aeebd74
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Oct 31 09:53:36 2013 +0100
      
          drm/i915: dp aux irq support for g4x/vlv
      
      Note that disabling MSI works around the issue, but we can't do that
      since apparently then the hw will miss interrupts. At least if
      relevant comments in i915_irq.c are accurate.
      
      v2: Cross-reference dp aux and gmbus gen4 comments.
      
      v3: Consolidate harder into i915_drv.h as suggested by Chris.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reported-and-tested-by: NJiri Kosina <jkosina@suse.cz>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4e6b788c
  11. 06 11月, 2013 2 次提交
  12. 01 10月, 2013 1 次提交
    • C
      drm/i915: Program GMBUS Frequency based on the CDCLK for VLV. · 24eb2d59
      Chon Ming Lee 提交于
      CDCLK is used to generate the gmbus clock.  This is normally done by
      BIOS. Program the value if the BIOS-less system doesn't do it.
      
      v2: Move this to intel_i2c_reset to allow reprogram the gmbus frequency
      during resume. (Daniel)
      
      v3: Change GMBUS_FREQ to GMBUSFREQ_VLV, and use VLV_DISPLAY_BASE.
      (Ville).
      	Remove cdclk_ratio[] table, and calculate the cdclk ratio instead.
      (Ville).
       	Change the shift then mask for reg read, to mask first, then shift.
      (Ville).
      	Remove the gmbus frequency calculation = cdclk/1.01.  Based on BIOS
      programming, gmbus frequency = cdclk frequency. (Ville)
      	Add get_disp_clk_div, which can use to get cdclk/czclk divide.
      
      v4: Fix the mmio_offset base for CZCLK_CDCLK_FREQ_RATIO, gmbus_freq
      calculation, and duplicate check for gmbus_freq. (Ville)
      
      In VLV, the spec is wrong about 4Mhz reference frequency for GMBUS. It
      should be 1Mhz.
      Signed-off-by: NChon Ming Lee <chon.ming.lee@intel.com>
      [danvet: Add the comment Ville suggested. Also appease checkpatch a
      bit.]
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      24eb2d59
  13. 23 8月, 2013 1 次提交
    • P
      drm/i915: allow package C8+ states on Haswell (disabled) · c67a470b
      Paulo Zanoni 提交于
      This patch allows PC8+ states on Haswell. These states can only be
      reached when all the display outputs are disabled, and they allow some
      more power savings.
      
      The fact that the graphics device is allowing PC8+ doesn't mean that
      the machine will actually enter PC8+: all the other devices also need
      to allow PC8+.
      
      For now this option is disabled by default. You need i915.allow_pc8=1
      if you want it.
      
      This patch adds a big comment inside i915_drv.h explaining how it
      works and how it tracks things. Read it.
      
      v2: (this is not really v2, many previous versions were already sent,
           but they had different names)
          - Use the new functions to enable/disable GTIMR and GEN6_PMIMR
          - Rename almost all variables and functions to names suggested by
            Chris
          - More WARNs on the IRQ handling code
          - Also disable PC8 when there's GPU work to do (thanks to Ben for
            the help on this), so apps can run caster
          - Enable PC8 on a delayed work function that is delayed for 5
            seconds. This makes sure we only enable PC8+ if we're really
            idle
          - Make sure we're not in PC8+ when suspending
      v3: - WARN if IRQs are disabled on __wait_seqno
          - Replace some DRM_ERRORs with WARNs
          - Fix calls to restore GT and PM interrupts
          - Use intel_mark_busy instead of intel_ring_advance to disable PC8
      v4: - Use the force_wake, Luke!
      v5: - Remove the "IIR is not zero" WARNs
          - Move the force_wake chunk to its own patch
          - Only restore what's missing from RC6, not everything
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c67a470b
  14. 22 5月, 2013 2 次提交
  15. 09 4月, 2013 1 次提交
    • B
      drm/i915: Don't touch South Display when PCH_NOP · ab5c608b
      Ben Widawsky 提交于
      Interrupts, clock gating, LVDS, and GMBUS are all within the, "this will
      be bad for CPU" range when we have PCH_NOP.
      
      There is a bit of a hack in init clock gating. We want to do most of the
      clock gating, but the part we skip will hang the system. It could
      probably be abstracted a bit better, but I don't feel it's too
      unsightly.
      
      v2: Use inverse HAS_PCH_NOP check (Jani)
      
      v3: Actually do what I claimed in v2 (spotted by Daniel)
      Merge Ivybridge IRQ handler PCH check to decrease whitespace (Daniel)
      Move LVDS bail into this patch (Ben)
      
      v4: logical rebase conflict resolution with SDEIIR (Ben)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      
      Brush up patch a bit and resolve conflicts:
      - Adjust PCH_NOP checks due to Egbert's hpd handling rework.
      - Addd a PCH_NOP check in the irq uninstall code.
      - Resolve conflicts with Paulo's SDE irq handling race fix.
      
      v5: Drop the added hunks in the ilk irq handler again, they're bogus.
      OOps.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab5c608b
  16. 20 3月, 2013 1 次提交
    • J
      drm/i915: stop using GMBUS IRQs on Gen4 chips · c12aba5a
      Jiri Kosina 提交于
      Commit 28c70f16 ("drm/i915: use the gmbus irq for waits") switched to
      using GMBUS irqs instead of GPIO bit-banging for chipset generations 4
      and above.
      
      It turns out though that on many systems this leads to spurious interrupts
      being generated, long after the register write to disable the IRQs has been
      issued.
      
      Typically this results in the spurious interrupt source getting
      disabled:
      
      [    9.636345] irq 16: nobody cared (try booting with the "irqpoll" option)
      [    9.637915] Pid: 4157, comm: ifup Tainted: GF            3.9.0-rc2-00341-g08637024 #422
      [    9.639484] Call Trace:
      [    9.640731]  <IRQ>  [<ffffffff8109b40d>] __report_bad_irq+0x1d/0xc7
      [    9.640731]  [<ffffffff8109b7db>] note_interrupt+0x15b/0x1e8
      [    9.640731]  [<ffffffff810999f7>] handle_irq_event_percpu+0x1bf/0x214
      [    9.640731]  [<ffffffff81099a88>] handle_irq_event+0x3c/0x5c
      [    9.640731]  [<ffffffff8109c139>] handle_fasteoi_irq+0x7a/0xb0
      [    9.640731]  [<ffffffff8100400e>] handle_irq+0x1a/0x24
      [    9.640731]  [<ffffffff81003d17>] do_IRQ+0x48/0xaf
      [    9.640731]  [<ffffffff8142f1ea>] common_interrupt+0x6a/0x6a
      [    9.640731]  <EOI>  [<ffffffff8142f952>] ? system_call_fastpath+0x16/0x1b
      [    9.640731] handlers:
      [    9.640731] [<ffffffffa000d771>] usb_hcd_irq [usbcore]
      [    9.640731] [<ffffffffa0306189>] yenta_interrupt [yenta_socket]
      [    9.640731] Disabling IRQ #16
      
      The really curious thing is now that irq 16 is _not_ the interrupt for
      the i915 driver when using MSI, but it _is_ the interrupt when not
      using MSI. So by all indications it seems like gmbus is able to
      generate a legacy (shared) interrupt in MSI mode on some
      configurations. I've tried to reproduce this and the differentiating
      thing seems to be that on unaffected systems no other device uses irq
      16 (which seems to be the non-MSI intel gfx interrupt on all gm45).
      
      I have no idea how that even can happen.
      
      To avoid tempting this elephant into a rage, just disable gmbus
      interrupt support on gen 4.
      
      v2: Improve the commit message with exact details of what's going on.
      Also add a comment in the code to warn against this particular
      elephant in the room.
      
      v3: Move the comment explaing how gen4 blows up next to the definition
      of HAS_GMBUS_IRQ to keep the code-flow straight. Suggested by Chris
      Wilson.
      
      Signed-off-by: Jiri Kosina <jkosina@suse.cz> (v1)
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      References: https://lkml.org/lkml/2013/3/8/325Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c12aba5a
  17. 25 1月, 2013 1 次提交
  18. 06 12月, 2012 4 次提交
    • D
      drm/i915: use _NOTRACE for gmbus/dp aux wait loops · ef04f00d
      Daniel Vetter 提交于
      Less clutter in the traces. And in both cases we yell rather loud
      into the logs if we time out. Patch suggested by Chris Wilson.
      
      v2: Annotate another I915_READ in dp_aux to be consistent - we filter
      out all register io in wait_for and similar loops. Chris also
      suggested to mark all dp_aux register access as _NOTRACE, but I think
      we should keep all functionally relevant access around, and filter
      unneeded bits in userspace after the trace is captured.
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ef04f00d
    • D
      drm/i915: use gmbus irq to wait for gmbus idle · 2c438c02
      Daniel Vetter 提交于
      GMBUS_ACTIVE has inverted sense and so doesn't fit into the
      wait_hw_status helper, hence create a new gmbus_wait_idle functions.
      Also, we only care about the idle irq event and nothing else, which
      allows us to use the wait_event_timeout helper directly without
      jumping through hoops to catch NAKs.
      
      Since gen2/3 don't have gmbus interrupts, handle them separately with
      the old wait_for macro.
      
      This shaves another few ms off reading EDID from a hdmi screen on my
      testbox here. EDID reading with interrupt driven gmbus is now as fast
      as with busy-looping gmbus at 28 ms here (with negligible cpu
      overhead).
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2c438c02
    • D
      drm/i915: use the gmbus irq for waits · 28c70f16
      Daniel Vetter 提交于
      We need two special things to properly wire this up:
      - Add another argument to gmbus_wait_hw_status to pass in the
        correct interrupt bit in gmbus4.
      - Since we can only get an irq for one of the two events we want,
        hand-roll the wait_event_timeout code so that we wake up every
        jiffie and can check for NAKs. This way we also subsume gmbus
        support for platforms without interrupts (or where those are not
        yet enabled).
      
      The important bit really is to only enable one gmbus interrupt source
      at the same time - with that piece of lore figured out, this seems to
      work flawlessly.
      
      Ben Widawsky rightfully complained the lack of measurements for the
      claimed benefits (especially since the first version was actually
      broken and fell back to bit-banging). Previously reading the 256 byte
      hdmi EDID takes about 72 ms here. With this patch it's down to 33 ms.
      Given that transfering the 256 bytes over i2c at wire speed takes
      20.5ms alone, the reduction in additional overhead is rather nice.
      
      v2: Chris Wilson wondered whether GMBUS4 might contain some set bits
      when booting up an hence result in some spurious interrupts. Since we
      clear GMBUS4 after every wait and we do gmbus transfer really early in
      the setup sequence to detect displays the window is small, but still
      be paranoid and clear it properly.
      
      v3: Clarify the comment that gmbus irq generation can only support one
      kind of event, why it bothers us and how we work around that limit.
      
      Cc: Daniel Kurtz <djkurtz@chromium.org>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      28c70f16
    • D
      drm/i915: extract gmbus_wait_hw_status · 61168c53
      Daniel Vetter 提交于
      The gmbus interrupt generation is rather fiddly: We can only ever
      enable one interrupt source (but we always want to check for NAK
      in addition to the real bit). And the bits in the gmbus status
      register don't map at all to the bis in the irq register.
      
      To prepare for this mess, start by extracting the hw status wait
      loop into it's own function, consolidate the NAK error handling a
      bit. To keep things flexible, pass in the status bit we care about
      (in addition to any NAK signalling).
      
      v2: I've failed to notice that the sense of GMBUS_ACTIVE is inverted,
      Chris Wilson gladly pointed that out for me. To keep things simple,
      ignore that case for  now (we only need to idle the gmbus controller
      at the end of an entire i2c transaction, not after every message).
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      61168c53
  19. 13 11月, 2012 1 次提交
    • C
      drm/i915/i2c: Track users of GMBUS force-bit · f2ce9faf
      Chris Wilson 提交于
      This fixes a regression for SDVO from
      
      commit fbfcc4f3
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Mon Oct 22 16:12:18 2012 +0300
      
          drm/i915/sdvo: restore i2c adapter config on intel_sdvo_init() failures
      
      As SDVOB and SDVOC are multiplexed on the same pin, if a chipset does
      not have the second SDVO encoder, it will then remove the force-bit
      setting on the common i2c adapter during teardown. All subsequent
      attempts of trying to use GMBUS with SDVOB then fail.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      [danvet: fixup inversion in the debug printout, noticed by Jani
      Nikulai.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f2ce9faf
  20. 03 10月, 2012 2 次提交
  21. 14 8月, 2012 1 次提交
  22. 26 7月, 2012 1 次提交
  23. 22 5月, 2012 1 次提交
  24. 20 5月, 2012 1 次提交
  25. 13 4月, 2012 6 次提交