1. 27 12月, 2016 2 次提交
  2. 20 12月, 2016 1 次提交
  3. 19 12月, 2016 1 次提交
  4. 18 12月, 2016 9 次提交
  5. 16 12月, 2016 3 次提交
  6. 15 12月, 2016 6 次提交
    • 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: Nuke fb->bits_per_pixel · 272725c7
      Ville Syrjälä 提交于
      Replace uses of fb->bits_per_pixel with fb->format->cpp[0]*8.
      Less duplicated information is a good thing.
      
      Note that I didn't put parens around the cpp*8 in the below cocci script,
      on account of not wanting spurious parens all over the place. Instead I
      did the unsafe way, and tried to look over the entire diff to spot if
      any dangerous expressions were produced. I didn't see any.
      
      There are some cases where previously the code did X*bpp/8, so the
      division happened after the multiplication. Those are now just X*cpp
      so the division effectively happens before the multiplication,
      but that is perfectly fine since bpp is always a multiple of 8.
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       drm_helper_mode_fill_fb_struct(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       i9xx_get_initial_plane_config(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       ironlake_get_initial_plane_config(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
       skylake_get_initial_plane_config(...) {
      	...
      -	FB->bits_per_pixel = E;
      	...
       }
      
      @@
      struct drm_framebuffer FB;
      expression E;
      @@
      (
      - E * FB.bits_per_pixel / 8
      + E * FB.format->cpp[0]
      |
      - FB.bits_per_pixel / 8
      + FB.format->cpp[0]
      |
      - E * FB.bits_per_pixel >> 3
      + E * FB.format->cpp[0]
      |
      - FB.bits_per_pixel >> 3
      + FB.format->cpp[0]
      |
      - (FB.bits_per_pixel + 7) / 8
      + FB.format->cpp[0]
      |
      - FB.bits_per_pixel
      + FB.format->cpp[0] * 8
      |
      - FB.format->cpp[0] * 8 != 8
      + FB.format->cpp[0] != 1
      )
      
      @@
      struct drm_framebuffer *FB;
      expression E;
      @@
      (
      - E * FB->bits_per_pixel / 8
      + E * FB->format->cpp[0]
      |
      - FB->bits_per_pixel / 8
      + FB->format->cpp[0]
      |
      - E * FB->bits_per_pixel >> 3
      + E * FB->format->cpp[0]
      |
      - FB->bits_per_pixel >> 3
      + FB->format->cpp[0]
      |
      - (FB->bits_per_pixel + 7) / 8
      + FB->format->cpp[0]
      |
      - FB->bits_per_pixel
      + FB->format->cpp[0] * 8
      |
      - FB->format->cpp[0] * 8 != 8
      + FB->format->cpp[0] != 1
      )
      
      @@
      struct drm_plane_state *state;
      expression E;
      @@
      (
      - E * state->fb->bits_per_pixel / 8
      + E * state->fb->format->cpp[0]
      |
      - state->fb->bits_per_pixel / 8
      + state->fb->format->cpp[0]
      |
      - E * state->fb->bits_per_pixel >> 3
      + E * state->fb->format->cpp[0]
      |
      - state->fb->bits_per_pixel >> 3
      + state->fb->format->cpp[0]
      |
      - (state->fb->bits_per_pixel + 7) / 8
      + state->fb->format->cpp[0]
      |
      - state->fb->bits_per_pixel
      + state->fb->format->cpp[0] * 8
      |
      - state->fb->format->cpp[0] * 8 != 8
      + state->fb->format->cpp[0] != 1
      )
      
      @@
      @@
      - (8 * 8)
      + 8 * 8
      
      @@
      struct drm_framebuffer FB;
      @@
      - (FB.format->cpp[0])
      + FB.format->cpp[0]
      
      @@
      struct drm_framebuffer *FB;
      @@
      - (FB->format->cpp[0])
      + FB->format->cpp[0]
      
      @@
      @@
       struct drm_framebuffer {
      	 ...
      -	 int bits_per_pixel;
      	 ...
       };
      
      v2: Clean up the 'cpp*8 != 8' and '(8 * 8)' cases (Laurent)
      v3: Adjusted the semantic patch a bit and regenerated due to code
          changes
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751140-18352-1-git-send-email-ville.syrjala@linux.intel.com
      272725c7
    • V
      drm: Nuke fb->depth · b00c600e
      Ville Syrjälä 提交于
      Replace uses of fb->depth with fb->format->depth. Less duplicate
      information is a good thing.
      
      @@
      struct drm_framebuffer *fb;
      expression E;
      @@
       drm_helper_mode_fill_fb_struct(...) {
      	...
      -	fb->depth = E;
      	...
       }
      
      @@
      struct nouveau_framebuffer *fb;
      @@
      - fb->base.depth
      + fb->base.format->depth
      
      @@
      struct drm_framebuffer fb;
      @@
      - fb.depth
      + fb.format->depth
      
      @@
      struct drm_framebuffer *fb;
      @@
      - fb->depth
      + fb->format->depth
      
      @@
      struct drm_framebuffer fb;
      @@
      - (fb.format->depth)
      + fb.format->depth
      
      @@
      struct drm_framebuffer *fb;
      @@
      - (fb->format->depth)
      + fb->format->depth
      
      @@
      @@
       struct drm_framebuffer {
      	 ...
      -	 unsigned int depth;
      	 ...
       };
      
      v2: Drop the vmw stuff (Daniel)
          Rerun spatch due to code changes
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com
      b00c600e
    • V
      drm: Add drm_framebuffer_plane_{width,height}() · 8f8f6a6c
      Ville Syrjälä 提交于
      Add variants of drm_format_plane_{width,height}() that take an entire fb
      object instead of just the format. These should be more efficent as they
      can just look up the format info from the fb->format pointer rather than
      having to look it up (using a linear search based on the format).
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-30-git-send-email-ville.syrjala@linux.intel.com
      8f8f6a6c
    • V
      drm: Store a pointer to drm_format_info under drm_framebuffer · e14c23c6
      Ville Syrjälä 提交于
      To avoid having to look up the format information struct every time,
      let's just store a pointer to it under drm_framebuffer.
      
      v2: Don't populate the fb->format pointer in drm_framebuffer_init().
          instead we'll treat a NULL format as an error later
      
      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)
      Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-20-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      e14c23c6
    • V
      drm: Pass 'dev' to drm_helper_mode_fill_fb_struct() · a3f913ca
      Ville Syrjälä 提交于
      Pass the drm_device to drm_helper_mode_fill_fb_struct() so that we can
      populate fb->dev early. Will make it easier to use the fb before we
      register it.
      
      @@
      identifier fb, mode_cmd;
      @@
       void drm_helper_mode_fill_fb_struct(
      +				     struct drm_device *dev,
      				     struct drm_framebuffer *fb,
      				     const struct drm_mode_fb_cmd2 *mode_cmd
      				     );
      
      @@
      identifier fb, mode_cmd;
      @@
       void drm_helper_mode_fill_fb_struct(
      +				     struct drm_device *dev,
      				     struct drm_framebuffer *fb,
      				     const struct drm_mode_fb_cmd2 *mode_cmd
      				     )
      { ... }
      
      @@
      function func;
      identifier dev;
      expression E1, E2;
      @@
      func(struct drm_device *dev, ...)
      {
       ...
       drm_helper_mode_fill_fb_struct(
      +				dev,
      				E1, E2);
       ...
      }
      
      @@
      expression E1, E2;
      @@
       drm_helper_mode_fill_fb_struct(
      +				dev,
      				E1, E2);
      
      v2: Rerun spatch due to code changes
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1481748539-18283-1-git-send-email-ville.syrjala@linux.intel.com
      a3f913ca
  7. 14 12月, 2016 1 次提交
  8. 13 12月, 2016 4 次提交
  9. 12 12月, 2016 1 次提交
  10. 10 12月, 2016 2 次提交
  11. 09 12月, 2016 1 次提交
  12. 08 12月, 2016 1 次提交
  13. 03 12月, 2016 1 次提交
    • A
      default exported asm symbols to zero · 8ab2ae65
      Arnd Bergmann 提交于
      With binutils-2.26 and before, a weak missing symbol was kept during the
      final link, and a missing CRC for an export would lead to that CRC being
      treated as zero implicitly.  With binutils-2.27, the crc symbol gets
      dropped, and any module trying to use it will fail to load.
      
      This sets the weak CRC symbol to zero explicitly, making it defined in
      vmlinux, which in turn lets us load the modules referring to that CRC.
      
      The comment above the __CRC_SYMBOL macro suggests that this was always
      the intention, although it also seems that all symbols defined in C have
      a correct CRC these days, and only the exports that are now done in
      assembly need this.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Tested-by: NAdam Borowski <kilobyte@angband.pl>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8ab2ae65
  14. 01 12月, 2016 5 次提交
  15. 30 11月, 2016 1 次提交
  16. 29 11月, 2016 1 次提交