Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665339

linux-next: manual merge of the drm tree with the drm-intel-fixes tree

From Stephen Rothwell <sfr@canb.auug.org.au>
Newsgroups linux.kernel
Subject linux-next: manual merge of the drm tree with the drm-intel-fixes tree
Date 2017-06-14 03:00 +0200
Message-ID <tS4P8-6AG-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Dave,

Today's linux-next merge of the drm tree got a conflict in:

  drivers/gpu/drm/i915/intel_pm.c

between commit:

  1c2d6bbf0433 ("drm/i915: Fix SKL+ watermarks for 90/270 rotation")

from the drm-intel-fixes tree and commit:

  7084b50bdd8f ("drm/i915/skl+: calculate pixel_rate & relative_data_rate in fixed point")

from the drm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/intel_pm.c
index 078fd1bfa5ea,936eef1634c7..000000000000
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@@ -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) {
 +		/*
 +		 * Cursors only support 0/180 degree rotation,
 +		 * hence no need to account for rotation here.
 +		 */
- 		src_w = pstate->base.src_w;
- 		src_h = pstate->base.src_h;
+ 		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 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);
- 		src_h = drm_rect_height(&pstate->base.src);
+ 		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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

linux-next: manual merge of the drm tree with the drm-intel-fixes  tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-06-14 03:00 +0200

csiph-web