1. 04 4月, 2014 4 次提交
    • A
      drm/mipi_dsi: add flags to DSI messages · 1d96d4a6
      Andrzej Hajda 提交于
      This patch adds flags field to mipi_dsi_msg structure and two flags:
      - MIPI_DSI_MSG_REQ_ACK - request ACK from peripheral for given message,
      - MIPI_DSI_MSG_USE_LPM - use Low Power Mode to transmit message.
      The first flag is usually helpful during DSI diagnostic, the second
      flag is required by some peripherals during configuration phase.
      Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      1d96d4a6
    • T
    • S
      drm/cma: include <drm/drmP.h> as needed · 740c22ae
      Shawn Guo 提交于
      The following error and warnings will be seen when compiling a C file
      which includes <drm/drm_gem_cma_helper.h> but without <drm/drmP.h>
      being included before.
      
      include/drm/drm_gem_cma_helper.h:5:24: error: field ‘base’ has incomplete type
      include/drm/drm_gem_cma_helper.h: In function ‘to_drm_gem_cma_obj’:
      include/drm/drm_gem_cma_helper.h:16:9: warning: initialization from incompatible pointer type [enabled by default]
      include/drm/drm_gem_cma_helper.h: At top level:
      include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_mode_create_dumb’ declared inside parameter list [enabled by default]
      include/drm/drm_gem_cma_helper.h:24:34: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
      include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
      include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_file’ declared inside parameter list [enabled by default]
      include/drm/drm_gem_cma_helper.h:28:10: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
      include/drm/drm_gem_cma_helper.h:28:10: warning: ‘struct drm_file’ declared inside parameter list [enabled by default]
      include/drm/drm_gem_cma_helper.h:35:3: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
      include/drm/drm_gem_cma_helper.h:46:14: warning: ‘struct drm_device’ declared inside parameter list [enabled by default]
      
      Fix them by including <drm/drmP.h> in drm_gem_cma_helper.h.
      Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      740c22ae
    • L
      drm: Add support for two-ended allocation, v3 · 62347f9e
      Lauri Kasanen 提交于
      Clients like i915 need to segregate cache domains within the GTT which
      can lead to small amounts of fragmentation. By allocating the uncached
      buffers from the bottom and the cacheable buffers from the top, we can
      reduce the amount of wasted space and also optimize allocation of the
      mappable portion of the GTT to only those buffers that require CPU
      access through the GTT.
      
      For other drivers, allocating small bos from one end and large ones
      from the other helps improve the quality of fragmentation.
      
      Based on drm_mm work by Chris Wilson.
      
      v3: Changed to use a TTM placement flag
      v2: Updated kerneldoc
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: Christian König <deathsimple@vodafone.de>
      Signed-off-by: NLauri Kasanen <cand@gmx.com>
      Signed-off-by: NDavid Airlie <airlied@redhat.com>
      62347f9e
  2. 02 4月, 2014 8 次提交
  3. 28 3月, 2014 11 次提交
  4. 24 3月, 2014 1 次提交
  5. 23 3月, 2014 1 次提交
  6. 18 3月, 2014 2 次提交
  7. 16 3月, 2014 8 次提交
    • D
      drm: remove redundant minor->device field · 5817878c
      David Herrmann 提交于
      Whenever we access minor->device, we are in a minor->kdev->...->fops
      callback so the minor->kdev pointer *must* be valid. Thus, simply use
      minor->kdev->devt instead of minor->device and remove the redundant field.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5817878c
    • D
      drm: add minor-lookup/release helpers · 1616c525
      David Herrmann 提交于
      Instead of accessing drm_minors_idr directly, this adds a small helper to
      hide the internals. This will help us later to remove the drm_global_mutex
      requirement for minor-lookup.
      
      Furthermore, this also makes sure that minor->dev is always valid and
      takes a reference-count to the device as long as the minor is used in an
      open-file. This way, "struct file*"->private_data->dev is guaranteed to be
      valid (which it has to, as we cannot reset it).
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1616c525
    • D
      drm: provide device-refcount · 099d1c29
      David Herrmann 提交于
      Lets not trick ourselves into thinking "drm_device" objects are not
      ref-counted. That's just utterly stupid. We manage "drm_minor" objects on
      each drm-device and each minor can have an unlimited number of open
      handles. Each of these handles has the drm_minor (and thus the drm_device)
      as private-data in the file-handle. Therefore, we may not destroy
      "drm_device" until all these handles are closed.
      
      It is *not* possible to reset all these pointers atomically and restrict
      access to them, and this is *not* how this is done! Instead, we use
      ref-counts to make sure the object is valid and not freed.
      
      Note that we currently use "dev->open_count" for that, which is *exactly*
      the same as a reference-count, just open coded. So this patch doesn't
      change any semantics on DRM devices (well, this patch just introduces the
      ref-count, anyway. Follow-up patches will replace open_count by it).
      
      Also note that generic VFS revoke support could allow us to drop this
      ref-count again. We could then just synchronously disable any fops->xy()
      calls. However, this is not the case, yet, and no such patches are
      in sight (and I seriously question the idea of dropping the ref-cnt
      again).
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      099d1c29
    • D
      drm: turn DRM_MINOR_* into enum · cb8a239b
      David Herrmann 提交于
      Use enum for DRM_MINOR_* constants to avoid hard-coding the IDs.
      Furthermore, add a DRM_MINOR_CNT so we can perform range-checks in
      follow-ups.
      
      This changes the IDs of the minor-types by -1, but they're not used as
      indices so this is fine.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cb8a239b
    • D
      drm: remove unused DRM_MINOR_UNASSIGNED · b9a0d15c
      David Herrmann 提交于
      This constant is unused, remove it.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b9a0d15c
    • D
      drm: group dev-lifetime related members · 45e212d2
      David Herrmann 提交于
      These members are all managed by DRM-core, lets group them together so
      they're not split across the whole device.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      45e212d2
    • D
      drm: init TTM dev_mapping in ttm_bo_device_init() · 44d847b7
      David Herrmann 提交于
      With dev->anon_inode we have a global address_space ready for operation
      right from the beginning. Therefore, there is no need to do a delayed
      setup with TTM. Instead, set dev_mapping during initialization in
      ttm_bo_device_init() and remove any "if (dev_mapping)" conditions.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      44d847b7
    • D
      drm: use anon-inode instead of relying on cdevs · 6796cb16
      David Herrmann 提交于
      DRM drivers share a common address_space across all character-devices of a
      single DRM device. This allows simple buffer eviction and mapping-control.
      However, DRM core currently waits for the first ->open() on any char-dev
      to mark the underlying inode as backing inode of the device. This delayed
      initialization causes ugly conditions all over the place:
        if (dev->dev_mapping)
          do_sth();
      
      To avoid delayed initialization and to stop reusing the inode of the
      char-dev, we allocate an anonymous inode for each DRM device and reset
      filp->f_mapping to it on ->open().
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      6796cb16
  8. 13 3月, 2014 5 次提交