1. 18 12月, 2016 1 次提交
  2. 15 12月, 2016 3 次提交
    • V
      drm: Replace 'format->format' comparisons to just 'format' comparisons · dbd4d576
      Ville Syrjälä 提交于
      Rather than compare the format u32s of two format infos, we can direclty
      compare the format info pointers themselves. Noramlly all the ->format
      pointers all point to somwehere in the big array, so this is a valid
      way to test for equality.
      
      Also drivers may want to point ->format at a private format info struct
      instead (eg. for special compressed formats with extra planes), so
      just comparing the pixel format values wouldn't necessaritly even work.
      But comparing the pointers will also take care of that case.
      
      @@
      struct drm_framebuffer *a;
      struct drm_framebuffer *b;
      @@
      (
      - a->format->format != b->format->format
      + a->format != b->format
      |
      - a->format->format == b->format->format
      + a->format == b->format
      )
      
      @@
      struct drm_plane_state *a;
      struct drm_plane_state *b;
      @@
      (
      - a->fb->format->format != b->fb->format->format
      + a->fb->format != b->fb->format
      |
      - a->fb->format->format == b->fb->format->format
      + a->fb->format == b->fb->format
      )
      
      @@
      struct drm_crtc *crtc;
      struct drm_framebuffer *x;
      @@
      (
      - crtc->primary->fb->format->format != x->format->format
      + crtc->primary->fb->format != x->format
      |
      - x->format->format != crtc->primary->fb->format->format
      + x->format != crtc->primary->fb->format
      )
      
      @@
      struct drm_mode_set *set;
      @@
      - set->fb->format->format != set->crtc->primary->fb->format->format
      + set->fb->format != set->crtc->primary->fb->format
      
      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>
      Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-35-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      dbd4d576
    • 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
  3. 01 12月, 2016 1 次提交
  4. 15 11月, 2016 1 次提交
  5. 09 11月, 2016 1 次提交
    • L
      drm/imx: disable planes before DC · 5ced937b
      Lucas Stach 提交于
      If the DC clock is disabled before the attached IDMACs are properly
      stopped the IDMACs may hang the IPU or even the whole system.
      
      Make sure the IDMACs are in safe state by disabling the planes before
      removal of the DC clock.
      
      Also set the atomic parameter to false to stop calling the atomic_begin
      hook, which does nothing useful as we immediately afterwards turn off
      vblank interrupts and possibly send the pending vblank event.
      
      Fixes: 33f14235 (drm/imx: atomic phase 1: Use transitional atomic
                           CRTC and plane helpers)
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      5ced937b
  6. 08 11月, 2016 1 次提交
  7. 07 11月, 2016 1 次提交
  8. 20 10月, 2016 6 次提交
  9. 18 10月, 2016 4 次提交
  10. 17 10月, 2016 1 次提交
    • A
      drm/imx: hide an unused label · 3e3affe5
      Arnd Bergmann 提交于
      The imx_drm_bind function causes a warning in linux-next when
      CONFIG_DRM_FBDEV_EMULATION is not set:
      
      drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind':
      drivers/gpu/drm/imx/imx-drm-core.c:441:1: error: label 'err_unbind' defined but not used [-Werror=unused-label]
      
      I don't understand why the warning only showed up now, as the
      code has not been modified recently, but there is an obvious
      fix in adding another #if for the symbol.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: c1ff5a7a ("drm/imx: Remove local fbdev emulation Kconfig option")
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      3e3affe5
  11. 30 8月, 2016 1 次提交
  12. 29 8月, 2016 13 次提交
  13. 12 8月, 2016 1 次提交
  14. 11 8月, 2016 1 次提交
    • P
      drm/imx-ldb: Add support to drm-bridge · dc80d703
      Peter Senna Tschudin 提交于
      Add support to attach a drm_bridge to imx-ldb in addition to
      existing support to attach a LVDS panel.
      
      This patch does a simple code refactoring by moving code
      from for_each_child_of_node iterator to a new function named
      imx_ldb_panel_ddc(). This was necessary to allow the panel ddc
      code to run only when the imx_ldb is not attached to a bridge.
      
      Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Signed-off-by: NPeter Senna Tschudin <peter.senna@collabora.com>
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      dc80d703
  15. 08 8月, 2016 4 次提交