]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next-fixes
authorSean Paul <seanpaul@chromium.org>
Tue, 20 Jun 2017 15:50:41 +0000 (11:50 -0400)
committerSean Paul <seanpaul@chromium.org>
Tue, 20 Jun 2017 15:50:41 +0000 (11:50 -0400)
Backmerging airlied/drm-next

12 files changed:
1  2 
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/si.c
drivers/gpu/drm/rockchip/rockchip_drm_drv.h
drivers/gpu/drm/tegra/drm.c
drivers/gpu/host1x/dev.c

Simple merge
Simple merge
Simple merge
index 078fd1bfa5ea8aaa47cd552a8b37766394e76d01,fce4bc5ccc99f576e6dd80de4878a72bcdcae48f..f2c1d030f7f961eaae4438244f67b676a7e15f37
@@@ -3373,31 -3841,26 +3841,32 @@@ skl_plane_downscale_amount(const struc
  
        /* n.b., src is 16.16 fixed point, dst is whole integer */
        if (plane->id == PLANE_CURSOR) {
-               src_w = pstate->base.src_w;
-               src_h = pstate->base.src_h;
 +              /*
 +               * Cursors only support 0/180 degree rotation,
 +               * hence no need to account for rotation here.
 +               */
+               src_w = pstate->base.src_w >> 16;
+               src_h = pstate->base.src_h >> 16;
                dst_w = pstate->base.crtc_w;
                dst_h = pstate->base.crtc_h;
        } else {
-               src_w = drm_rect_width(&pstate->base.src);
-               src_h = drm_rect_height(&pstate->base.src);
 +              /*
 +               * Src coordinates are already rotated by 270 degrees for
 +               * the 90/270 degree plane rotation cases (to match the
 +               * GTT mapping), hence no need to account for rotation here.
 +               */
+               src_w = drm_rect_width(&pstate->base.src) >> 16;
+               src_h = drm_rect_height(&pstate->base.src) >> 16;
                dst_w = drm_rect_width(&pstate->base.dst);
                dst_h = drm_rect_height(&pstate->base.dst);
        }
  
-       downscale_h = max(src_h / dst_h, (uint32_t)DRM_PLANE_HELPER_NO_SCALING);
-       downscale_w = max(src_w / dst_w, (uint32_t)DRM_PLANE_HELPER_NO_SCALING);
 -      if (drm_rotation_90_or_270(pstate->base.rotation))
 -              swap(dst_w, dst_h);
 -
+       fp_w_ratio = fixed_16_16_div(src_w, dst_w);
+       fp_h_ratio = fixed_16_16_div(src_h, dst_h);
+       downscale_w = max_fixed_16_16(fp_w_ratio, u32_to_fixed_16_16(1));
+       downscale_h = max_fixed_16_16(fp_h_ratio, u32_to_fixed_16_16(1));
  
-       /* Provide result in 16.16 fixed point */
-       return (uint64_t)downscale_w * downscale_h >> 16;
+       return mul_fixed16(downscale_w, downscale_h);
  }
  
  static unsigned int
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge