1. 05 5月, 2014 5 次提交
  2. 29 3月, 2014 1 次提交
  3. 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
  4. 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
  5. 13 2月, 2014 1 次提交
  6. 19 11月, 2013 1 次提交
  7. 10 10月, 2013 1 次提交
  8. 09 10月, 2013 1 次提交
  9. 01 10月, 2013 4 次提交
    • P
      drm/i915: destroy connector sysfs files earlier · d9255d57
      Paulo Zanoni 提交于
      For some reason, every single time I try to run module_reload
      something tries to read the connector sysfs files. This happens
      after we destroy the encoders and before we destroy the connectors, so
      when the sysfs read triggers the connector detect() function,
      intel_conector->encoder points to memory that was already freed.
      
      The bad backtrace is just:
          [<ffffffff8163ca9a>] dump_stack+0x54/0x74
          [<ffffffffa00c2c8e>] intel_dp_detect+0x1e/0x4b0 [i915]
          [<ffffffffa001913d>] status_show+0x3d/0x80 [drm]
          [<ffffffff813d5340>] dev_attr_show+0x20/0x60
          [<ffffffff81221f50>] ? sysfs_read_file+0x80/0x1b0
          [<ffffffff81221f79>] sysfs_read_file+0xa9/0x1b0
          [<ffffffff811aaf1e>] vfs_read+0x9e/0x170
          [<ffffffff811aba4c>] SyS_read+0x4c/0xa0
          [<ffffffff8164e392>] system_call_fastpath+0x16/0x1b
      
      But if you add tons of memory checking debug options to your Kernel
      you'll also see:
       - general protection fault: 0000
       - BUG kmalloc-4096 (Tainted: G      D W   ): Poison overwritten
       - INFO: Allocated in intel_ddi_init+0x65/0x270 [i915]
       - INFO: Freed in intel_dp_encoder_destroy+0x69/0xb0 [i915]
      Among a bunch of other error messages.
      
      So this commit just destroys the sysfs files before both the encoder
      and connectors are freed.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9255d57
    • D
      drm/i915: Use crtc_clock with the adjusted mode · 241bfc38
      Damien Lespiau 提交于
      struct drm_mode_display now has a separate crtc_ version of the clock to
      be used when we're talking about the timings given to the harwadre (was
      far as the mode is concerned).
      
      This commit is really the result of a git grep adjusted_mode.*clock and
      replacing those by adjusted_mode.crtc_clock. No functional change.
      
      v2: Rebased on drm-intel-queued-next
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Acked-by: NDave Airlie <airlied@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      241bfc38
    • P
      drm/i915: VBT's child_device_config changes over time · 768f69c9
      Paulo Zanoni 提交于
      We currently treat the child_device_config as a simple struct, but
      this is not correct: new BDB versions change the meaning of some
      offsets, so the struct needs to be adjusted for each version.
      
      Since there are too many changes (today we're in version 170!), making
      a big versioned union would be too complicated, so child_device_config
      is now a union of 3 things: (i) a "raw" byte array that's safe to use
      anywhere; (ii)  an "old" structure that's the one we've been using and
      should be safe to keep in the SDVO and TV code; and (iii) a "common"
      structure that should contain only fields that are common for all the
      known VBT versions.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      768f69c9
    • D
      drm/i915: use pointer = k[cmz...]alloc(sizeof(*pointer), ...) pattern · b14c5679
      Daniel Vetter 提交于
      Done while reviewing all our allocations for fubar. Also a few errant
      cases of lacking () for the sizeof operator - just a bit of OCD.
      
      I've left out all the conversions that also should use kcalloc from
      this patch  (it's only 2).
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b14c5679
  10. 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
  11. 05 8月, 2013 1 次提交
  12. 24 7月, 2013 1 次提交
  13. 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
  14. 11 5月, 2013 1 次提交
  15. 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
  16. 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
  17. 14 2月, 2013 1 次提交
  18. 21 12月, 2012 1 次提交
  19. 22 11月, 2012 1 次提交
  20. 12 11月, 2012 1 次提交
  21. 03 10月, 2012 2 次提交
  22. 06 9月, 2012 6 次提交
  23. 17 8月, 2012 1 次提交
  24. 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
  25. 20 7月, 2012 1 次提交
  26. 05 7月, 2012 1 次提交
  27. 24 5月, 2012 1 次提交
    • 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