1. 29 5月, 2015 1 次提交
  2. 26 5月, 2015 2 次提交
  3. 22 5月, 2015 1 次提交
  4. 14 4月, 2015 1 次提交
    • A
      drm/nouveau/gem: allow user-space to specify an object should be coherent · 996f545f
      Alexandre Courbot 提交于
      User-space use mappable BOs notably for fences, and expects that a
      value update by the GPU will be immediatly visible through the
      user-space mapping.
      
      ARM has a property that may prevent this from happening though: memory
      can be mapped multiple times only if the different mappings share the
      same caching properties. However all the lowmem memory is already
      identity-mapped into the kernel with cache enabled, so when user-space
      requests an uncached mapping, we actually get an "undefined caching
      policy" one and this has strange side-effects described on Freedesktop
      bug 86690.
      
      To prevent this from happening, allow user-space to explicitly specify
      which objects should be coherent, and create such objects with the
      TTM_PL_FLAG_UNCACHED flag. This will make TTM allocate memory using the
      DMA API, which will fix the identify mapping and allow us to safely map
      the objects to user-space uncached.
      Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
      Reviewed-by: NLucas Stach <dev@lynxeye.de>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      996f545f
  5. 10 4月, 2015 1 次提交
  6. 03 4月, 2015 1 次提交
  7. 27 3月, 2015 1 次提交
  8. 20 3月, 2015 3 次提交
  9. 18 3月, 2015 3 次提交
  10. 28 2月, 2015 1 次提交
  11. 14 2月, 2015 2 次提交
    • T
      drm/i915: Add tiled framebuffer modifiers · 93b81f51
      Tvrtko Ursulin 提交于
      To be used from the new addfb2 extension.
      
      v2:
      - Drop Intel-specific untiled modfier.
      - Move to drm_fourcc.h.
      - Document layouts a bit and denote them as platform-specific and not
        useable for cross-driver sharing.
      - Add Y-tiling for completeness.
      - Drop special docstring markers to avoid confusing kerneldoc.
      
      v3: Give Y-tiling a unique idea, noticed by Tvrtko.
      
      Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      93b81f51
    • R
      drm: add support for tiled/compressed/etc modifier in addfb2 · e3eb3250
      Rob Clark 提交于
      In DRM/KMS we are lacking a good way to deal with tiled/compressed
      formats.  Especially in the case of dmabuf/prime buffer sharing, where
      we cannot always rely on under-the-hood flags passed to driver specific
      gem-create ioctl to pass around these extra flags.
      
      The proposal is to add a per-plane format modifier.  This allows to, if
      necessary, use different tiling patters for sub-sampled planes, etc.
      The format modifiers are added at the end of the ioctl struct, so for
      legacy userspace it will be zero padded.
      
      v1: original
      v1.5: increase modifier to 64b
      
      v2: Incorporate review comments from the big thread, plus a few more.
      
      - Add a getcap so that userspace doesn't have to jump through hoops.
      - Allow modifiers only when a flag is set. That way drivers know when
        they're dealing with old userspace and need to fish out e.g. tiling
        from other information.
      - After rolling out checks for ->modifier to all drivers I've decided
        that this is way too fragile and needs an explicit opt-in flag. So
        do that instead.
      - Add a define (just for documentation really) for the "NONE"
        modifier. Imo we don't need to add mask #defines since drivers
        really should only do exact matches against values defined with
        fourcc_mod_code.
      - Drop the Samsung tiling modifier on Rob's request since he's not yet
        sure whether that one is accurate.
      
      v3:
      - Also add a new ->modifier[] array to struct drm_framebuffer and fill
        it in drm_helper_mode_fill_fb_struct. Requested by Tvrkto Uruslin.
      - Remove TODO in comment and add code comment that modifiers should be
        properly documented, requested by Rob.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Daniel Stone <daniel@fooishbar.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Signed-off-by: Rob Clark <robdclark@gmail.com> (v1.5)
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Acked-by: NDave Airlie <airlied@redhat.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      e3eb3250
  12. 04 2月, 2015 1 次提交
    • D
      drm: remove DRM_FORMAT_NV12MT · 083500ba
      Daniel Vetter 提交于
      So this has been merged originally in
      
      commit 83052d4d
      Author: Seung-Woo Kim <sw0312.kim@samsung.com>
      Date:   Thu Dec 15 15:40:55 2011 +0900
      
          drm: Add multi buffer plane pixel formats
      
      which hasn't seen a lot of review really. The problem is that it's not
      a real pixel format, but just a different way to lay out NV12 pixels
      in macroblocks, i.e. a tiling format.
      
      The new way of doing this is with the soon-to-be-merged fb modifiers.
      
      This was brough up in some long irc discussion around the entire
      topic, as an example of where things have gone wrong. Luckily we can
      correct the mistake:
      - The kms side support for NV12MT is all dead code because
        format_check in drm_crtc.c never accepted NV12MT.
      - The gem side for the gsc support doesn't look better: The code
        forgets to set the pixel format and makes a big mess with the tiling
        mode bits, inadvertedly setting them all.
      
      Conclusion: This never really worked (at least not in upstream) and
      hence we can safely correct our mistake here.
      
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Rob Clark <robclark@freedesktop.org>
      Cc: Daniel Stone <daniel@fooishbar.org>
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NRob Clark <robclark@freedesktop.org>
      Reviewed-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Acked-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Acked-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      083500ba
  13. 27 1月, 2015 2 次提交
    • Z
      drm/i915: add I915_PARAM_HAS_BSD2 to i915_getparam · 08e16dc8
      Zhipeng Gong 提交于
      This will let userland only try to use the new ring
      when the appropriate kernel is present
      
      v2: change the number to be consistent with upstream (Zhipeng)
      Signed-off-by: NZhipeng Gong <zhipeng.gong@intel.com>
      Reviewed--by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      08e16dc8
    • Z
      drm/i915: Specify bsd rings through exec flag · 8d360dff
      Zhipeng Gong 提交于
      On Skylake GT3 we have 2 Video Command Streamers (VCS), which is asymmetrical.
      For example, HEVC GPU commands can be only dispatched to VCS1 ring.
      But userspace has no control when using VCS1 or VCS2. This patch introduces
      a mechanism to avoid the default ping-pong mode and use one specific ring
      through execution flag. This mechanism is usable for all the platforms
      with 2 VCS rings.
      
      The open source usage is from these two commits in vaapi/intel:
      	commit 702050f04131a44ef8ac16651708ce8a8d98e4b8
      	Author: Zhao, Yakui <yakui.zhao@intel.com>
      	Date:   Mon Nov 17 12:44:19 2014 +0800
      
      	    Allow the batchbuffer to be submitted with override flag
      
      	commit a56efcdf27d11ad9b21664b4a2cda72d7f90f5a8
      	Author: Zhao Yakui <yakui.zhao@intel.com>
      	Date:   Mon Nov 17 12:44:22 2014 +0800
      
      	    Add the override flag to assure that HEVC video command
      		always uses BSD ring0 for SKL GT3 machine
      
      v2: fix whitespace (Rodrigo)
      v3: remove incorrect chunk that came on -collector rebase. (Rodrigo)
      v4: change the comment (Zhipeng)
      v5: address Daniel's comment (Zhipeng)
      Signed-off-by: NZhipeng Gong <zhipeng.gong@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8d360dff
  14. 08 1月, 2015 1 次提交
  15. 06 1月, 2015 1 次提交
    • A
      drm/i915: Support creation of unbound wc user mappings for objects · 1816f923
      Akash Goel 提交于
      This patch provides support to create write-combining virtual mappings of
      GEM object. It intends to provide the same funtionality of 'mmap_gtt'
      interface without the constraints and contention of a limited aperture
      space, but requires clients handles the linear to tile conversion on their
      own. This is for improving the CPU write operation performance, as with such
      mapping, writes and reads are almost 50% faster than with mmap_gtt. Similar
      to the GTT mmapping, unlike the regular CPU mmapping, it avoids the cache
      flush after update from CPU side, when object is passed onto GPU.  This
      type of mapping is specially useful in case of sub-region update,
      i.e. when only a portion of the object is to be updated. Using a CPU mmap
      in such cases would normally incur a clflush of the whole object, and
      using a GTT mmapping would likely require eviction of an active object or
      fence and thus stall. The write-combining CPU mmap avoids both.
      
      To ensure the cache coherency, before using this mapping, the GTT domain
      has been reused here. This provides the required cache flush if the object
      is in CPU domain or synchronization against the concurrent rendering.
      Although the access through an uncached mmap should automatically
      invalidate the cache lines, this may not be true for non-temporal write
      instructions and also not all pages of the object may be updated at any
      given point of time through this mapping.  Having a call to get_pages in
      set_to_gtt_domain function, as added in the earlier patch 'drm/i915:
      Broaden application of set-domain(GTT)', would guarantee the clflush and
      so there will be no cachelines holding the data for the object before it
      is accessed through this map.
      
      The drm_i915_gem_mmap structure (for the DRM_I915_GEM_MMAP_IOCTL) has been
      extended with a new flags field (defaulting to 0 for existent users). In
      order for userspace to detect the extended ioctl, a new parameter
      I915_PARAM_MMAP_VERSION has been added for versioning the ioctl interface.
      
      v2: Fix error handling, invalid flag detection, renaming (ickle)
      
      v3: Rebase to latest drm-intel-nightly codebase
      
      The new mmapping is exercised by igt/gem_mmap_wc,
      igt/gem_concurrent_blit and igt/gem_gtt_speed.
      
      Change-Id: Ie883942f9e689525f72fe9a8d3780c3a9faa769a
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1816f923
  16. 05 1月, 2015 2 次提交
    • R
      drm: Atomic modeset ioctl · d34f20d6
      Rob Clark 提交于
      The atomic modeset ioctl can be used to push any number of new values
      for object properties. The driver can then check the full device
      configuration as single unit, and try to apply the changes atomically.
      
      The ioctl simply takes a list of object IDs and property IDs and their
      values.
      
      Originally based on a patch from Ville Syrjälä, although it has mutated
      (mutilated?) enough since then that you probably shouldn't blame it on
      him ;-)
      
      The atomic support is hidden behind the DRM_CLIENT_CAP_ATOMIC cap (to
      protect legacy userspace) and drm.atomic module param (for now).
      
      v2: Check for file_priv->atomic to make sure we only allow userspace
      in-the-know to use atomic.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d34f20d6
    • R
      drm: add atomic properties · 88a48e29
      Rob Clark 提交于
      Once a driver is using atomic helpers for modeset, the next step is to
      switch over to atomic properties.  To do this, make sure that any
      modeset objects have their ->atomic_{get,set}_property() vfuncs suitably
      populated if they have custom properties (you did already remember to
      plug in atomic-helper func for the legacy ->set_property() vfuncs,
      right?), and then set DRIVER_ATOMIC bit in driver_features flag.
      
      A new cap is introduced, DRM_CLIENT_CAP_ATOMIC, for the purposes of
      shielding legacy userspace from atomic properties.  Mostly for the
      benefit of legacy DDX drivers that do silly things like getting/setting
      each property at startup (since some of the new atomic properties will
      be able to trigger modeset).
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet: Squash in fixup patch to check for DRM_MODE_PROP_ATOMIC
      instaed of the CAP define when filtering properties. Reported by
      Tvrtko Uruslin, acked by Rob.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88a48e29
  17. 11 12月, 2014 1 次提交
  18. 20 11月, 2014 1 次提交
    • D
      drm: s/enum_blob_list/enum_list/ in drm_property · 3758b341
      Daniel Vetter 提交于
      I guess for hysterical raisins this was meant to be the way to read
      blob properties. But that's done with the two-stage approach which
      uses separate blob kms object and the special-purpose get_blob ioctl.
      
      Shipping userspace seems to have never relied on this, and the kernel
      also never put any blob thing onto that property. And nowadays it
      would blow up, e.g. in drm_property_destroy. Also it makes no sense to
      return values in an ioctl that only returns metadata about everything.
      
      So let's ditch all the internal code for the blob list, rename the
      list to be unambiguous and sprinkle comments all over the place to
      explain this peculiar piece of api.
      
      v2: Squash in fixup from Rob to remove now unused variables.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3758b341
  19. 14 11月, 2014 1 次提交
    • C
      drm/i915: Make the physical object coherent with GTT · 6a2c4232
      Chris Wilson 提交于
      Currently objects for which the hardware needs a contiguous physical
      address are allocated a shadow backing storage to satisfy the contraint.
      This shadow buffer is not wired into the normal obj->pages and so the
      physical object is incoherent with accesses via the GPU, GTT and CPU. By
      setting up the appropriate scatter-gather table, we can allow userspace
      to access the physical object via either a GTT mmaping of or by rendering
      into the GEM bo. However, keeping the CPU mmap of the shmemfs backing
      storage coherent with the contiguous shadow is not yet possible.
      Fortuituously, CPU mmaps of objects requiring physical addresses are not
      expected to be coherent anyway.
      
      This allows the physical constraint of the GEM object to be transparent
      to userspace and allow it to efficiently render into or update them via
      the GTT and GPU.
      
      v2: Fix leak of pci handle spotted by Ville
      v3: Remove the now duplicate call to detach_phys_object during free.
      v4: Wait for rendering before pwrite. As this patch makes it possible to
      render into the phys object, we should make it correct as well!
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6a2c4232
  20. 08 11月, 2014 1 次提交
  21. 20 9月, 2014 2 次提交
    • I
      drm/exynos: use drm generic mmap interface · 832316c7
      Inki Dae 提交于
      This patch removes DRM_EXYNOS_GEM_MMAP ictrl feature specific
      to Exynos drm and instead uses drm generic mmap.
      
      We had used the interface specific to Exynos drm to do mmap directly,
      not to use demand paging which maps each page with physical memory
      at page fault handler. We don't need the specific mmap interface
      because the drm generic mmap which uses vm offset manager stuff can
      also do mmap directly.
      
      This patch makes a userspace region to be mapped with whole physical
      memory region allocated by userspace request when mmap system call is
      requested.
      
      Changelog v2:
      - do not set VM_IO, VM_DONTEXPEND and VM_DONTDUMP. These flags were already
        set by drm_gem_mmap
      - do not include <linux/anon_inodes.h>, which isn't needed anymore.
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      832316c7
    • I
      drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl · d931589c
      Inki Dae 提交于
      This interface and relevant codes aren't used anymore.
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      d931589c
  22. 12 9月, 2014 1 次提交
  23. 10 9月, 2014 2 次提交
  24. 19 8月, 2014 1 次提交
  25. 11 8月, 2014 4 次提交
  26. 10 8月, 2014 2 次提交