1. 04 1月, 2012 2 次提交
    • E
      drm/i915: Add support for resetting the SO write pointers on gen7. · ae662d31
      Eric Anholt 提交于
      These registers are automatically incremented by the hardware during
      transform feedback to track where the next streamed vertex output
      should go.  Unlike the previous generation, which had a packet for
      setting the corresponding registers to a defined value, gen7 only has
      MI_LOAD_REGISTER_IMM to do so.  That's a secure packet (since it loads
      an arbitrary register), so we need to do it from the kernel, and it
      needs to be settable atomically with the batchbuffer execution so that
      two clients doing transform feedback don't stomp on each others'
      state.
      
      Instead of building a more complicated interface involcing setting the
      registers to a specific value, just set them to 0 when asked and
      userland can tweak its pointers accordingly.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NEugeni Dodonov <eugeni.dodonov@intel.com>
      Reviewed-by: NKenneth Graunke <kenneth@whitecape.org>
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      ae662d31
    • J
      drm/i915: add color key support v4 · 8ea30864
      Jesse Barnes 提交于
      Add new ioctls for getting and setting the current destination color
      key.  This allows for simple overlay display control by matching a color
      key value in the primary plane before blending the overlay on top.
      
      v2: remove unnecessary mutex acquire/release around reg accesses
      v3: add support for full color key management
      v4: fix copy & paste bug in snb_get_colorkey
          don't bother checking min/max values against docs as the docs are likely
          wrong (how could we handle 10bpc surface formats?)
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      8ea30864
  2. 29 12月, 2011 2 次提交
    • S
      drm/exynos: added hdmi display support · d8408326
      Seung-Woo Kim 提交于
      This patch is hdmi display support for exynos drm driver.
      
      There is already v4l2 based exynos hdmi driver in drivers/media/video/s5p-tv
      and some low level code is already in s5p-tv and even headers for register
      define are almost same. but in this patch, we decide not to consider separated
      common code with s5p-tv.
      
      Exynos HDMI is composed of 5 blocks, mixer, vp, hdmi, hdmiphy and ddc.
      
      1. mixer. The piece of hardware responsible for mixing and blending multiple
      data inputs before passing it to an output device.  The mixer is capable of
      handling up to three image layers. One is the output of VP.  Other two are
      images in RGB format.  The blending factor, and layers' priority are controlled
      by mixer's registers. The output is passed to HDMI.
      
      2. vp (video processor). It is used for processing of NV12/NV21 data.  An image
      stored in RAM is accessed by DMA. The output in YCbCr444 format is send to
      mixer.
      
      3. hdmi. The piece of HW responsible for generation of HDMI packets. It takes
      pixel data from mixer and transforms it into data frames. The output is send
      to HDMIPHY interface.
      
      4. hdmiphy. Physical interface for HDMI. Its duties are sending HDMI packets to
      HDMI connector. Basically, it contains a PLL that produces source clock for
      mixer, vp and hdmi.
      
      5. ddc (display data channel). It is dedicated i2c channel to exchange display
      information as edid with display monitor.
      
      With plane support, exynos hdmi driver fully supports two mixer layes and vp
      layer. Also vp layer supports multi buffer plane pixel formats having non
      contigus memory spaces.
      
      In exynos drm driver, common drm_hdmi driver to interface with drm framework
      has opertion pointers for mixer and hdmi. this drm_hdmi driver is registered as
      sub driver of exynos_drm. hdmi has hdmiphy and ddc i2c clients and controls
      them. mixer controls all overlay layers in both mixer and vp.
      
      Vblank interrupts for hdmi are handled by mixer internally because drm
      framework cannot support multiple irq id. And pipe number is used to check
      which display device irq happens.
      
      History
      v2: this version
       - drm plane feature support to handle overlay layers.
       - multi buffer plane pixel format support for vp layer.
       - vp layer support
      
      RFCv1: original
       - at https://lkml.org/lkml/2011/11/4/164Signed-off-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      d8408326
    • S
      drm: Add multi buffer plane pixel formats · 83052d4d
      Seung-Woo Kim 提交于
      Multi buffer plane pixel format has seperated memory spaces for each
      plane. For example, NV12M has Y plane and CbCr plane and these are in
      non contiguous memory region. Compared with NV12, NV12M's memory shape
      is like following.
      NV12  : ______(Y)(CbCr)_______
      NV12M : __(Y)_ ..... _(CbCr)__
      Signed-off-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      83052d4d
  3. 22 12月, 2011 6 次提交
  4. 21 12月, 2011 2 次提交
  5. 20 12月, 2011 5 次提交
  6. 17 12月, 2011 1 次提交
    • E
      iommu: Export intel_iommu_enabled to signal when iommu is in use · 8bc1f85c
      Eugeni Dodonov 提交于
      In i915 driver, we do not enable either rc6 or semaphores on SNB when dmar
      is enabled. The new 'intel_iommu_enabled' variable signals when the
      iommu code is in operation.
      
      Cc: Ted Phelps <phelps@gnusto.com>
      Cc: Peter <pab1612@gmail.com>
      Cc: Lukas Hejtmanek <xhejtman@fi.muni.cz>
      Cc: Andrew Lutomirski <luto@mit.edu>
      CC: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      8bc1f85c
  7. 15 12月, 2011 1 次提交
  8. 14 12月, 2011 1 次提交
  9. 13 12月, 2011 1 次提交
    • L
      linux/log2.h: Fix rounddown_pow_of_two(1) · 13c07b02
      Linus Torvalds 提交于
      Exactly like roundup_pow_of_two(1), the rounddown version was buggy for
      the case of a compile-time constant '1' argument.  Probably because it
      originated from the same code, sharing history with the roundup version
      from before the bugfix (for that one, see commit 1a06a52e: "Fix
      roundup_pow_of_two(1)").
      
      However, unlike the roundup version, the fix for rounddown is to just
      remove the broken special case entirely.  It's simply not needed - the
      generic code
      
          1UL << ilog2(n)
      
      does the right thing for the constant '1' argment too.  The only reason
      roundup needed that special case was because rounding up does so by
      subtracting one from the argument (and then adding one to the result)
      causing the obvious problems with "ilog2(0)".
      
      But rounddown doesn't do any of that, since ilog2() naturally truncates
      (ie "rounds down") to the right rounded down value.  And without the
      ilog2(0) case, there's no reason for the special case that had the wrong
      value.
      
      tl;dr: rounddown_pow_of_two(1) should be 1, not 0.
      Acked-by: NDmitry Torokhov <dtor@vmware.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      13c07b02
  10. 11 12月, 2011 1 次提交
  11. 09 12月, 2011 1 次提交
  12. 07 12月, 2011 1 次提交
    • A
      fix apparmor dereferencing potentially freed dentry, sanitize __d_path() API · 02125a82
      Al Viro 提交于
      __d_path() API is asking for trouble and in case of apparmor d_namespace_path()
      getting just that.  The root cause is that when __d_path() misses the root
      it had been told to look for, it stores the location of the most remote ancestor
      in *root.  Without grabbing references.  Sure, at the moment of call it had
      been pinned down by what we have in *path.  And if we raced with umount -l, we
      could have very well stopped at vfsmount/dentry that got freed as soon as
      prepend_path() dropped vfsmount_lock.
      
      It is safe to compare these pointers with pre-existing (and known to be still
      alive) vfsmount and dentry, as long as all we are asking is "is it the same
      address?".  Dereferencing is not safe and apparmor ended up stepping into
      that.  d_namespace_path() really wants to examine the place where we stopped,
      even if it's not connected to our namespace.  As the result, it looked
      at ->d_sb->s_magic of a dentry that might've been already freed by that point.
      All other callers had been careful enough to avoid that, but it's really
      a bad interface - it invites that kind of trouble.
      
      The fix is fairly straightforward, even though it's bigger than I'd like:
      	* prepend_path() root argument becomes const.
      	* __d_path() is never called with NULL/NULL root.  It was a kludge
      to start with.  Instead, we have an explicit function - d_absolute_root().
      Same as __d_path(), except that it doesn't get root passed and stops where
      it stops.  apparmor and tomoyo are using it.
      	* __d_path() returns NULL on path outside of root.  The main
      caller is show_mountinfo() and that's precisely what we pass root for - to
      skip those outside chroot jail.  Those who don't want that can (and do)
      use d_path().
      	* __d_path() root argument becomes const.  Everyone agrees, I hope.
      	* apparmor does *NOT* try to use __d_path() or any of its variants
      when it sees that path->mnt is an internal vfsmount.  In that case it's
      definitely not mounted anywhere and dentry_path() is exactly what we want
      there.  Handling of sysctl()-triggered weirdness is moved to that place.
      	* if apparmor is asked to do pathname relative to chroot jail
      and __d_path() tells it we it's not in that jail, the sucker just calls
      d_absolute_path() instead.  That's the other remaining caller of __d_path(),
      BTW.
              * seq_path_root() does _NOT_ return -ENAMETOOLONG (it's stupid anyway -
      the normal seq_file logics will take care of growing the buffer and redoing
      the call of ->show() just fine).  However, if it gets path not reachable
      from root, it returns SEQ_SKIP.  The only caller adjusted (i.e. stopped
      ignoring the return value as it used to do).
      Reviewed-by: NJohn Johansen <john.johansen@canonical.com>
      ACKed-by: NJohn Johansen <john.johansen@canonical.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: stable@vger.kernel.org
      02125a82
  13. 06 12月, 2011 16 次提交