Merge tag 'topic/drm-misc-2016-10-24' of git://anongit.freedesktop.org/drm-intel...
authorDave Airlie <airlied@redhat.com>
Tue, 25 Oct 2016 06:35:20 +0000 (16:35 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 25 Oct 2016 06:35:20 +0000 (16:35 +1000)
First -misc pull for 4.10:
- drm_format rework from Laurent
- reservation patches from Chris that missed 4.9.
- aspect ratio support in infoframe helpers and drm mode/edid code
  (Shashank Sharma)
- rotation rework from Ville (first parts at least)
- another attempt at the CRC debugfs interface from Tomeu
- piles and piles of misc patches all over

* tag 'topic/drm-misc-2016-10-24' of git://anongit.freedesktop.org/drm-intel: (55 commits)
  drm: Use u64 for intermediate dotclock calculations
  drm/i915: Use the per-plane rotation property
  drm/omap: Use per-plane rotation property
  drm/omap: Set rotation property initial value to BIT(DRM_ROTATE_0) insted of 0
  drm/atmel-hlcdc: Use per-plane rotation property
  drm/arm: Use per-plane rotation property
  drm: Add support for optional per-plane rotation property
  drm/atomic: Reject attempts to use multiple rotation angles at once
  drm: Add drm_rotation_90_or_270()
  dma-buf/sync_file: hold reference to fence when creating sync_file
  drm/virtio: kconfig: Fixup white space.
  drm/fence: release fence reference when canceling event
  drm/i915: Handle early failure during intel_get_load_detect_pipe
  drm/fb_cma_helper: do not free fbdev if there is none
  drm: fix sparse warnings on undeclared symbols in crc debugfs
  gpu: Remove depends on RESET_CONTROLLER when not a provider
  i915: don't call drm_atomic_state_put on invalid pointer
  drm: Don't export the drm_fb_get_bpp_depth() function
  drm/arm: mali-dp: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
  drm: vmwgfx: Replace drm_fb_get_bpp_depth() with drm_format_info()
  ...

1  2 
drivers/gpu/drm/drm_debugfs.c
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -3568,41 -3560,6 +3568,41 @@@ static int skl_compute_plane_wm(const s
        cpp = drm_format_plane_cpp(fb->pixel_format, 0);
        plane_pixel_rate = skl_adjusted_plane_pixel_rate(cstate, intel_pstate);
  
-       if (intel_rotation_90_or_270(pstate->rotation)) {
++      if (drm_rotation_90_or_270(pstate->rotation)) {
 +              int cpp = (fb->pixel_format == DRM_FORMAT_NV12) ?
 +                      drm_format_plane_cpp(fb->pixel_format, 1) :
 +                      drm_format_plane_cpp(fb->pixel_format, 0);
 +
 +              switch (cpp) {
 +              case 1:
 +                      y_min_scanlines = 16;
 +                      break;
 +              case 2:
 +                      y_min_scanlines = 8;
 +                      break;
 +              default:
 +                      WARN(1, "Unsupported pixel depth for rotation");
 +              case 4:
 +                      y_min_scanlines = 4;
 +                      break;
 +              }
 +      } else {
 +              y_min_scanlines = 4;
 +      }
 +
 +      plane_bytes_per_line = width * cpp;
 +      if (fb->modifier[0] == I915_FORMAT_MOD_Y_TILED ||
 +          fb->modifier[0] == I915_FORMAT_MOD_Yf_TILED) {
 +              plane_blocks_per_line =
 +                    DIV_ROUND_UP(plane_bytes_per_line * y_min_scanlines, 512);
 +              plane_blocks_per_line /= y_min_scanlines;
 +      } else if (fb->modifier[0] == DRM_FORMAT_MOD_NONE) {
 +              plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512)
 +                                      + 1;
 +      } else {
 +              plane_blocks_per_line = DIV_ROUND_UP(plane_bytes_per_line, 512);
 +      }
 +
        method1 = skl_wm_method1(plane_pixel_rate, cpp, latency);
        method2 = skl_wm_method2(plane_pixel_rate,
                                 cstate->base.adjusted_mode.crtc_htotal,