1. 01 10月, 2013 2 次提交
  2. 25 9月, 2013 1 次提交
    • D
      drm/i915/tv: clear adjusted_mode.flags · 1062b815
      Daniel Vetter 提交于
      The native TV encoder has it's own flags to adjust sync modes and
      enabled interlaced modes which are totally irrelevant for the adjusted
      mode. This worked out nicely since the input modes used by both the
      load detect code and reported in the ->get_modes callbacks all have no
      flags set, and we also don't fill out any of them in the ->get_config
      callback.
      
      This changed with the additional sanitation done with
      
      commit 2960bc9c
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Tue Jul 30 13:36:32 2013 +0300
      
          drm/i915: make user mode sync polarity setting explicit
      
      sinc now the "no flags at all" state wouldn't fit through core code
      any more. So fix this up again by explicitly clearing the flags in the
      ->compute_config callback.
      
      Aside: We have zero checking in place to make sure that the requested
      mode is indeed the right input mode we want for the selected TV mode.
      So we'll happily fall over if userspace tries to pull us.  But that's
      definitely work for a different patch series. So just add a FIXME
      comment for now.
      Reported-by: NKnut Petersen <Knut_Petersen@t-online.de>
      Cc: Knut Petersen <Knut_Petersen@t-online.de>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Tested-by: NKnut Petersen <Knut_Petersen@t-online.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1062b815
  3. 05 8月, 2013 1 次提交
  4. 24 7月, 2013 1 次提交
  5. 05 6月, 2013 1 次提交
    • D
      drm/i915: consolidate and tighten encoder cloning checks · accfc0c5
      Daniel Vetter 提交于
      Only lvds/tv did actually check for cloning or not, but many more
      places should.
      
      Notices because my ivb tried to enable both cpu edp and vga on the
      first crtc - the resulting confusion between has_pch_encoder,
      has_dp_encoder but not actually being a pch dp encoder resulting in
      hilarity (hitting a BUG).
      
      We _really_ need an igt to random-walk our modeset space more
      exhaustively.
      
      The bug seems to have been exposed due to a race in the hw load
      detection support for VGA: Right after a hotplug VGA was still
      detected as connected, but obviously reading the EDID wasn't possible
      any more. Hence why restarting X a bit later fixed things. Due to the
      1024x756 fallback resolution suddenly more outputs had the same
      resolution.
      
      On top of that SNA was confused with the possible_clones mask, trying
      to clone outputs which cannot be cloned. That bug is now fixed with
      
      commit fc1e0702b25e647cb423851fb7228989fec28bd6
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Wed May 29 11:25:28 2013 +0100
      
          sna: fixup up possible_clones kms->X impedance mismatch
      
      v2: Kill intel_encoder_check_is_cloned, spotted by Paulo.
      
      v3: Drop the now unused pipe param.
      
      v4: Kill the stray printk Chris spotted.
      
      v5: Elaborate on how the bug in userspace happened and why it was racy
      to reproduce.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      accfc0c5
  6. 11 5月, 2013 1 次提交
  7. 18 4月, 2013 1 次提交
    • E
      drm/i915: (re)init HPD interrupt storm statistics · 821450c6
      Egbert Eich 提交于
      When an encoder is shared on several connectors there is only
      one hotplug line, thus this line needs to be shared among these
      connectors.
      If HPD detect only works reliably on a subset of those connectors,
      we want to poll the others. Thus we need to make sure that storm
      detection doesn't mess up the settings for those connectors.
      Therefore we store the settings in the intel_connector struct and
      restore them from there.
      If nothing is set but the encoder has a hpd_pin set we assume this
      connector is hotplug capable.
      On init/reset we make sure the polled state of the connectors
      is (re)set to the default value, the HPD interrupts are marked
      enabled.
      Signed-off-by: NEgbert Eich <eich@suse.de>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      821450c6
  8. 28 3月, 2013 1 次提交
    • D
      drm/i915: clean up pipe bpp confusion · 5d2d38dd
      Daniel Vetter 提交于
      - gen4 and earlier (save for g4x) only really have a 8bpc pipe, with
        the possibility to dither to 6bpc using the panel fitter
      - g4x has hdmi, but no 12 bpc pipe ... !? Clamp hdmi accordingly.
      - TV/SDVO out are the only connectors available on platforms with
        a pipe bpp != 8, add code to force the pipe to 8bpc unconditionally.
      
      <rant>
      The dither handling on gmch platforms is one giant disaster. I'm hoping
      somewhat that vlv enabling will fix this up, but given that the 6bpc
      handling for edp was simply added with another quick hack, I don't have
      high hopes ...
      </rant>
      
      v2: Neither vlv nor g4x have 12bpc pipes. Still set pipe_bpp to 12*3,
      but let the crtc code clamp things down to 10bpc on these platforms.
      
      v3: Fix a bpc vs. bpp mixup in the gen4 and earlier pipe_bpp limiter
      code.
      
      v4: Drop the hunk in intel_hdmi.c about g4x/vlv 12bpc, it was wrong.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5d2d38dd
  9. 14 2月, 2013 1 次提交
  10. 21 12月, 2012 1 次提交
  11. 22 11月, 2012 1 次提交
  12. 12 11月, 2012 1 次提交
  13. 03 10月, 2012 2 次提交
  14. 06 9月, 2012 6 次提交
  15. 17 8月, 2012 1 次提交
  16. 26 7月, 2012 1 次提交
    • D
      drm/i915: simplify possible_clones computation · 66a9278e
      Daniel Vetter 提交于
      Intel hw only has one MUX for encoders, so outputs are either not
      cloneable or all in the same group of cloneable outputs. This neatly
      simplifies the code and allows us to ditch some ugly if cascades in
      the dp and hdmi init code (well, we need these if cascades for other
      stuff still, but that can be taken care of in follow-up patches).
      
      Note that this changes two things:
      - dvo can now be cloned with sdvo, but dvo is gen2 whereas sdvo is
        gen3+, so no problem. Note that the old code had a bug and didn't
        allow cloning crt with dvo (but only the other way round).
      - sdvo-lvds can now be cloned with sdvo-non-tv. Spec says this won't
        work, but the only reason I've found is that you can't use the
        panel-fitter (used for lvds upscaling) with anything else. But we
        don't use the panel fitter for sdvo-lvds. Imo this part of Bspec is
        a) rather confusing b) mostly as a guideline to implementors (i.e.
        explicitly stating what is already implicit from the spec, without
        always going into the details of why). So I think we can ignore this
        - worst case we'll get a bug report from a user with with sdvo-lvds
        and sdvo-tmds and have to add that special case back in.
      
      Because sdvo lvds is a bit special explain in comments why sdvo LVDS
      outputs can be cloned, but native LVDS and eDP can't be cloned - we
      use the panel fitter for the later, but not for sdvo.
      
      Note that this also uncoditionally initializes the panel_vdd work used
      by eDP. Trying to be clever doesn't buy us anything (but strange bugs)
      and this way we can kill the is_edp check.
      
      v2: Incorporate review from Paulo
      - Add in a missing space.
      - Pimp comment message to address his concerns.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66a9278e
  17. 20 7月, 2012 1 次提交
  18. 05 7月, 2012 1 次提交
  19. 24 5月, 2012 2 次提交
    • R
      drm/i915: Adding TV Out Missing modes. · 9589919f
      Rodrigo Vivi 提交于
      These 2 modes were removed by mistake during a clean up.
      So, now it is time to add them back. For further info about
      supported mode and standard timing table please check:
      VOL_3_display_registers_updated.pdf at intellinuxgraphics.org.
      
      Note that this regression has been introduce in
      
      commit 55a6713b
      Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
      Date:   Thu Dec 15 14:47:33 2011 -0200
      
          drm/i915: Removing TV Out modes.
      
      and this commit partially reverts it by re-adding the wrongly removed
      modes.
      Reported-by: NRobert Lowery <rglowery@exemail.com.au>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Pimped commit message to cite the commit that introduced this
      regression.]
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9589919f
    • D
      drm/i915: wait for a vblank to pass after tv detect · bf2125e2
      Daniel Vetter 提交于
      Otherwise the hw will get confused and result in a black screen.
      
      This regression has been most likely introduce in
      
      commit 974b9331
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Sun Sep 5 00:44:20 2010 +0100
      
          drm/i915/tv: Poll for DAC state change
      
      That commit replace the first msleep(20) with a busy-loop, but failed
      to keep the 2nd msleep around. Later on we've replaced all these
      msleep(20) by proper vblanks.
      
      For reference also see the commit in xf86-video-intel:
      
      commit 1142be53eb8d2ee8a9b60ace5d49f0ba27332275
      Author: Jesse Barnes <jbarnes@hobbes.lan>
      Date:   Mon Jun 9 08:52:59 2008 -0700
      
          Fix TV programming:  add vblank wait after TV_CTL writes
      
          Fxies FDO bug #14000; we need to wait for vblank after
          writing TV_CTL or following "DPMS on" calls may not actually enable the output.
      
      v2: As suggested by Chris Wilson, add a small comment to ensure that
      no one accidentally removes this vblank wait again - there really
      seems to be no sane explanation for why we need it, but it is
      required.
      
      Launchpad: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/763688Reported-and-Tested-by: NRobert Lowery <rglowery@exemail.com.au>
      Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
      Cc: stable@vger.kernel.org
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bf2125e2
  20. 04 5月, 2012 1 次提交
    • D
      drm/i915: rip out unnecessary calls to drm_mode_set_crtcinfo · f7bacf19
      Daniel Vetter 提交于
      Our handling of the crtc timing computation has been nicely
      cargo-culted with calls to drm_mode_set_crtcinfo sprinkled all over
      the place. But with
      
      commit f9bef081
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun Apr 15 19:53:19 2012 +0200
      
          drm/i915: don't clobber the special upscaling lvds timings
      
      and
      
      commit ca9bfa7e
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Jan 28 14:49:20 2012 +0100
      
          drm/i915: fixup interlaced vertical timings confusion, part 1
      
      we now only set the crtc timing fields in the encoder->mode_fixup
      (lvds only) and in crtc->mode_fixup (for everyone else). And since
      
      commit 75c13993
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Jan 28 23:48:46 2012 +0100
      
          drm/i915: fixup overlay checks for interlaced modes
      
      the only places we actually need the crtc timings is in the mode_set
      function.
      
      I guess the idea of the drm core is that every time it creates a drm
      mode, it also sets the timings. But afaics it never uses them, safe
      for the precise vblank timestamp code (but that can only run on active
      modes, i.e.  after our mode_fixup functions have been called). The
      problem is that drm core always sets CRTC_INTERLACE_HALVE_V, so the
      timings are pretty much bogus for us anyway (at least with interlaced
      support).
      
      So I guess it's the drivers job that every active modes needs to have
      crtc timings that suits it, and with these patches we should have
      that. drm core doesn't seem to care about modes that just get passed
      around. Hence we can now safely rip out all the remaining calls to
      set_crtcinfo left in the driver and clean up this confusion.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f7bacf19
  21. 03 5月, 2012 1 次提交
  22. 20 4月, 2012 1 次提交
  23. 27 3月, 2012 1 次提交
  24. 11 2月, 2012 1 次提交
    • D
      drm/i915: fixup interlaced vertical timings confusion, part 1 · ca9bfa7e
      Daniel Vetter 提交于
      We have a pretty decent confusion about vertical timings of interlaced
      modes. Peter Ross has written a patch that makes interlace modes work
      on a lot more platforms/output combinations by doubling the vertical
      timings.
      
      The issue with that patch is that core drm _does_ support specifying
      whether we want these vertical timings in fields or frames, we just
      haven't managed to consistently use this facility. The relavant
      function is drm_mode_set_crtcinfo, which fills in the crtc timing
      information.
      
      The first thing to note is that the drm core keeps interlaced modes in
      frames, but displays modelines in fields. So when the crtc modeset
      helper copies over the mode into adjusted_mode it will already contain
      vertical timings in half-frames. The result is that the fixup code in
      intel_crtc_mode_fixup doesn't actually do anything (in most cases at
      least).
      
      Now gen3+ natively supports interlaced modes and wants the vertical
      timings in frames. Which is what sdvo already fixes up, at least under
      some conditions.
      
      There are a few other place that demand vertical timings in fields
      but never actually deal with interlaced modes, so use frame timings
      for consistency, too. These are:
      - lvds panel,
      - dvo encoders - dvo is the only way gen2 could support interlaced
        mode, but currently we don't support any encoders that do.
      - tv out - despite that the tv dac sends out an interlaced signal it
        expects a progressive mode pipe configuration.
      All these encoders enforce progressive modes by resetting
      interlace_allowed.
      
      Hence we always want crtc vertical timings in frames. Enforce this in
      our crtc mode_fixup function and rip out any redudant timing
      computations from the encoders' mode_fixup function.
      
      v2-4: Adjust the vertical timings a bit.
      
      v5: Split out the 'subtract-one for interlaced' fixes.
      
      v6: Clarify issues around tv-out and gen2.
      Reviewed-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NChristopher Egert <cme3000@gmail.com>
      Tested-by: NAlfonso Fiore <alfonso.fiore@gmail.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ca9bfa7e
  25. 07 1月, 2012 2 次提交
  26. 20 9月, 2011 1 次提交
  27. 14 7月, 2011 2 次提交
  28. 11 5月, 2011 2 次提交
  29. 13 4月, 2011 1 次提交