1. 23 Oct, 2017 1 commit
    • Keith Packard's avatar
      drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3] · 3064abfa
      Keith Packard authored
      These provide crtc-id based functions instead of pipe-number, while
      also offering higher resolution time (ns) and wider frame count (64)
      as required by the Vulkan API.
      
      v2:
      
       * Check for DRIVER_MODESET in new crtc-based vblank ioctls
      
      	Failing to check this will oops the driver.
      
       * Ensure vblank interupt is running in crtc_get_sequence ioctl
      
      	The sequence and timing values are not correct while the
      	interrupt is off, so make sure it's running before asking for
      	them.
      
       * Short-circuit get_sequence if the counter is enabled and accurate
      
      	Steal the idea from the code in wait_vblank to avoid the
      	expense of drm_vblank_get/put
      
       * Return active state of crtc in crtc_get_sequence ioctl
      
      	Might be useful for applications that aren't in charge of
      	modesetting?
      
       * Use drm_crtc_vblank_get/put in new crtc-based vblank sequence ioctls
      
      	Daniel Vetter prefers these over the old drm_vblank_put/get
      	APIs.
      
       * Return s64 ns instead of u64 in new sequence event
      Suggested-by: default avatarDaniel Vetter <daniel@ffwll.ch>
      Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      
      v3:
      
       * Removed FIRST_PIXEL_OUT_FLAG
       * Document that the timestamp in the query and event are
         that of the first pixel leaving the display engine for
         the display (using the same wording as the Vulkan spec).
      Suggested-by: default avatarMichel Dänzer <michel@daenzer.net>
      Acked-by: default avatarDave Airlie <airlied@redhat.com>
      
      [airlied: left->leaves (Michel)]
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      3064abfa
  2. 20 Oct, 2017 5 commits
    • Keith Packard's avatar
      drm: Reorganize drm_pending_event to support future event types [v2] · bd386e51
      Keith Packard authored
      Place drm_event_vblank in a new union that includes that and a bare
      drm_event structure. This will allow new members of that union to be
      added in the future without changing code related to the existing vbl
      event type.
      
      Assignments to the crtc_id field are now done when the event is
      allocated, rather than when delievered. This way, delivery doesn't
      need to have the crtc ID available.
      
      v2:
       * Remove 'dev' argument from create_vblank_event
      
      	It wasn't being used anyways, and if we need it in the future,
      	we can always get it from crtc->dev.
      
       * Check for MODESETTING before looking for crtc in queue_vblank_event
      
      	UMS drivers will oops if we try to get a crtc, so make sure
      	we're modesetting before we try to find a crtc_id to fill into
      	the event.
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      (cherry picked from commit dc695b85fde88eca3ef3b03fcd82f15b6bc6e462)
      bd386e51
    • Keith Packard's avatar
      drm: Widen vblank count to 64-bits [v3] · 570e8696
      Keith Packard authored
      This modifies the datatypes used by the vblank code to provide 64 bits
      of vblank count.
      
      The driver interfaces have been left using 32 bits of vblank count;
      all of the code necessary to widen that value for the user API was
      already included to handle devices returning fewer than 32-bits.
      
      This will provide the necessary datatypes for the Vulkan API.
      
      v2:
      
       * Re-write wait_vblank ioctl to ABSOLUTE sequence
      
          When an application uses the WAIT_VBLANK ioctl with RELATIVE
          or NEXTONMISS bits set, the target vblank interval is updated
          within the kernel. We need to write that target back to the
          ioctl buffer and update the flags bits so that if the wait is
          interrupted by a signal, when it is re-started, it will target
          precisely the same vblank count as before.
      
       * Leave driver API with 32-bit vblank count
      
      v3:
      
       * Rebase on top of Arnd Bergmann's patch which had
         the switch to ktime_t parts.
      
      [airlied: fix conflict with Ville vblank change].
      Suggested-by: default avatarMichel Dänzer <michel@daenzer.net>
      Suggested-by: default avatarDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      (cherry picked from commit 2affbc16983e4fc90960bc7f70e7615f4228199b)
      570e8696
    • Dave Airlie's avatar
      Merge tag 'drm-amdkfd-next-2017-10-18' of git://people.freedesktop.org/~gabbayo/linux into drm-next · 19f470b2
      Dave Airlie authored
      This is the amdkfd pull request for 4.15 merge window.
      The patches here are relevant only for Kaveri and Carrizo. Still no dGPU patches.
      
      The main goal is to continue alignment with the internal AMD development tree.
      
      The following is a summary of the changes:
      - Improvements and fixes to suspend/resume code
      - Improvements and fixes to process termination code
      - Cleanups in the queue unmapping functionality
      - Reuse code from amdgpu
      
      * tag 'drm-amdkfd-next-2017-10-18' of git://people.freedesktop.org/~gabbayo/linux:
        drm/amdkfd: Improve multiple SDMA queues support per process
        drm/amdkfd: Limit queue number per process and device to 127
        drm/amdkfd: Clean up process queue management
        drm/amdkfd: Compress unnecessary function parameters
        drm/amdkfd: Improve process termination handling
        drm/amdkfd: Avoid submitting an unnecessary packet to HWS
        drm/amdkfd: Fix MQD updates
        drm/amdkfd: Pass filter params to unmap_queues_cpsch
        drm/amdkfd: move locking outside of unmap_queues_cpsch
        drm/amdkfd: Avoid name confusion involved in queue unmapping
        drm/amdkfd: Drop _nocpsch suffix from shared functions
        drm/amdkfd: Reuse CHIP_* from amdgpu v2
        drm/amdkfd: Use VMID bitmap from KGD v2
        drm/amdkfd: Adjust dequeue latencies and timeouts
        drm/amdkfd: Rectify the jiffies calculation error with milliseconds v2
        drm/amdkfd: Fix suspend/resume issue on Carrizo v2
        drm/amdkfd: Reorganize kfd resume code
      19f470b2
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · 282dc832
      Dave Airlie authored
      Last batch of drm/i915 features for v4.15:
      
      - transparent huge pages support (Matthew)
      - uapi: I915_PARAM_HAS_SCHEDULER into a capability bitmask (Chris)
      - execlists: preemption (Chris)
      - scheduler: user defined priorities (Chris)
      - execlists optimization (Michał)
      - plenty of display fixes (Imre)
      - has_ipc fix (Rodrigo)
      - platform features definition refactoring (Rodrigo)
      - legacy cursor update fix (Maarten)
      - fix vblank waits for cursor updates (Maarten)
      - reprogram dmc firmware on resume, dmc state fix (Imre)
      - remove use_mmio_flip module parameter (Maarten)
      - wa fixes (Oscar)
      - huc/guc firmware refacoring (Sagar, Michal)
      - push encoder specific code to encoder hooks (Jani)
      - DP MST fixes (Dhinakaran)
      - eDP power sequencing fixes (Manasi)
      - selftest updates (Chris, Matthew)
      - mmu notifier cpu hotplug deadlock fix (Daniel)
      - more VBT parser refactoring (Jani)
      - max pipe refactoring (Mika Kahola)
      - rc6/rps refactoring and separation (Sagar)
      - userptr lockdep fix (Chris)
      - tracepoint fixes and defunct tracepoint removal (Chris)
      - use rcu instead of abusing stop_machine (Daniel)
      - plenty of other fixes all around (Everyone)
      
      * tag 'drm-intel-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-intel: (145 commits)
        drm/i915: Update DRIVER_DATE to 20171012
        drm/i915: Simplify intel_sanitize_enable_ppgtt
        drm/i915/userptr: Drop struct_mutex before cleanup
        drm/i915/dp: limit sink rates based on rate
        drm/i915/dp: centralize max source rate conditions more
        drm/i915: Allow PCH platforms fall back to BIOS LVDS mode
        drm/i915: Reuse normal state readout for LVDS/DVO fixed mode
        drm/i915: Use rcu instead of stop_machine in set_wedged
        drm/i915: Introduce separate status variable for RC6 and LLC ring frequency setup
        drm/i915: Create generic functions to control RC6, RPS
        drm/i915: Create generic function to setup LLC ring frequency table
        drm/i915: Rename intel_enable_rc6 to intel_rc6_enabled
        drm/i915: Name structure in dev_priv that contains RPS/RC6 state as "gt_pm"
        drm/i915: Move rps.hw_lock to dev_priv and s/hw_lock/pcu_lock
        drm/i915: Name i915_runtime_pm structure in dev_priv as "runtime_pm"
        drm/i915: Separate RPS and RC6 handling for CHV
        drm/i915: Separate RPS and RC6 handling for VLV
        drm/i915: Separate RPS and RC6 handling for BDW
        drm/i915: Remove superfluous IS_BDW checks and non-BDW changes from gen8_enable_rps
        drm/i915: Separate RPS and RC6 handling for gen6+
        ...
      282dc832
    • Dave Airlie's avatar
      Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next · 6585d427
      Dave Airlie authored
      Last set of features for 4.15.  Highlights:
      - Add a bo flag to allow buffers to opt out of implicit sync
      - Add ctx priority setting interface
      - Lots more powerplay cleanups
      - Start to plumb through vram lost infrastructure for gpu reset
      - ttm support for huge pages
      - misc cleanups and bug fixes
      
      * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: (73 commits)
        drm/amd/powerplay: Place the constant on the right side of the test
        drm/amd/powerplay: Remove useless variable
        drm/amd/powerplay: Don't cast kzalloc() return value
        drm/amdgpu: allow GTT overcommit during bind
        drm/amdgpu: linear validate first then bind to GART
        drm/amd/pp: Fix overflow when setup decf/pix/disp dpm table.
        drm/amd/pp: thermal control not enabled on vega10.
        drm/amdgpu: busywait KIQ register accessing (v4)
        drm/amdgpu: report more amdgpu_fence_info
        drm/amdgpu:don't check soft_reset for sriov
        drm/amdgpu:fix duplicated setting job's vram_lost
        drm/amdgpu:reduce wb to 512 slot
        drm/amdgpu: fix regresstion on SR-IOV gpu reset failed
        drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()
        drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce()
        drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm()
        drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm()
        drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd()
        drm/amd/powerplay: Tidy up cz_dpm_powerdown_uvd()
        drm/amd/powerplay: Tidy up cz_start_dpm()
        ...
      6585d427
  3. 19 Oct, 2017 34 commits