1. 15 Sep, 2014 23 commits
  2. 12 Sep, 2014 17 commits
    • Dave Airlie's avatar
      Merge tag 'topic/drm-header-rework-2014-09-12' of... · 98faa78c
      Dave Airlie authored
      Merge tag 'topic/drm-header-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel into drm-next
      
      So here's the header cleanup, rebased on top of drm-next. Two new header
      files are created here:
      
      - drivers/gpu/drm/drm_internal.h for non-legacy drm.ko private
        declarations.
      
      - include/drm/drm_legacy.h for legacy interfaces used by non-kms drivers.
      
      And of course lots fo stuff gets shuffled into the already existing
      drivers/gpu/drm/drm_legacy.h for drm.ko internal stuff.
      
      topic branch smoke-tested in drm-intel-nightly for a bit. And the 0day
      tester also worked through it (and found a few places I didn't add a
      static to functions).
      
      * tag 'topic/drm-header-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel:
        drm: Move DRM_MAGIC_HASH_ORDER into drm_drv.c
        drm: Move drm_class to drm_internal.h
        drm: Move LOCK_TEST_WITH_RETURN to <drm/drm_legacy.h>
        drm: Move legacy buffer structures to <drm/drm_legacy.h>
        drm: Move drm_memory.c map support declarations to <drm/drm_legacy.h>
        drm: Purge ioctl forward declarations from drmP.h
        drm: unexport drm_global_mutex
        drm: Move piles of functions from drmP.h to drm_internal.h
        drm: Move vblank related module options into drm_irq.c
        drm: Drop drm_sysfs_class from drmP.h
        drm: Move __drm_pci_free to drm_legacy.h
        drm: Create drm legacy driver header
        drm: Move drm_legacy_vma_flush into drm_legacy.h
        drm: Move sg functions into drm_legacy.h
        drm: Move dma functions into drm_legacy.h
      98faa78c
    • Daniel Vetter's avatar
      drm: Move DRM_MAGIC_HASH_ORDER into drm_drv.c · 6865b20a
      Daniel Vetter authored
      Only used in one place ever, so put it right next to that.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6865b20a
    • Daniel Vetter's avatar
      00285be8
    • Daniel Vetter's avatar
      drm: Move LOCK_TEST_WITH_RETURN to <drm/drm_legacy.h> · 8f1a2c8d
      Daniel Vetter authored
      Unfortunately we can't move struct drm_lock_data easily since
      it's embedded into struct drm_master. And figuring out where exactly
      this struct should be allocated isn't that simple ...
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      8f1a2c8d
    • Daniel Vetter's avatar
      drm: Move legacy buffer structures to <drm/drm_legacy.h> · ba8286fa
      Daniel Vetter authored
      A few odd cases:
      - mgag200 someho had a totally unused drm_dma_handle_t. Remove it.
      - i915 still uses the legacy pci dma alloc api, so grows an include.
      
      Everything else fairly standard.
      
      v2: Include "drm_legacy.h" in drm.ko source files for consistency.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ba8286fa
    • Daniel Vetter's avatar
      drm: Move drm_memory.c map support declarations to <drm/drm_legacy.h> · 86c1fbd5
      Daniel Vetter authored
      And replace the drm_core_ prefix with drm_legacy_ since really, this
      isn't core stuff.
      
      Also drop drm_core_dropmap since it's unused.
      
      v2: Fix up i810.ko fully which somehow slipped through.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      86c1fbd5
    • Daniel Vetter's avatar
      drm: Purge ioctl forward declarations from drmP.h · 78238757
      Daniel Vetter authored
      If we push down the ioctl table in drm_ioctl.c all the forward
      declarations in drmP.h are not required any more.
      
      v2: Fold in fixup from Fenugguang Wu to declare functions as static.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      78238757
    • Daniel Vetter's avatar
      drm: unexport drm_global_mutex · 44af3f5c
      Daniel Vetter authored
      Drivers really, really have no business even looking at this lock. And
      thankfully they don't.
      
      So unexport it and move the declaration to drm_internal.h.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      44af3f5c
    • Daniel Vetter's avatar
      drm: Move piles of functions from drmP.h to drm_internal.h · 67d0ec4e
      Daniel Vetter authored
      This way drivers can't grow crazy ideas any more, and it also
      helps a bit in reviewing EXPORT_SYMBOLS.
      
      v2: Even more stuff. Unfortunately we can't move drm_vm_open_locked
      because exynos does some horrible stuff with it.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      67d0ec4e
    • Daniel Vetter's avatar
      drm: Move vblank related module options into drm_irq.c · 18882995
      Daniel Vetter authored
      This allows us to drop 2 header declarations from drmP.h. The 3rd one
      is also used in drm_ioctl.c, so for that create a new drm_internal.h
      header for non-legacy non-kms (since we have internal headers for
      those parts already) declarations private to drm.ko.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      18882995
    • Daniel Vetter's avatar
      drm: Drop drm_sysfs_class from drmP.h · 7610a04c
      Daniel Vetter authored
      No user at all.
      
      My guess is that this is a leftover from ttm before it used
      the more abstract helpers to register/unregister its sysfs
      objects (see drm_sysfs.h). At least in the existing history
      it was never used.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7610a04c
    • Daniel Vetter's avatar
      drm: Move __drm_pci_free to drm_legacy.h · 1c96e84e
      Daniel Vetter authored
      Also sprinkle the customary legacy_ prefix.
      
      Unfortunately we can't move the other functions since i915 is still
      using them. Shame on me for that one :(
      
      v2: Fix patch subject as spotted by David Herrmann.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1c96e84e
    • Daniel Vetter's avatar
      drm: Create drm legacy driver header · 4f03b1fc
      Daniel Vetter authored
      And move a few legayc functions to start things over there.
      
      It compiles ...
      
      Inspired by a patch from Dave Airlie, but with a split between drm.ko
      private legacy functions and stuff used by drivers.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4f03b1fc
    • Daniel Vetter's avatar
      a677f4cc
    • Daniel Vetter's avatar
      drm: Move sg functions into drm_legacy.h · 9ec4e2ff
      Daniel Vetter authored
      Also sprinkle the drm_legacy_ prefix where missing.
      
      v2: Drop extern from function declarations and include "drm_legacy.h"
      in drm_scatter.c, spotted by David.
      
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      9ec4e2ff
    • Daniel Vetter's avatar
      drm: Move dma functions into drm_legacy.h · a266162a
      Daniel Vetter authored
      Also drop the unneeded EXPORT_SYMBOL and sprinkle drm_legacy_ prefixes
      where missing.
      
      v2: Drop the confusing _core_ and drop extern, both suggested by
      David.
      
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a266162a
    • Dave Airlie's avatar
      Merge tag 'topic/vblank-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel into drm-next · edbaae5a
      Dave Airlie authored
      So updated vblank-rework pull request, now with the polish that Mario
      requested applied (and reviewed by him). Also with backmerge like you've
      requested for easier merging.
      
      The neat thing this finally allows is to immediately disable the vblank
      interrupt on the last drm_vblank_put if the hardware has perfectly
      accurate vblank counter and timestamp readout support. On i915 that
      required piles of small adjustements from Ville since depending upon the
      platform and port the vblank happens at different scanout lines.
      
      Of course this is fully opt-in and per-device (we need that since gen2
      doesn't have a hw vblank counter).
      
      * tag 'topic/vblank-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel: (22 commits)
        drm: Clarify vblank ts/scanoutpos sampling #defines
        drm: Simplify return value of drm_get_last_vbltimestamp
        drm: Only update final vblank count when precise ts is available
        drm: Really never disable vblank irqs for offdelay==0
        drm: Use vblank_disable_and_save in drm_vblank_cleanup()
        drm: Remove drm_vblank_cleanup from drm_vblank_init error path.
        drm: Store the vblank timestamp when adjusting the counter during disable
        drm: Fix confusing debug message in drm_update_vblank_count()
        drm/i915: Update scanline_offset only for active crtcs
        drm: Kick start vblank interrupts at drm_vblank_on()
        drm/i915: Opt out of vblank disable timer on >gen2
        drm: Add dev->vblank_disable_immediate flag
        drm: Disable vblank interrupt immediately when drm_vblank_offdelay<0
        drm: Fix race between drm_vblank_off() and drm_queue_vblank_event()
        drm: Fix deadlock between event_lock and vbl_lock/vblank_time_lock
        drm: Reduce the amount of dev->vblank[crtc] in the code
        drm: Avoid random vblank counter jumps if the hardware counter has been reset
        drm: Have the vblank counter account for the time between vblank irq disable and drm_vblank_off()
        drm: Move drm_update_vblank_count()
        drm: Don't clear vblank timestamps when vblank interrupt is disabled
        ...
      edbaae5a