1. 14 2月, 2013 7 次提交
  2. 08 2月, 2013 11 次提交
    • D
      drm: make frame duration time calculation more precise · 85a7ce67
      Daniel Kurtz 提交于
      It is a bit more precise to compute the total number of pixels first and
      then divide, rather than multiplying the line pixel count by the
      already-rounded line duration.
      Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      85a7ce67
    • B
      drm/pci: Use PCI Express Capability accessors · dd66cc2e
      Bjorn Helgaas 提交于
      Use PCI Express Capability access functions to simplify this code a bit.
      For non-PCIe devices or pre-PCIe 3.0 devices that don't implement the Link
      Capabilities 2 register, pcie_capability_read_dword() reads a zero.
      
      Since we're only testing whether the bits we care about are set, there's no
      need to mask out the other bits we *don't* care about.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dd66cc2e
    • B
      drm/pci: Set all supported speeds in speed cap mask for pre-3.0 devices · f8acf6f4
      Bjorn Helgaas 提交于
      For devices that conform to PCIe r3.0 and have a Link Capabilities 2
      register, we test and report every bit in the Supported Link Speeds Vector
      field.  For a device that supports both 2.5GT/s and 5.0GT/s, we set both
      DRM_PCIE_SPEED_25 and DRM_PCIE_SPEED_50 in the returned mask.
      
      For pre-r3.0 devices, the Link Capabilities 0010b encoding
      (PCI_EXP_LNKCAP_SLS_5_0GB) means that both 5.0GT/s and 2.5GT/s are
      supported, so set both DRM_PCIE_SPEED_25 and DRM_PCIE_SPEED_50 in this
      case as well.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f8acf6f4
    • B
      drm/pci: Use the standard #defines for PCIe Link Capability bits · 9fe0423e
      Bjorn Helgaas 提交于
      Use the standard #defines rather than bare numbers for the PCIe Link
      Capabilities speed bits.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9fe0423e
    • T
      drm: Allow vblank support without DRIVER_HAVE_IRQ · 03f6509d
      Thierry Reding 提交于
      Drivers that register interrupt handlers without the DRM core helpers
      don't initialize the .irq_enabled field and drm_dev_to_irq() may fail
      when called on them. This shouldn't preclude them from implementing
      the vblank IOCTL.
      Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      03f6509d
    • A
      drm/radeon: use prime helpers · 1e6d17a5
      Aaron Plattner 提交于
      Simplify the Radeon prime implementation by using the default behavior provided
      by drm_gem_prime_import and drm_gem_prime_export.
      
      v2:
      - Rename functions to radeon_gem_prime_get_sg_table and
        radeon_gem_prime_import_sg_table.
      - Delete the now-unused vmapping_count variable.
      Signed-off-by: NAaron Plattner <aplattner@nvidia.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1e6d17a5
    • A
      drm/nouveau: use prime helpers · ab9ccb96
      Aaron Plattner 提交于
      Simplify the Nouveau prime implementation by using the default behavior provided
      by drm_gem_prime_import and drm_gem_prime_export.
      
      v2: Rename functions to nouveau_gem_prime_get_sg_table and
      nouveau_gem_prime_import_sg_table.
      Signed-off-by: NAaron Plattner <aplattner@nvidia.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ab9ccb96
    • A
      drm: add prime helpers · 89177644
      Aaron Plattner 提交于
      Instead of reimplementing all of the dma_buf functionality in every driver,
      create helpers drm_prime_import and drm_prime_export that implement them in
      terms of new, lower-level hook functions:
      
        gem_prime_pin: callback when a buffer is created, used to pin buffers into GTT
        gem_prime_get_sg_table: convert a drm_gem_object to an sg_table for export
        gem_prime_import_sg_table: convert an sg_table into a drm_gem_object
        gem_prime_vmap, gem_prime_vunmap: map and unmap an object
      
      These hooks are optional; drivers can opt in by using drm_gem_prime_import and
      drm_gem_prime_export as the .gem_prime_import and .gem_prime_export fields of
      struct drm_driver.
      
      v2:
      - Drop .begin_cpu_access.  None of the drivers this code replaces implemented
        it.  Having it here was a leftover from when I was trying to include i915 in
        this rework.
      - Use mutex_lock instead of mutex_lock_interruptible, as these three drivers
        did.  This patch series shouldn't change that behavior.
      - Rename helpers to gem_prime_get_sg_table and gem_prime_import_sg_table.
        Rename struct sg_table* variables to 'sgt' for clarity.
      - Update drm.tmpl for these new hooks.
      
      v3:
      - Pass the vaddr down to the driver.  This lets drivers that just call vunmap on
        the pointer avoid having to store the pointer in their GEM private structures.
      - Move documentation into a /** DOC */ comment in drm_prime.c and include it in
        drm.tmpl with a !P line.  I tried to use !F lines to include documentation of
        the individual functions from drmP.h, but the docproc / kernel-doc scripts
        barf on that file, so hopefully this is good enough for now.
      - apply refcount fix from commit be8a42ae
        ("drm/prime: drop reference on imported dma-buf come from gem")
      Signed-off-by: NAaron Plattner <aplattner@nvidia.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      89177644
    • R
      drm/i2c: give i2c it's own Kconfig · 6504d0d9
      Rob Clark 提交于
      Move this out of nouveau directory.  As we start to add more encoder
      slaves used by other drivers, it makes sense to put the Kconfig bits in
      one place.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6504d0d9
    • D
      drm/udl: disable fb_defio by default · 677d23b7
      Dave Airlie 提交于
      There seems to be a bad interaction between gem/shmem and defio on top,
      I get list corruption on the page lru in the shmem code.
      
      Turn it off for now until we get some more digging done.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      677d23b7
    • C
      drm/udl: Inline memcmp() for RLE compression of xfer · e90a4ea5
      Chris Wilson 提交于
      As we use a variable length the compiler does not realise that it is a
      fixed value of either 2 or 4 bytes. Instead of performing the inline
      comparison itself, the compiler inserts a function call to the generic
      memcmp routine which is optimised for long comparisons of variable
      length. That turns out to be quite expensive...
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e90a4ea5
  3. 07 2月, 2013 2 次提交
    • D
      drm/udl: make usage as a console safer · bcb39af4
      Dave Airlie 提交于
      Okay you don't really want to use udl devices as your console, but if
      you are unlucky enough to do so, you run into a lot of schedule while atomic
      due to printk being called from all sorts of funky places. So check if we
      are in an atomic context, and queue the damage for later, the next printk
      should cause it to appear. This isn't ideal, but it is simple, and seems to
      work okay in my testing here.
      
      (dirty area idea came from xenfb)
      
      fixes a bunch of sleeping while atomic issues running fbcon on udl devices.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      bcb39af4
    • D
      drm/usb: bind driver to correct device · 9f23de52
      Dave Airlie 提交于
      While looking at plymouth on udl I noticed that plymouth was trying
      to use its fb plugin not its drm one, it was trying to drmOpen a driver called
      usb not udl, noticed that we actually had out driver pointing at the wrong
      device.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9f23de52
  4. 06 2月, 2013 1 次提交
  5. 02 2月, 2013 6 次提交
  6. 01 2月, 2013 13 次提交