1. 29 3月, 2017 1 次提交
  2. 06 3月, 2017 1 次提交
  3. 28 2月, 2017 1 次提交
  4. 27 2月, 2017 1 次提交
  5. 25 1月, 2017 1 次提交
  6. 30 12月, 2016 1 次提交
  7. 18 12月, 2016 2 次提交
  8. 09 11月, 2016 1 次提交
  9. 17 8月, 2016 1 次提交
  10. 16 8月, 2016 1 次提交
  11. 09 8月, 2016 2 次提交
  12. 17 6月, 2016 1 次提交
  13. 02 6月, 2016 1 次提交
    • D
      drm/doc: Appease sphinx · 2e7a5701
      Daniel Vetter 提交于
      Mostly this is unexpected indents. But really it's just a
      demonstration for my patch, all these issues have been found&fixed
      using the correct source file and line number support I just added.
      All line numbers have been perfectly accurate.
      
      One issue looked a bit fishy in intel_lrc.c, where I don't quite grok
      what sphinx is unhappy about. But since that file looks like it has
      never seen a proper kernel-doc parser I figured better to fix in a
      separate path.
      
      v2: Use fancy new &drm_device->struct_mutex linking (Jani).
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: linux-doc@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      2e7a5701
  14. 11 12月, 2015 2 次提交
    • V
      drm: Pass 'name' to drm_universal_plane_init() · b0b3b795
      Ville Syrjälä 提交于
      Done with coccinelle for the most part. It choked on
      msm/mdp/mdp5/mdp5_plane.c like so:
      "BAD:!!!!!  enum drm_plane_type type;"
      No idea how to deal with that, so I just fixed that up
      by hand.
      
      Also it thinks '...' is part of the semantic patch, so I put an
      'int DOTDOTDOT' placeholder in its place and got rid of it with
      sed afterwards.
      
      I didn't convert drm_plane_init() since passing the varargs through
      would mean either cpp macros or va_list, and I figured we don't
      care about these legacy functions enough to warrant the extra pain.
      
      @@
      typedef uint32_t;
      identifier dev, plane, possible_crtcs, funcs, formats, format_count, type;
      @@
       int drm_universal_plane_init(struct drm_device *dev,
                                    struct drm_plane *plane,
                                    unsigned long possible_crtcs,
                                    const struct drm_plane_funcs *funcs,
                                    const uint32_t *formats,
                                    unsigned int format_count,
                                    enum drm_plane_type type
      +                             ,const char *name, int DOTDOTDOT
                                    )
      { ... }
      
      @@
      identifier dev, plane, possible_crtcs, funcs, formats, format_count, type;
      @@
       int drm_universal_plane_init(struct drm_device *dev,
                                    struct drm_plane *plane,
                                    unsigned long possible_crtcs,
                                    const struct drm_plane_funcs *funcs,
                                    const uint32_t *formats,
                                    unsigned int format_count,
                                    enum drm_plane_type type
      +                             ,const char *name, int DOTDOTDOT
                                    );
      
      @@
      expression E1, E2, E3, E4, E5, E6, E7;
      @@
       drm_universal_plane_init(E1, E2, E3, E4, E5, E6, E7
      +                         ,NULL
                                )
      
      v2: Split crtc and plane changes apart
          Pass NUL for no-name instead of ""
          Leave drm_plane_init() alone
      v3: Add ', or NULL...' to @name kernel doc (Jani)
          Annotate the function with __printf() attribute (Jani)
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449670795-2853-1-git-send-email-ville.syrjala@linux.intel.com
      b0b3b795
    • V
      drm: Pass 'name' to drm_crtc_init_with_planes() · f9882876
      Ville Syrjälä 提交于
      Done with coccinelle for the most part. However, it thinks '...' is
      part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder
      in its place and got rid of it with sed afterwards.
      
      I didn't convert drm_crtc_init() since passing the varargs through
      would mean either cpp macros or va_list, and I figured we don't
      care about these legacy functions enough to warrant the extra pain.
      
      @@
      identifier dev, crtc, primary, cursor, funcs;
      @@
       int drm_crtc_init_with_planes(struct drm_device *dev,
                                     struct drm_crtc *crtc,
                                     struct drm_plane *primary, struct drm_plane *cursor,
                                     const struct drm_crtc_funcs *funcs
      +                              ,const char *name, int DOTDOTDOT
                                     )
      { ... }
      
      @@
      identifier dev, crtc, primary, cursor, funcs;
      @@
       int drm_crtc_init_with_planes(struct drm_device *dev,
                                     struct drm_crtc *crtc,
                                     struct drm_plane *primary, struct drm_plane *cursor,
                                     const struct drm_crtc_funcs *funcs
      +                              ,const char *name, int DOTDOTDOT
                                     );
      
      @@
      expression E1, E2, E3, E4, E5;
      @@
       drm_crtc_init_with_planes(E1, E2, E3, E4, E5
      +                          ,NULL
                                 )
      
      v2: Split crtc and plane changes apart
          Pass NULL for no-name instead of ""
          Leave drm_crtc_init() alone
      v3: Add ', or NULL...' to @name kernel doc (Jani)
          Annotate the function with __printf() attribute (Jani)
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449670771-2751-1-git-send-email-ville.syrjala@linux.intel.com
      f9882876
  15. 08 12月, 2015 1 次提交
    • D
      drm: Reorganize helper vtables and their docs · 092d01da
      Daniel Vetter 提交于
      Currently we have 4 helper libraries (probe, crtc, plane & atomic)
      that all use the same helper vtables. And that's by necessity since we
      don't want to litter the core structs with one ops pointer per helper
      library. Also often the reuse the same hooks (like atomic does, to
      facilite conversion from existing drivers using crtc and plane
      helpers).
      
      Given all that it doesn't make sense to put the docs for these next to
      specific helpers. Instead extract them into a new header file and
      section in the docbook, and add references to them everywhere.
      
      Unfortunately kernel-doc complains when an include directive doesn't
      find anything (and it does by dumping crap into the output file). We
      have to remove the now empty includes to avoid that, instead of leaving
      them in for future proofing.
      
      v2: More OCD in ordering functions.
      
      v3: Spelling plus collate copyright headers properly.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449218769-16577-4-git-send-email-daniel.vetter@ffwll.chReviewed-by: NThierry Reding <treding@nvidia.com>
      092d01da
  16. 24 11月, 2015 1 次提交
  17. 08 9月, 2015 1 次提交
  18. 27 7月, 2015 1 次提交
  19. 22 7月, 2015 1 次提交
    • D
      drm: Roll out drm_for_each_connector more · 9a9f5ce8
      Daniel Vetter 提交于
      Now that we also grab the connection_mutex and so fixed the race with
      atomic modeset we can use the iterator there too.
      
      The other special case is drm_connector_unplug_all which would have a
      locking inversion with the sysfs store/show functions if we'd grab the
      mode_config.mutex around the unplug. We could just grab
      connection_mutex instead, but that's a bit too much a dirty trick for
      my taste. Also it's only used by udl, which doesn't do any other kind
      of connector hotplugging, so should be race-free. Hence just stick
      with a comment for now.
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      9a9f5ce8
  20. 03 7月, 2015 1 次提交
  21. 22 5月, 2015 1 次提交
  22. 08 4月, 2015 1 次提交
  23. 11 3月, 2015 1 次提交
    • D
      drm/plane-helper: Fixup mismerge · 967667fd
      Daniel Vetter 提交于
      I somehow manage to screw up applying Laurent's patch in eca93e28c256:
      "drm: Check in setcrtc if the primary plane supports the fb pixel
      format". It was a conflict with
      
      commit 3461b30b
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Mar 5 10:32:44 2015 +0100
      
          drm/plane-helper: unexport drm_primary_helper_create_plane
      
      and I just didn't check that the solution from wiggle made sense.
      
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: laurent.pinchart@ideasonboard.com
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: laurent.pinchart@ideasonboard.com
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      967667fd
  24. 10 3月, 2015 2 次提交
  25. 05 3月, 2015 1 次提交
  26. 27 1月, 2015 1 次提交
    • T
      drm/plane: Add optional ->atomic_disable() callback · 407b8bd9
      Thierry Reding 提交于
      In order to prevent drivers from having to perform the same checks over
      and over again, add an optional ->atomic_disable callback which the core
      calls under the right circumstances.
      
      v2: pass old state and detect edges to avoid calling ->atomic_disable on
      already disabled planes, remove redundant comment (Daniel Vetter)
      
      v3: rename helper to drm_atomic_plane_disabling() to clarify that it is
      checking for transitions, move helper to drm_atomic_helper.h, clarify
      check for !old_state and its relation to transitional helpers
      
      Here's an extract from some discussion rationalizing the behaviour (for
      a full version, see the reference below):
      
          > > Hm, thinking about this some more this will result in a slight difference
          > > in behaviour, at least when drivers just use the helper ->reset functions
          > > but don't disable everything:
          > > - With transitional helpers we assume we know nothing and call
          > >   ->atomic_disable.
          > > - With atomic old_state->crtc == NULL in the same situation right after
          > >   boot-up, but we asssume the plane is really off and _dont_ call
          > >   ->atomic_disable.
          > >
          > > Should we instead check for (old_state && old_state->crtc) and state that
          > > drivers need to make sure they don't have stuff hanging around?
          >
          > I don't think we can check for old_state because otherwise this will
          > always return false, whereas we really want it to force-disable planes
          > that could be on (lacking any more accurate information). For
          > transitional helpers anyway.
          >
          > For the atomic helpers, old_state will never be NULL, but I'd assume
          > that the driver would reconstruct the current state in ->reset().
      
          By the way, the reason for why old_state can be NULL with transitional
          helpers is the ordering of the steps in the atomic transition. Currently
          the Tegra patches do this (based on your blog post and the Exynos proto-
          type):
      
              1) atomic conversion, phase 1:
                 - implement ->atomic_{check,update,disable}()
                 - use drm_plane_helper_{update,disable}()
      
              2) atomic conversion, phase 2:
                 - call drm_mode_config_reset() from ->load()
                 - implement ->reset()
      
          That's only a partial list of what's done in these steps, but that's the
          only relevant pieces for why old_state is NULL.
      
          What happens is that without ->reset() implemented there won't be any
          initial state, hence plane->state (the old_state here) will be NULL the
          first time atomic state is applied.
      
          We could of course reorder the sequence such that drivers are required
          to hook up ->reset() before they can (or at the same as they) hook up
          the transitional helpers. We could add an appropriate WARN_ON to this
          helper to make that more obvious.
      
          However, that will not solve the problem because it only gets rid of the
          special case. We still don't know whether old_state->crtc == NULL is the
          current state or just the initial default.
      
          So no matter which way we do this, I don't see a way to get away without
          requiring specific semantics from drivers. They would be that:
      
              - drivers recreate the correct state in ->reset() so that
                old_state->crtc != NULL if the plane is really enabled
      
          or
      
              - drivers have to ensure that the real state in fact mirrors the
                initial default as encoded in the state (plane disabled)
      
      References: http://lists.freedesktop.org/archives/dri-devel/2015-January/075578.htmlReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      407b8bd9
  27. 26 1月, 2015 2 次提交
  28. 18 12月, 2014 1 次提交
    • D
      drm/atomic: Introduce state->obj backpointers · 07cc0ef6
      Daniel Vetter 提交于
      Useful since this way we can pass around just the state objects and
      will get ther real object, too.
      
      Specifically this allows us to again simplify the parameters for
      set_crtc_for_plane.
      
      v2: msm already has it's own specific plane_reset hook, don't forget
      that one!
      
      v3: Fixup kerneldoc, reported by 0-day builder.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Reviewed-by: Rob Clark <robdclark@gmail.com> (v2)
      Tested-by: Rob Clark <robdclark@gmail.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      07cc0ef6
  29. 11 12月, 2014 1 次提交
  30. 25 11月, 2014 1 次提交
  31. 07 11月, 2014 2 次提交
    • D
      drm/atomic: Refcounting for plane_state->fb · 321ebf04
      Daniel Vetter 提交于
      So my original plan was that the drm core refcounts framebuffers like
      with the legacy ioctls. But that doesn't work for a bunch of reasons:
      
      - State objects might live longer than until the next fb change
        happens for a plane. For example delayed cleanup work only happens
        _after_ the pageflip ioctl has completed. So this definitely doesn't
        work without the plane state holding its own references.
      
      - The other issue is transition from legacy to atomic implementations,
        where the driver works under a mix of both worlds. Which means
        legacy paths might not properly update the ->fb pointer under
        plane->state->fb. Which is a bit a problem when then someone comes
        around and _does_ try to clean it up when it's long gone.
      
      The second issue is just a bit a transition bug, since drivers should
      update plane->state->fb in all the paths that aren't converted yet.
      But a bit more robustness for the transition can't hurt - we pull
      similar tricks with cleaning up the old fb in the transitional helpers
      already.
      
      The pattern for drivers that transition is
      
      	if (plane->state)
      		drm_atomic_set_fb_for_plane(plane->state, plane->fb);
      
      inserted after the fb update has logically completed at the end of
      ->set_config (or ->set_base/mode_set if using the crtc helpers),
      ->page_flip, ->update_plane or any other entry point which updates
      plane->fb.
      
      v2: Update kerneldoc - copypasta fail.
      
      v3: Fix spelling in the commit message (Sean).
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      321ebf04
    • D
      drm: Docbook integration and over sections for all the new helpers · 3150c7d0
      Daniel Vetter 提交于
      In all cases the text requires that new drivers are converted to the
      atomic interfaces.
      
      v2: Add overview for state handling.
      
      v3: Review from Sean: Some spelling fixes and drop the misguided
      hunk to remove rgba8888 from the plane helpers compat list.
      
      Cc: Sean Paul <seanpaul@chromium.org>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3150c7d0
  32. 06 11月, 2014 2 次提交
    • D
      drm/crtc-helper: Transitional functions using atomic plane helpers · 2f324b42
      Daniel Vetter 提交于
      These two functions allow drivers to reuse their atomic plane helpers
      functions for the primary plane to implement the interfaces required
      by the crtc helpers for the legacy ->set_config callback.
      
      This is purely transitional and won't be used once the driver is fully
      converted. But it allows partial conversions to the atomic plane
      helpers which are functional.
      
      v2:
      - Use ->atomic_duplicate_state if available.
      - Don't forget to run crtc_funcs->atomic_check.
      
      v3: Shift source coordinates correctly for 16.16 fixed point.
      
      v4: Don't forget to call ->atomic_destroy_state if available.
      
      v5: Fixup kerneldoc.
      
      v6: Reuse the plane_commit function from the transitional plane
      helpers to avoid too much duplication.
      
      v7:
      - Remove some stale comment.
      - Correctly handle the lack of plane->state object, necessary for
        transitional use.
      
      v8: Fixup an embarrassing h/vdisplay mixup.
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2f324b42
    • D
      drm/plane-helper: transitional atomic plane helpers · acf24a39
      Daniel Vetter 提交于
      Converting a driver to the atomic interface can be a daunting
      undertaking. One of the prerequisites is to have full universal planes
      support.
      
      To make that transition a bit easier this patch provides plane helpers
      which use the new atomic helper callbacks just only for the plane
      changes. This way the plane update functionality can be tested without
      being forced to convert everything at once.
      
      Of course a real atomic update capable driver will implement the
      all plane properties through the atomic interface, so these helpers
      are mostly transitional. But they can be used to enable proper
      universal plane support, especially once the crtc helpers have also
      been adapted.
      
      v2: Use ->atomic_duplicate_state if available.
      
      v3: Don't forget to call ->atomic_destroy_state if available.
      
      v4: Fixup kerneldoc, reported by Paulo.
      
      v5: Extract a common plane_commit helper and fix some bugs in the
      plane_state setup of the plane_disable implementation.
      
      v6: Fix issues with the cleanup of the old fb. Since transitional
      helpers can be mixed we need to assume that the old fb has been set up
      by a legacy path (e.g. set_config or page_flip when the primary plane
      is converted to use these functions already). Hence pass an additional
      old_fb parameter to plane_commit to do that cleanup work correctly.
      
      v7:
      - Fix spurious WARNING (crtc helpers really love to disable stuff
        harder) and fix array index bonghits.
      - Correctly handle the lack of plane->state object, necessary for
        transitional use.
      - Don't indicate failure if drm_vblank_get doesn't work - that's
        expected when the pipe is in dpms off mode.
      
      v8: Review from Sean:
      - s/fail/out/ to make the meaning of a label more clear.
      - spelling fix in the commit message.
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      acf24a39
  33. 05 11月, 2014 1 次提交