1. 24 Aug, 2018 2 commits
    • Lowry Li's avatar
      drm: Add per-plane pixel blend mode property · a5ec8332
      Lowry Li authored
      Pixel blend modes represent the alpha blending equation
      selection, describing how the pixels from the current
      plane are composited with the background.
      
      Adds a pixel_blend_mode to drm_plane_state and a
      blend_mode_property to drm_plane, and related support
      functions.
      
      Defines three blend modes in drm_blend.h.
      
      Changes since v1:
       - Moves the blending equation into the DOC comment
       - Refines the comments of drm_plane_create_blend_mode_property to not
         enumerate the #defines, but instead the string values
       - Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha
      Changes since v2:
       - Refines the comments of drm_plane_create_blend_mode_property:
            1) Puts the descriptions (after the ":") on a new line
            2) Adds explaining why @supported_modes need PREMUL as default
      Changes since v3:
       - Refines drm_plane_create_blend_mode_property(). drm_property_add_enum()
         can calculate the index itself just fine, so no point in having the
         caller pass it in.
       - Since the current DRM assumption is that alpha is premultiplied
         as default, define DRM_MODE_BLEND_PREMULTI as 0 will be better.
       - Refines some comments.
      Changes since v4:
       - Adds comments in drm_blend.h.
       - Removes setting default value in drm_plane_create_blend_mode_property()
         as it is already in __drm_atomic_helper_plane_reset().
       - Fixes to use state->pixel_blend_mode instead of using
         plane->state->pixel_blend_mode in reset function.
       - Rebases on drm-misc-next.
      Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      Signed-off-by: default avatarLowry Li <lowry.li@arm.com>
      Signed-off-by: default avatarAyan Kumar Halder <ayan.halder@arm.com>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/245734/
      a5ec8332
    • Gustavo A. R. Silva's avatar
      drm/sun4i: tcon-top: Use struct_size() in devm_kzalloc() · 06e3c297
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding
      the size of a structure that has a zero-sized array at the end, along
      with memory for some number of elements for that array. For example:
      
      struct foo {
      	int stuff;
              void *entry[];
      };
      
      instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can
      now use the new struct_size() helper:
      
      instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL);
      
      This issue was detected with the help of Coccinelle.
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180824010521.GA25451@embeddedor.com
      06e3c297
  2. 22 Aug, 2018 4 commits
  3. 21 Aug, 2018 1 commit
  4. 20 Aug, 2018 1 commit
  5. 17 Aug, 2018 5 commits
  6. 16 Aug, 2018 3 commits
  7. 14 Aug, 2018 6 commits
  8. 13 Aug, 2018 8 commits
  9. 10 Aug, 2018 7 commits
  10. 09 Aug, 2018 1 commit
  11. 08 Aug, 2018 2 commits