lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170614105645.12390dfb@canb.auug.org.au>
Date:   Wed, 14 Jun 2017 10:56:45 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Dave Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Intel Graphics <intel-gfx@...ts.freedesktop.org>,
        DRI <dri-devel@...ts.freedesktop.org>
Cc:     Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Ville Syrjälä <ville.syrjala@...ux.intel.com>,
        Jani Nikula <jani.nikula@...el.com>,
        Mahesh Kumar <mahesh1.kumar@...el.com>,
        Matt Roper <matthew.d.roper@...el.com>
Subject: linux-next: manual merge of the drm tree with the drm-intel-fixes
 tree

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ