1. 10 6月, 2016 5 次提交
    • L
      drm: Fix comment making reference to non-existing function · 5c0be3f1
      Liviu Dudau 提交于
      Documentation for drm_atomic_crtc_for_each_plane() makes reference to
      a function called drm_crtc_for_each_pending_plane(). I've guessed that
      the actual function name is drm_atomic_crtc_state_for_each_plane() as
      that matches best the intent of the comment.
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465571005-3877-1-git-send-email-Liviu.Dudau@arm.com
      5c0be3f1
    • D
      drm/atomic-helper: nonblocking commit support · 9f2a7950
      Daniel Vetter 提交于
      Design ideas:
      
      - split up the actual commit into different phases, and have
        completions for each of them. This will be useful for the future
        when we want to interleave phases much more aggressively, for e.g.
        queue depth > 1. For not it's just a minimal optimization compared
        to current common nonblocking implementation patterns from drivers,
        which all stall for the entire commit to complete, including vblank
        waits and cleanups.
      
      - Extract a separate atomic_commit_hw hook since that's the part most
        drivers will need to overwrite, hopefully allowing even more shared
        code.
      
      - Enforce EBUSY seamntics by attaching one of the completions to the
        flip_done vblank event. Side benefit of forcing atomic drivers using
        these helpers to implement event handlign at least semi-correct. I'm
        evil that way ;-)
      
      - Ridiculously modular, as usual.
      
      - The main tracking unit for a commit stays struct drm_atomic_state,
        and the ownership rules for that are unchanged. Ownership still
        gets transferred to the driver (and subsequently to the worker) on
        successful commits. What is added is a small, per-crtc, refcounted
        structure to track pending commits called struct drm_crtc_commit.
        No actual state is attached to that though, it's purely for ordering
        and waiting.
      
      - Dependencies are implicitly handled by assuming that any CRTC part
        of &drm_atomic_state is a dependency, and that the current commit
        must wait for any commits to complete on those CRTC. This way
        drivers can easily add more depencies using
        drm_atomic_get_crtc_state(), which is very natural since in most
        case a dependency exists iff there's some bit of state that needs to
        be cross checked.
      
        Removing depencies is not possible, drivers simply need to be
        careful to not include every CRTC in a commit if that's not
        necessary. Which is a good idea anyway, since that also avoids
        ww_mutex lock contention.
      
      - Queue depth > 1 sees some prep work in this patch by adding a stall
        paramater to drm_atomic_helper_swap_states(). To be able to push
        commits entirely free-standing and in a deeper queue through the
        back-end the driver must not access any obj->state pointers. This
        means we need to track the old state in drm_atomic_state (much
        easier with the consolidated arrays), and pass them all explicitly
        to driver backends (this will be serious amounts of churn).
      
        Once that's done stall can be set to false in swap_states.
      
      v2: Dont ask for flip_done signalling when the CRTC is off and stays
      off: Drivers don't handle events in that case. Instead complete right
      away. This way future commits don't need to have special-case logic,
      but can keep blocking for the flip_done completion.
      
      v3: Tons of fixes:
      - Stall for preceeding commit for real, not the current one by
        accident.
      - Add WARN_ON in case drivers don't fire the drm event.
      - Don't double-free drm events.
      
      v4: Make legacy cursor not stall.
      
      v5: Extend the helper hook to cover the entire commit tail. Some
      drivers need special code for cleanup and vblank waiting, this makes
      it a bit more useful. Inspired by the rockchip driver.
      
      v6: Add WARN_ON to catch drivers who forget to send out the
      drm event.
      
      v7: Fixup the stalls in swap_state for real!!
      
      v8:
      - Fixup trailing whitespace, spotted by Maarten.
      - Actually wait for flip_done in cleanup_done, like the comment says
        we should do. Thanks a lot for Tomeu for helping with debugging this
        on.
      
      v9: Now with awesome kerneldoc!
      
      v10: Split out drm_crtc_commit tracking infrastructure.
      
      v:
      - Add missing static (Gustavo).
      - Split out the sync functions, only do the actual nonblocking
        logic in this patch (Maarten).
      
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Tested-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Tested-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Testcase: igt/kms_flip/*
      Testcase: igt/kms_cursor*
      Testcase: igt/kms*plane*
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-10-git-send-email-daniel.vetter@ffwll.ch
      9f2a7950
    • D
      drm/atomic-helper: roll out commit synchronization · a095caa7
      Daniel Vetter 提交于
      To facilitate easier reviewing this is split out from the overall
      nonblocking commit rework. It just rolls out the helper functions
      and uses them in the main drm_atomic_helper_commit() function
      to make it clear where in the flow they're used.
      
      The next patch will actually split drm_atomic_helper_commit() into
      2 pieces, with the tail being run asynchronously from a worker.
      
      v2: Improve kerneldocs (Maarten).
      
      v3: Don't convert ERESTARTSYS to EINTR (Maarten). Also don't fail if
      the wait succeed in stall_check - we need to convert that case (it
      returns the remaining jiffies) to 0 for success.
      
      v4: Switch to long for wait_for_completion_timeout return value
      everywhere (Maarten).
      
      v5: Fix miscaped function in kerneldoc (Maarten).
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Tested-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Tested-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465398936-22305-1-git-send-email-daniel.vetter@ffwll.ch
      a095caa7
    • D
      drm/atomic: Add struct drm_crtc_commit to track async updates · 3b24f7d6
      Daniel Vetter 提交于
      Split out from my big nonblocking atomic commit helper code as prep
      work. While add it, also add some neat asciiart to document how it's
      supposed to be used.
      
      v2: Resurrect misplaced hunk in the kerneldoc.
      
      v3: Wording improvements from Liviu.
      Tested-by: NTomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Tested-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-8-git-send-email-daniel.vetter@ffwll.ch
      3b24f7d6
    • D
      drm/atomic-helper: Massage swap_state signature somewhat · 5e84c269
      Daniel Vetter 提交于
      - dev is redundant, we have state->atomic
      - add stall parameter, which must be set when swapping needs to stall
        for preceeding commits to stop looking at ->state pointers. Currently
        all drivers need this to be, just prep work for a glorious future.
      
      v2: Rebased on top of
      
      commit e7cf0963
      Author: Gerd Hoffmann <kraxel@redhat.com>
      Date:   Tue May 31 08:50:47 2016 +0200
      
          virtio-gpu: add atomic_commit function
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1465509992-19284-1-git-send-email-daniel.vetter@ffwll.ch
      Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-2-git-send-email-daniel.vetter@ffwll.ch
      5e84c269
  2. 09 6月, 2016 4 次提交
  3. 08 6月, 2016 1 次提交
  4. 07 6月, 2016 4 次提交
  5. 06 6月, 2016 1 次提交
    • E
      devpts: Make each mount of devpts an independent filesystem. · eedf265a
      Eric W. Biederman 提交于
      The /dev/ptmx device node is changed to lookup the directory entry "pts"
      in the same directory as the /dev/ptmx device node was opened in.  If
      there is a "pts" entry and that entry is a devpts filesystem /dev/ptmx
      uses that filesystem.  Otherwise the open of /dev/ptmx fails.
      
      The DEVPTS_MULTIPLE_INSTANCES configuration option is removed, so that
      userspace can now safely depend on each mount of devpts creating a new
      instance of the filesystem.
      
      Each mount of devpts is now a separate and equal filesystem.
      
      Reserved ttys are now available to all instances of devpts where the
      mounter is in the initial mount namespace.
      
      A new vfs helper path_pts is introduced that finds a directory entry
      named "pts" in the directory of the passed in path, and changes the
      passed in path to point to it.  The helper path_pts uses a function
      path_parent_directory that was factored out of follow_dotdot.
      
      In the implementation of devpts:
       - devpts_mnt is killed as it is no longer meaningful if all mounts of
         devpts are equal.
       - pts_sb_from_inode is replaced by just inode->i_sb as all cached
         inodes in the tty layer are now from the devpts filesystem.
       - devpts_add_ref is rolled into the new function devpts_ptmx.  And the
         unnecessary inode hold is removed.
       - devpts_del_ref is renamed devpts_release and reduced to just a
         deacrivate_super.
       - The newinstance mount option continues to be accepted but is now
         ignored.
      
      In devpts_fs.h definitions for when !CONFIG_UNIX98_PTYS are removed as
      they are never used.
      
      Documentation/filesystems/devices.txt is updated to describe the current
      situation.
      
      This has been verified to work properly on openwrt-15.05, centos5,
      centos6, centos7, debian-6.0.2, debian-7.9, debian-8.2, ubuntu-14.04.3,
      ubuntu-15.10, fedora23, magia-5, mint-17.3, opensuse-42.1,
      slackware-14.1, gentoo-20151225 (13.0?), archlinux-2015-12-01.  With the
      caveat that on centos6 and on slackware-14.1 that there wind up being
      two instances of the devpts filesystem mounted on /dev/pts, the lower
      copy does not end up getting used.
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Peter Anvin <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Serge Hallyn <serge.hallyn@ubuntu.com>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
      Cc: Jann Horn <jann@thejh.net>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Florian Weimer <fw@deneb.enyo.de>
      Cc: Konstantin Khlebnikov <koct9i@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eedf265a
  6. 04 6月, 2016 3 次提交
  7. 03 6月, 2016 21 次提交
  8. 02 6月, 2016 1 次提交