1. 06 6月, 2012 4 次提交
  2. 05 6月, 2012 4 次提交
  3. 03 6月, 2012 1 次提交
    • D
      drm/i915: extract object active state flushing code · 30dfebf3
      Daniel Vetter 提交于
      Both busy_ioctl and the new wait_ioct need to do the same dance (or at
      least should). Some slight changes:
      - busy_ioctl now unconditionally checks for olr. Before emitting a
        require flush would have prevent the olr check and hence required a
        second call to the busy ioctl to really emit the request.
      - the timeout wait now also retires request. Not really required for
        abi-reasons, but makes a notch more sense imo.
      
      I've tested this by pimping the i-g-t test some more and also checking
      the polling behviour of the wait_rendering_timeout ioctl versus what
      busy_ioctl returns.
      
      v2: Too many people complained about unplug, new color is
      flush_active.
      
      v3: Kill the comment about the unplug moniker.
      
      v4: s/un-active/inactive/
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      30dfebf3
  4. 02 6月, 2012 1 次提交
  5. 01 6月, 2012 4 次提交
  6. 31 5月, 2012 26 次提交
    • D
      radeon: add radeon prime vmap support. · 63bc620b
      Dave Airlie 提交于
      This is the same as the nouveau code pretty much.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      63bc620b
    • D
      nouveau: add vmap support to nouveau prime support · 35916ace
      Dave Airlie 提交于
      Tested sharing to udl.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      35916ace
    • D
      udl: support vmapping imported dma-bufs · e8aa1d1e
      Dave Airlie 提交于
      This allows udl to get a vmapping of an imported buffer for scanout.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e8aa1d1e
    • D
      i915: add dma-buf vmap support for exporting vmapped buffer · 9a70cc2a
      Dave Airlie 提交于
      This is used to export a vmapping to the udl driver so that
      i915 and udl can share the udl scanout.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9a70cc2a
    • D
      radeon: add stub dma-buf mmap functionality · 946c7491
      Dave Airlie 提交于
      This just adds a stub until we have pieces in place to test
      a correct one.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      946c7491
    • D
      nouveau: add stub dma-buf mmap functionality. · e1bbc4bf
      Dave Airlie 提交于
      This just adds a stub until we have some users in place to test
      this with.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e1bbc4bf
    • D
      i915: add stub dma-buf mmap callback. · 2dad9d4d
      Dave Airlie 提交于
      This just adds a stub for now, until we have some users in
      place to test this functionality properly.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      2dad9d4d
    • B
      drm/i915: l3 parity sysfs interface · 84bc7581
      Ben Widawsky 提交于
      Dumb binary interfaces which allow root-only updates of the cache
      remapping registers. As mentioned in a previous patch, software using
      this interface needs to know about HW limits, and other programming
      considerations as the kernel interface does no checking for these things
      on the root-only interface.
      
      v1: Drop extra posting reads (Chris)
      Return negative values in the sysfs interfaces on errors (Chris)
      
      v2: Return -EINVAL for offset % 4 (Jesse)
      Move schizo userspace check out (Jesse)
      Cleaner sysfs item initializers (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      84bc7581
    • B
      drm/i915: remap l3 on hw init · b9524a1e
      Ben Widawsky 提交于
      If any l3 rows have been previously remapped, we must remap them after
      GPU reset/resume too.
      
      v2: Just return (no warn) on remapping init if not IVB (Jesse)
      Move the check of schizo userspace to i915_gem_l3_remap (Jesse)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b9524a1e
    • B
      drm/i915: enable parity error interrupts · 15b9f80e
      Ben Widawsky 提交于
      The previous patch put all the code, and handlers in place. It should
      now be safe to enable the parity error interrupt. The parity error must
      be unmasked in both the GTIMR, and the CS IMR. Unfortunately, the docs
      aren't clear about this; nevertheless it's the truth.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15b9f80e
    • B
      drm/i915: Dynamic Parity Detection handling · e3689190
      Ben Widawsky 提交于
      On IVB hardware we are given an interrupt whenever a L3 parity error
      occurs in the L3 cache. The L3 cache is used by internal GPU clients
      only.  This is a very rare occurrence (in fact to test this I need to
      use specially instrumented silicon).
      
      When a row in the L3 cache detects a parity error the HW generates an
      interrupt. The interrupt is masked in GTIMR until we get a chance to
      read some registers and alert userspace via a uevent. With this
      information userspace can use a sysfs interface (follow-up patch) to
      remap those rows.
      
      Way above my level of understanding, but if a given row fails, it is
      statistically more likely to fail again than a row which has not failed.
      Therefore it is desirable for an operating system to maintain a lifelong
      list of failing rows and always remap any bad rows on driver load.
      Hardware limits the number of rows that are remappable per bank/subbank,
      and should more than that many rows detect parity errors, software
      should maintain a list of the most frequent errors, and remap those
      rows.
      
      V2: Drop WARN_ON(IS_GEN6) (Jesse)
      DRM_DEBUG row/bank/subbank on errror (Jesse)
      Comment updates (Jesse)
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e3689190
    • D
      drm/i915: s/mdelay/msleep/ in the sdvo detect function · 6c982376
      Daniel Vetter 提交于
      A 30 ms delay is simply way too big to waste cpu cycles on.
      Acked-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6c982376
    • D
      drm/i915: reuse the sdvo tv clock adjustment in ilk mode_set · 61e9653f
      Daniel Vetter 提交于
      Jesse extracted this nice helper in his i9xx_crtc_mode_set refactor,
      but we have the identical code in ironlake_ccrtc_mode_set. And that
      function is huge, so extracting some code full of magic numbers is
      always nice.
      
      Noticed while trying to get a handle on our dp clock code.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      61e9653f
    • D
      drm/i915: there's no cxsr on ilk · e5153dc0
      Daniel Vetter 提交于
      Already discovered in
      
      commit 5a117db7
      Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
      Date:   Thu Jan 5 09:34:29 2012 -0200
      
          drm/i915: there is no pipe CxSR on ironlake
      
      but we've failed to rip out the code from the ironlake specific code.
      Reviewed-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e5153dc0
    • P
      drm/i915: add some barriers when changing DIPs · 9d9740f0
      Paulo Zanoni 提交于
      On IVB and older, we basically have two registers: the control and the
      data register. We write a few consecutitve times to the control
      register, and we need these writes to arrive exactly in the specified
      order.
      
      Also, when we're changing the data register, we need to guarantee that
      anything written to the control register already arrived (since
      changing the control register can change where the data register
      points to). Also, we need to make sure all the writes to the data
      register happen exactly in the specified order, and we also *can't*
      read the data register during this process, since reading and/or
      writing it will change the place it points to.
      
      So invoke the "better safe than sorry" rule and just be careful and
      put barriers everywhere :)
      
      On HSW we still have a control register that we write many times, but
      we have many data registers.
      Demanded-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9d9740f0
    • P
      drm/i915: remove comment about HSW HDMI DIPs · c30b6110
      Paulo Zanoni 提交于
      HSW support is now just like all the other generations: we send AVI
      and SPD InfoFrames. There are other DIPs for HSW, but there are other
      DIPs for the previous generations too. For each gen, we can see which
      DIPs are missing by looking at the 'set_infoframes' function: we
      explicitly disable the DIPs we're not using.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c30b6110
    • P
      drm/i915: don't set SDVO_BORDER_ENABLE when we're HDMI · b659c3db
      Paulo Zanoni 提交于
      The register that controls the HDMI port can be used to control the
      sDVO port. Some bits are defined only for sDVO, and SDVO_BORDER_ENABLE
      is one of those: HDMI ports that can't be used in sDVO mode don't even
      have this bit defined in their specifications.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b659c3db
    • P
      drm/i915: don't write 0 to DIP control at HDMI init · 9d32d165
      Paulo Zanoni 提交于
      At this time, the HDMI port is enabled, and the DIP control register
      specification says we need to disable the port *before* disabling the
      DIPs. Also, while doing this we risk telling the HW to send the AVI
      DIPs once (not every VSync), which really seems to confuse the HW and
      trigger bugs where the DIPs are not sent.
      
      This code was here just to set the DIP register to a 'known state'
      before using it, but since now the set_infoframes functions already
      set the control registers to a known state, this code can go away.
      
      Also, the previous code disables *all* the DIP registers for *each*
      HDMI port, so we end disabling each DIP register more than once.
      
      This patch solves a problem I can reproduce on my IVB machine. When I
      boot it with just a single HDMI monitor, the AVI InfoFrames are not
      sent. With this patch, the InfoFrames are sent. Previously, I wrote a
      patch to 'touch the DIP registers after we enable the HDMI port' to
      solve this same problem, but that patch doesn't seem to be needed
      anymore after this patch.
      
      All this patch does is revert a chunk of the following commit:
      
          commit 64a8fc01
          Author: Jesse Barnes <jbarnes@virtuousgeek.org>
          Date:   Thu Sep 22 11:16:00 2011 +0530
      
              drm/i915: fix ILK+ infoframe support
      
      So bugs that can be bisected to that commit may be fixed now.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43256Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9d32d165
    • P
      drm/i915: disable DIP while changing the port · 72b78c9d
      Paulo Zanoni 提交于
      The register specification says we need to do this.
      
      V2: Only write the register if the port is enabled.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      72b78c9d
    • P
      drm/i915: explicitly disable the DIPs we're not using · 0dd87d20
      Paulo Zanoni 提交于
      From this point on, the 'set_infoframe' functions always set the DIP
      registers to a known state, so anything done will always be undone at
      the modeset.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0dd87d20
    • P
      drm/i915: don't wait for vblank while writing InfoFrames · 5cde2a62
      Paulo Zanoni 提交于
      This function is called when the pipe is disabled, so it always gets
      the 50ms timeout.
      
      This function is called once for each InfoFrame, so we actually get a
      100ms timeout. Will be more if we add more InfoFrames.
      
      Also, the spec says we need to "wait for a VSync to ensure completion
      of any pending DIP transmissions", not for a VBlank. OTOH, the
      register documentation suggests that the DIPs are sent *during* the
      VSync, so shouldn't we be waiting until *after* the VSync to ensure
      all DIPs are sent?
      
      So this wait_for_vblank seems, besides useless, totally wrong.
      
      If we ever want to change some specific InfoFrame on-the-fly (outside
      of the modeset code), the code that changes the InfoFrame will have to
      do the waiting itself, and properly.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5cde2a62
    • P
      drm/i915: enable DIP before enabling each InfoFrame · 822974ae
      Paulo Zanoni 提交于
      So the write_infoframe function can assume the DIP is on.
      
      V2: Be more defensive and add WARN().
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      822974ae
    • P
      drm/i915: only set the HDMI port on the DIP once · f278d972
      Paulo Zanoni 提交于
      Not once for each InfoFrame. Now we have a function that allows us to
      do this.
      
      [danvet: Paulo clarified on irc that a later bugfix patch needs this
      cleanup.]
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f278d972
    • P
      drm/i915: properly alternate between DVI and HDMI · 0c14c7f9
      Paulo Zanoni 提交于
      This solves problems that happen when you alternate between HDMI and
      DVI on the same port. I can reproduce these problems using DP->HDMI
      and DP->DVI adapters on a DP port.
      
      When you first plug HDMI and then plug DVI, you need to stop sending
      DIPs, even if the port is in DVI mode (see the HDMI register spec). If
      you don't stop sending DIPs, you'll see a pink vertical line on the
      left side of the screen, some modes will give you a black screen, some
      modes won't work correctly.
      
      When you first plug DVI and then plug HDMI, you need to properly
      enable the DIPs, otherwise the HW won't send them. After spending a
      lot of time investigating this, I concluded that if the DIPs are
      disabled, we should not write to the DIP register again because when
      we do this, we also set the AVI InfoFrame frequency to "once", and
      this seems to really confuse our hardware. Since this problem was not
      exactly easy to debug, I'm adopting the defensive behavior and not
      just avoing the "disable twice" sequence, but also explicitly
      selecting the AVI InfoFrame and setting its frequency to a correct
      one.
      
      Also, move the "is_dvi" check from intel_set_infoframe to the
      set_infoframes functions since now they're going to be the first ones
      to deal with the DIP registers.
      
      This patch adds the code to fix the problem, but it depends on the
      removal of some code that can't be removed right now and will come
      later in the patch series. The patch that we need is:
        - drm/i915: don't write 0 to DIP control at HDMI init
      
      [danvet: Paulo clarified that this additional patch is only required
      to make the fix complete, this patch here alone doesn't introduce a
      regression but only partially solves the problem of randomly clearing
      the dip registers.]
      
      V2: Be even more defensive by selecting AVI and setting its frequency
      outside the "is_dvi" check.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0c14c7f9
    • P
      drm/i915: add set_infoframes to struct intel_hdmi · 687f4d06
      Paulo Zanoni 提交于
      We need a function that is able to fully 'set' the state of the DIP
      registers to a known state.
      
      Currently, we have the write_infoframe function that is called twice:
      once for AVI and once for SPD. The problem is that write_infoframe
      tries to keep the state of the DIP register as it is, changing only
      the minimum necessary bits. The second problem is that
      write_infoframe does twice (once for each time it is called) some
      work that should be done only once (like waiting for vblank and
      setting the port). If we add even more DIPs, it will do even more
      repeated work.
      
      This patch only adds the infrastructure keeping the code behavior the
      same as before.
      
      v2: add static keywords
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      687f4d06
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · af56e0aa
      Linus Torvalds 提交于
      Pull ceph updates from Sage Weil:
       "There are some updates and cleanups to the CRUSH placement code, a bug
        fix with incremental maps, several cleanups and fixes from Josh Durgin
        in the RBD block device code, a series of cleanups and bug fixes from
        Alex Elder in the messenger code, and some miscellaneous bounds
        checking and gfp cleanups/fixes."
      
      Fix up trivial conflicts in net/ceph/{messenger.c,osdmap.c} due to the
      networking people preferring "unsigned int" over just "unsigned".
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (45 commits)
        libceph: fix pg_temp updates
        libceph: avoid unregistering osd request when not registered
        ceph: add auth buf in prepare_write_connect()
        ceph: rename prepare_connect_authorizer()
        ceph: return pointer from prepare_connect_authorizer()
        ceph: use info returned by get_authorizer
        ceph: have get_authorizer methods return pointers
        ceph: ensure auth ops are defined before use
        ceph: messenger: reduce args to create_authorizer
        ceph: define ceph_auth_handshake type
        ceph: messenger: check return from get_authorizer
        ceph: messenger: rework prepare_connect_authorizer()
        ceph: messenger: check prepare_write_connect() result
        ceph: don't set WRITE_PENDING too early
        ceph: drop msgr argument from prepare_write_connect()
        ceph: messenger: send banner in process_connect()
        ceph: messenger: reset connection kvec caller
        libceph: don't reset kvec in prepare_write_banner()
        ceph: ignore preferred_osd field
        ceph: fully initialize new layout
        ...
      af56e0aa