1. 09 5月, 2018 1 次提交
  2. 10 3月, 2018 3 次提交
  3. 06 3月, 2018 1 次提交
  4. 29 1月, 2018 1 次提交
  5. 21 11月, 2017 3 次提交
  6. 20 10月, 2017 1 次提交
  7. 14 10月, 2017 1 次提交
  8. 02 8月, 2017 1 次提交
    • B
      drm: Plumb modifiers through plane init · e6fc3b68
      Ben Widawsky 提交于
      This is the plumbing for supporting fb modifiers on planes. Modifiers
      have already been introduced to some extent, but this series will extend
      this to allow querying modifiers per plane. Based on this, the client to
      enable optimal modifications for framebuffers.
      
      This patch simply allows the DRM drivers to initialize their list of
      supported modifiers upon initializing the plane.
      
      v2: A minor addition from Daniel
      
      v3:
      * Updated commit message
      * s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
      * Remove some excess newlines (Liviu)
      * Update comment for > 64 modifiers (Liviu)
      
      v4: Minor comment adjustments (Liviu)
      
      v5: Some new platforms added due to rebase
      
      v6: Add some missed plane inits (or maybe they're new - who knows at
      this point) (Daniel)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
      Reviewed-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NDaniel Stone <daniels@collabora.com>
      e6fc3b68
  9. 23 6月, 2017 1 次提交
  10. 16 6月, 2017 1 次提交
    • E
      drm/vc4: Add T-format scanout support. · 98830d91
      Eric Anholt 提交于
      The T tiling format is what V3D uses for textures, with no raster
      support at all until later revisions of the hardware (and always at a
      large 3D performance penalty).  If we can't scan out V3D's format,
      then we often need to do a relayout at some stage of the pipeline,
      either right before texturing from the scanout buffer (common in X11
      without a compositor) or between a tiled screen buffer right before
      scanout (an option I've considered in trying to resolve this
      inconsistency, but which means needing to use the dirty fb ioctl and
      having some update policy).
      
      T-format scanout lets us avoid either of those shadow copies, for a
      massive, obvious performance improvement to X11 window dragging
      without a compositor.  Unfortunately, enabling a compositor to work
      around the discrepancy has turned out to be too costly in memory
      consumption for the Raspbian distribution.
      
      Because the HVS operates a scanline at a time, compositing from T does
      increase the memory bandwidth cost of scanout.  On my 1920x1080@32bpp
      display on a RPi3, we go from about 15% of system memory bandwidth
      with linear to about 20% with tiled.  However, for X11 this still ends
      up being a huge performance win in active usage.
      
      This patch doesn't yet handle src_x/src_y offsetting within the tiled
      buffer.  However, we fail to do so for untiled buffers already.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170608001336.12842-1-eric@anholt.netReviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      98830d91
  11. 22 5月, 2017 1 次提交
  12. 29 3月, 2017 1 次提交
  13. 18 3月, 2017 1 次提交
  14. 01 3月, 2017 1 次提交
  15. 09 2月, 2017 1 次提交
  16. 03 2月, 2017 1 次提交
    • C
      drm: Improve drm_mm search (and fix topdown allocation) with rbtrees · 4e64e553
      Chris Wilson 提交于
      The drm_mm range manager claimed to support top-down insertion, but it
      was neither searching for the top-most hole that could fit the
      allocation request nor fitting the request to the hole correctly.
      
      In order to search the range efficiently, we create a secondary index
      for the holes using either their size or their address. This index
      allows us to find the smallest hole or the hole at the bottom or top of
      the range efficiently, whilst keeping the hole stack to rapidly service
      evictions.
      
      v2: Search for holes both high and low. Rename flags to mode.
      v3: Discover rb_entry_safe() and use it!
      v4: Kerneldoc for enum drm_mm_insert_mode.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Sinclair Yeh <syeh@vmware.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: Sinclair Yeh <syeh@vmware.com> # vmwgfx
      Reviewed-by: Lucas Stach <l.stach@pengutronix.de> #etnaviv
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170202210438.28702-1-chris@chris-wilson.co.uk
      4e64e553
  17. 15 12月, 2016 3 次提交
    • V
      drm: Nuke fb->pixel_format · 438b74a5
      Ville Syrjälä 提交于
      Replace uses of fb->pixel_format with fb->format->format.
      Less duplicated information is a good thing.
      
      Note that coccinelle failed to eliminate the
      "/* fourcc format */" comment from drm_framebuffer.h, so I had
      to do that part manually.
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       drm_helper_mode_fill_fb_struct(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       i9xx_get_initial_plane_config(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       ironlake_get_initial_plane_config(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       skylake_get_initial_plane_config(...) {
      	...
      -	FB->pixel_format = E;
      	...
       }
      
      @@
      struct drm_framebuffer *a;
      struct drm_framebuffer b;
      @@
      (
      - a->pixel_format
      + a->format->format
      |
      - b.pixel_format
      + b.format->format
      )
      
      @@
      struct drm_plane_state *a;
      struct drm_plane_state b;
      @@
      (
      - a->fb->pixel_format
      + a->fb->format->format
      |
      - b.fb->pixel_format
      + b.fb->format->format
      )
      
      @@
      struct drm_crtc *CRTC;
      @@
      (
      - CRTC->primary->fb->pixel_format
      + CRTC->primary->fb->format->format
      |
      - CRTC->primary->state->fb->pixel_format
      + CRTC->primary->state->fb->format->format
      )
      
      @@
      struct drm_mode_set *set;
      @@
      (
      - set->fb->pixel_format
      + set->fb->format->format
      |
      - set->crtc->primary->fb->pixel_format
      + set->crtc->primary->fb->format->format
      )
      
      @@
      @@
       struct drm_framebuffer {
      	 ...
      -	 uint32_t pixel_format;
      	 ...
       };
      
      v2: Fix commit message (Laurent)
          Rebase due to earlier removal of many fb->pixel_format uses,
          including the 'fb->format = drm_format_info(fb->format->format);'
          snafu
      v3: Adjusted the semantic patch a bit and regenerated due to code
          changes
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com
      438b74a5
    • V
      drm: Replace drm_format_plane_cpp() with fb->format->cpp[] · 353c8598
      Ville Syrjälä 提交于
      Replace drm_format_plane_cpp(fb->pixel_format) with just
      fb->format->cpp[]. Avoids the expensive format info lookup.
      
      @@
      struct drm_framebuffer *a;
      struct drm_framebuffer b;
      expression E;
      @@
      (
      - drm_format_plane_cpp(a->pixel_format, E)
      + a->format->cpp[E]
      |
      - drm_format_plane_cpp(b.pixel_format, E)
      + b.format->cpp[E]
      )
      
      @@
      struct drm_plane_state *a;
      struct drm_plane_state b;
      expression E;
      @@
      (
      - drm_format_plane_cpp(a->fb->pixel_format, E)
      + a->fb->format->cpp[E]
      |
      - drm_format_plane_cpp(b.fb->pixel_format, E)
      + b.fb->format->cpp[E]
      )
      
      @@
      struct drm_framebuffer *a;
      identifier T;
      expression E;
      @@
        T = a->pixel_format
      <+...
      - drm_format_plane_cpp(T, E)
      + a->format->cpp[E]
      ...+>
      
      @@
      struct drm_framebuffer b;
      identifier T;
      expression E;
      @@
        T = b.pixel_format
      <+...
      - drm_format_plane_cpp(T, E)
      + b.format->cpp[E]
      ...+>
      
      v2: Rerun spatch due to code changes
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Suggested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751057-18123-1-git-send-email-ville.syrjala@linux.intel.com
      353c8598
    • V
      drm: Replace drm_format_num_planes() with fb->format->num_planes · bcb0b461
      Ville Syrjälä 提交于
      Replace drm_format_num_planes(fb->pixel_format) with just
      fb->format->num_planes. Avoids the expensive format info lookup.
      
      @@
      struct drm_framebuffer *a;
      struct drm_framebuffer b;
      @@
      (
      - drm_format_num_planes(a->pixel_format)
      + a->format->num_planes
      |
      - drm_format_num_planes(b.pixel_format)
      + b.format->num_planes
      )
      
      @@
      struct drm_plane_state *a;
      struct drm_plane_state b;
      @@
      (
      - drm_format_num_planes(a->fb->pixel_format)
      + a->fb->format->num_planes
      |
      - drm_format_num_planes(b.fb->pixel_format)
      + b.fb->format->num_planes
      )
      
      @@
      struct drm_framebuffer *a;
      identifier T;
      @@
        T = a->pixel_format
      <+...
      - drm_format_num_planes(T)
      + a->format->num_planes
      ...+>
      
      @@
      struct drm_framebuffer b;
      identifier T;
      @@
        T = b.pixel_format
      <+...
      - drm_format_num_planes(T)
      + b.format->num_planes
      ...+>
      
      v2: Rerun spatch due to code changes
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Suggested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751022-18015-1-git-send-email-ville.syrjala@linux.intel.com
      bcb0b461
  18. 19 8月, 2016 1 次提交
  19. 08 7月, 2016 1 次提交
  20. 02 6月, 2016 1 次提交
  21. 17 5月, 2016 1 次提交
  22. 17 2月, 2016 8 次提交
  23. 11 12月, 2015 1 次提交
    • 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
  24. 08 12月, 2015 1 次提交
  25. 18 11月, 2015 2 次提交
  26. 21 10月, 2015 1 次提交
    • E
      drm/vc4: Add KMS support for Raspberry Pi. · c8b75bca
      Eric Anholt 提交于
      This is enough for fbcon and bringing up X using
      xf86-video-modesetting.  It doesn't support the 3D accelerator or
      power management yet.
      
      v2: Drop FB_HELPER select thanks to Archit's patches.  Do manual init
          ordering instead of using the .load hook.  Structure registration
          more like tegra's, but still using the typical "component" code.
          Drop no-op hooks for atomic_begin and mode_fixup() now that
          they're optional.  Drop sentinel in Makefile.  Fix minor style
          nits I noticed on another reread.
      
      v3: Use the new bcm2835 clk driver to manage pixel/HSM clocks instead
          of having a fixed video mode.  Use exynos-style component driver
          matching instead of devicetree nodes to list the component driver
          instances.  Rename compatibility strings to say bcm2835, and
          distinguish pv0/1/2.  Clean up some h/vsync code, and add in
          interlaced mode setup.  Fix up probe/bind error paths.  Use
          bitops.h macros for vc4_regs.h
      
      v4: Include i2c.h, allow building under COMPILE_TEST, drop msleep now
          that other bugs have been fixed, add timeouts to cpu_relax()
          loops, rename hpd-gpio to hpd-gpios.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c8b75bca