1. 30 3月, 2017 2 次提交
  2. 15 3月, 2017 1 次提交
  3. 13 3月, 2017 1 次提交
    • D
      uapi: fix drm/omap_drm.h userspace compilation errors · 337ba7fb
      Dmitry V. Levin 提交于
      Consistently use types from linux/types.h like in other uapi drm/*_drm.h
      header files to fix the following drm/omap_drm.h userspace compilation
      errors:
      
      /usr/include/drm/omap_drm.h:36:2: error: unknown type name 'uint64_t'
        uint64_t param;   /* in */
      /usr/include/drm/omap_drm.h:37:2: error: unknown type name 'uint64_t'
        uint64_t value;   /* in (set_param), out (get_param) */
      /usr/include/drm/omap_drm.h:56:2: error: unknown type name 'uint32_t'
        uint32_t bytes;  /* (for non-tiled formats) */
      /usr/include/drm/omap_drm.h:58:3: error: unknown type name 'uint16_t'
         uint16_t width;
      /usr/include/drm/omap_drm.h:59:3: error: unknown type name 'uint16_t'
         uint16_t height;
      /usr/include/drm/omap_drm.h:65:2: error: unknown type name 'uint32_t'
        uint32_t flags;   /* in */
      /usr/include/drm/omap_drm.h:66:2: error: unknown type name 'uint32_t'
        uint32_t handle;  /* out */
      /usr/include/drm/omap_drm.h:67:2: error: unknown type name 'uint32_t'
        uint32_t __pad;
      /usr/include/drm/omap_drm.h:77:2: error: unknown type name 'uint32_t'
        uint32_t handle;  /* buffer handle (in) */
      /usr/include/drm/omap_drm.h:78:2: error: unknown type name 'uint32_t'
        uint32_t op;   /* mask of omap_gem_op (in) */
      /usr/include/drm/omap_drm.h:82:2: error: unknown type name 'uint32_t'
        uint32_t handle;  /* buffer handle (in) */
      /usr/include/drm/omap_drm.h:83:2: error: unknown type name 'uint32_t'
        uint32_t op;   /* mask of omap_gem_op (in) */
      /usr/include/drm/omap_drm.h:88:2: error: unknown type name 'uint32_t'
        uint32_t nregions;
      /usr/include/drm/omap_drm.h:89:2: error: unknown type name 'uint32_t'
        uint32_t __pad;
      /usr/include/drm/omap_drm.h:93:2: error: unknown type name 'uint32_t'
        uint32_t handle;  /* buffer handle (in) */
      /usr/include/drm/omap_drm.h:94:2: error: unknown type name 'uint32_t'
        uint32_t pad;
      /usr/include/drm/omap_drm.h:95:2: error: unknown type name 'uint64_t'
        uint64_t offset;  /* mmap offset (out) */
      /usr/include/drm/omap_drm.h:102:2: error: unknown type name 'uint32_t'
        uint32_t size;   /* virtual size for mmap'ing (out) */
      /usr/include/drm/omap_drm.h:103:2: error: unknown type name 'uint32_t'
        uint32_t __pad;
      
      Fixes: ef6503e8 ("drm: Kbuild: add omap_drm.h to the installed headers")
      Signed-off-by: NDmitry V. Levin <ldv@altlinux.org>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      337ba7fb
  4. 27 2月, 2017 1 次提交
    • M
      drm: Add a new connector atomic property for link status · 40ee6fbe
      Manasi Navare 提交于
      At the time userspace does setcrtc, we've already promised the mode
      would work. The promise is based on the theoretical capabilities of
      the link, but it's possible we can't reach this in practice. The DP
      spec describes how the link should be reduced, but we can't reduce
      the link below the requirements of the mode. Black screen follows.
      
      One idea would be to have setcrtc return a failure. However, it
      already should not fail as the atomic checks have passed. It would
      also conflict with the idea of making setcrtc asynchronous in the
      future, returning before the actual mode setting and link training.
      
      Another idea is to train the link "upfront" at hotplug time, before
      pruning the mode list, so that we can do the pruning based on
      practical not theoretical capabilities. However, the changes for link
      training are pretty drastic, all for the sake of error handling and
      DP compliance, when the most common happy day scenario is the current
      approach of link training at mode setting time, using the optimal
      parameters for the mode. It is also not certain all hardware could do
      this without the pipe on; not even all our hardware can do this. Some
      of this can be solved, but not trivially.
      
      Both of the above ideas also fail to address link degradation *during*
      operation.
      
      The solution is to add a new "link-status" connector property in order
      to address link training failure in a way that:
      a) changes the current happy day scenario as little as possible, to
      avoid regressions, b) can be implemented the same way by all drm
      drivers, c) is still opt-in for the drivers and userspace, and opting
      out doesn't regress the user experience, d) doesn't prevent drivers
      from implementing better or alternate approaches, possibly without
      userspace involvement. And, of course, handles all the issues presented.
      In the usual happy day scenario, this is always "good". If something
      fails during or after a mode set, the kernel driver can set the link
      status to "bad" and issue a hotplug uevent for userspace to have it
      re-check the valid modes through GET_CONNECTOR IOCTL, and try modeset
      again. If the theoretical capabilities of the link can't be reached,
      the mode list is trimmed based on that.
      
      v7 by Jani:
      * Rebase, simplify set property while at it, checkpatch fix
      v6:
      * Fix a typo in kernel doc (Sean Paul)
      v5:
      * Clarify doc for silent rejection of atomic properties by driver (Daniel Vetter)
      v4:
      * Add comments in kernel-doc format (Daniel Vetter)
      * Update the kernel-doc for link-status (Sean Paul)
      v3:
      * Fixed a build error (Jani Saarinen)
      v2:
      * Removed connector->link_status (Daniel Vetter)
      * Set connector->state->link_status in drm_mode_connector_set_link_status_property
      (Daniel Vetter)
      * Set the connector_changed flag to true if connector->state->link_status changed.
      * Reset link_status to GOOD in update_output_state (Daniel Vetter)
      * Never allow userspace to set link status from Good To Bad (Daniel Vetter)
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NTony Cheng <tony.cheng@amd.com>
      Acked-by: NHarry Wentland <harry.wentland@amd.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Sean Paul <seanpaul@chromium.org>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: Eric Anholt <eric@anholt.net> (for the -modesetting patch)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/0182487051aa9f1594820e35a4853de2f8747b4e.1481883920.git.jani.nikula@intel.com
      40ee6fbe
  5. 28 1月, 2017 3 次提交
    • C
      drm/i915: Support explicit fencing for execbuf · fec0445c
      Chris Wilson 提交于
      Now that the user can opt-out of implicit fencing, we need to give them
      back control over the fencing. We employ sync_file to wrap our
      drm_i915_gem_request and provide an fd that userspace can merge with
      other sync_file fds and pass back to the kernel to wait upon before
      future execution.
      
      Testcase: igt/gem_exec_fence
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Acked-by: NChad Versace <chadversary@chromium.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170127094008.27489-2-chris@chris-wilson.co.uk
      fec0445c
    • C
      drm/i915: Enable userspace to opt-out of implicit fencing · 77ae9957
      Chris Wilson 提交于
      Userspace is faced with a dilemma. The kernel requires implicit fencing
      to manage resource usage (we always must wait for the GPU to finish
      before releasing its PTE) and for third parties. However, userspace may
      wish to avoid this serialisation if it is either using explicit fencing
      between parties and wants more fine-grained access to buffers (e.g. it
      may partition the buffer between uses and track fences on ranges rather
      than the implicit fences tracking the whole object). It follows that
      userspace needs a mechanism to avoid the kernel's serialisation on its
      implicit fences before execbuf execution.
      
      The next question is whether this is an object, execbuf or context flag.
      Hybrid users (such as using explicit EGL_ANDROID_native_sync fencing on
      shared winsys buffers, but implicit fencing on internal surfaces)
      require a per-object level flag. Given that this flag need to be only
      set once for the lifetime of the object, this reduces the convenience of
      having an execbuf or context level flag (and avoids having multiple
      pieces of uABI controlling the same feature).
      
      Incorrect use of this flag will result in rendering corruption and GPU
      hangs - but will not result in use-after-free or similar resource
      tracking issues.
      
      Serious caveat: write ordering is not strictly correct after setting
      this flag on a render target on multiple engines. This affects all
      subsequent GEM operations (execbuf, set-domain, pread) and shared
      dma-buf operations. A fix is possible - but costly (both in terms of
      further ABI changes and runtime overhead).
      
      Testcase: igt/gem_exec_async
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Acked-by: NChad Versace <chadversary@chromium.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170127094008.27489-1-chris@chris-wilson.co.uk
      77ae9957
    • A
      drm/amd/amdgpu: get maximum and used UVD handles (v4) · 44879b62
      Arindam Nath 提交于
      Change History
      --------------
      
      v4: Changes suggested by Emil, Christian
      - return -ENODATA for asics with unlimited sessions
      
      v3: changes suggested by Christian
      - Add a check for UVD IP block using AMDGPU_HW_IP_UVD
        query type.
      - Add a check for asic_type to be less than
        CHIP_POLARIS10 since starting Polaris, we support
        unlimited UVD instances.
      - Add kerneldoc style comment for
        amdgpu_uvd_used_handles().
      
      v2: as suggested by Christian
      - Add a new query AMDGPU_INFO_NUM_HANDLES
      - Create a helper function to return the number
        of currently used UVD handles.
      - Modify the logic to count the number of used
        UVD handles since handles can be freed in
        non-linear fashion.
      
      v1:
      - User might want to query the maximum number of UVD
        instances supported by firmware. In addition to that,
        if there are multiple applications using UVD handles
        at the same time, he might also want to query the
        currently used number of handles.
      
        For this we add two variables max_handles and
        used_handles inside drm_amdgpu_info_hw_ip. So now
        an application (or libdrm) can use AMDGPU_INFO IOCTL
        with AMDGPU_INFO_HW_IP_INFO query type to get these
        values.
      Signed-off-by: NArindam Nath <arindam.nath@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      44879b62
  6. 27 1月, 2017 1 次提交
  7. 19 1月, 2017 1 次提交
  8. 12 1月, 2017 1 次提交
  9. 19 12月, 2016 1 次提交
  10. 14 12月, 2016 1 次提交
  11. 13 12月, 2016 1 次提交
  12. 10 12月, 2016 1 次提交
  13. 09 12月, 2016 1 次提交
  14. 01 12月, 2016 1 次提交
  15. 27 11月, 2016 1 次提交
    • R
      drm/msm: update uapi header license · 7f6337ff
      Rob Clark 提交于
      The same file in libdrm is, as is the tradition with the rest of libdrm,
      etc, using an MIT license.  To avoid complications in the future with
      sync'ing the uapi header to libdrm, lets fix the license mismatch now
      before there are any non-trivial commits from someone other than myself.
      
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      Cc: Gabriel Laskar <gabriel@lse.epita.fr>
      Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NEmil Velikov <emil.l.velikov@gmail.com>
      7f6337ff
  16. 22 11月, 2016 2 次提交
    • R
      drm/i915: Enable i915 perf stream for Haswell OA unit · d7965152
      Robert Bragg 提交于
      Gen graphics hardware can be set up to periodically write snapshots of
      performance counters into a circular buffer via its Observation
      Architecture and this patch exposes that capability to userspace via the
      i915 perf interface.
      
      v2:
         Make sure to initialize ->specific_ctx_id when opening, without
         relying on _pin_notify hook, in case ctx already pinned.
      v3:
         Revert back to pinning ctx upfront when opening stream, removing
         need to hook in to pinning and to update OACONTROL on the fly.
      Signed-off-by: NRobert Bragg <robert@sixbynine.org>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: NSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-7-robert@sixbynine.org
      d7965152
    • R
      drm/i915: Add i915 perf infrastructure · eec688e1
      Robert Bragg 提交于
      Adds base i915 perf infrastructure for Gen performance metrics.
      
      This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64
      properties to configure a stream of metrics and returns a new fd usable
      with standard VFS system calls including read() to read typed and sized
      records; ioctl() to enable or disable capture and poll() to wait for
      data.
      
      A stream is opened something like:
      
        uint64_t properties[] = {
            /* Single context sampling */
            DRM_I915_PERF_PROP_CTX_HANDLE,        ctx_handle,
      
            /* Include OA reports in samples */
            DRM_I915_PERF_PROP_SAMPLE_OA,         true,
      
            /* OA unit configuration */
            DRM_I915_PERF_PROP_OA_METRICS_SET,    metrics_set_id,
            DRM_I915_PERF_PROP_OA_FORMAT,         report_format,
            DRM_I915_PERF_PROP_OA_EXPONENT,       period_exponent,
         };
         struct drm_i915_perf_open_param parm = {
            .flags = I915_PERF_FLAG_FD_CLOEXEC |
                     I915_PERF_FLAG_FD_NONBLOCK |
                     I915_PERF_FLAG_DISABLED,
            .properties_ptr = (uint64_t)properties,
            .num_properties = sizeof(properties) / 16,
         };
         int fd = drmIoctl(drm_fd, DRM_IOCTL_I915_PERF_OPEN, &param);
      
      Records read all start with a common { type, size } header with
      DRM_I915_PERF_RECORD_SAMPLE being of most interest. Sample records
      contain an extensible number of fields and it's the
      DRM_I915_PERF_PROP_SAMPLE_xyz properties given when opening that
      determine what's included in every sample.
      
      No specific streams are supported yet so any attempt to open a stream
      will return an error.
      
      v2:
          use i915_gem_context_get() - Chris Wilson
      v3:
          update read() interface to avoid passing state struct - Chris Wilson
          fix some rebase fallout, with i915-perf init/deinit
      v4:
          s/DRM_IORW/DRM_IOW/ - Emil Velikov
      Signed-off-by: NRobert Bragg <robert@sixbynine.org>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: NSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161107194957.3385-2-robert@sixbynine.org
      eec688e1
  17. 21 11月, 2016 1 次提交
  18. 17 11月, 2016 2 次提交
  19. 15 11月, 2016 2 次提交
  20. 09 11月, 2016 1 次提交
  21. 08 11月, 2016 1 次提交
  22. 04 11月, 2016 1 次提交
    • E
      drm/vc4: Add support for rendering with ETC1 textures. · 7154d76f
      Eric Anholt 提交于
      The validation for it ends up being quite simple, but I hadn't got
      around to it before merging the driver.  For backwards compatibility,
      we also need to add a flag so that the userspace GL driver can easily
      tell if the kernel will allow ETC1 textures (on an old kernel, it will
      continue to convert to RGBA8)
      Signed-off-by: NEric Anholt <eric@anholt.net>
      7154d76f
  23. 26 10月, 2016 6 次提交
  24. 17 10月, 2016 2 次提交
  25. 16 9月, 2016 3 次提交
  26. 01 9月, 2016 1 次提交