From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 1/3] drm/i915: add SNB and IVB video sprite support v6 Date: Thu, 23 Feb 2012 09:01:36 -0800 Message-ID: <20120223090136.597a4864@jbarnes-desktop> References: <1323811180-17581-1-git-send-email-jbarnes@virtuousgeek.org> <6EEEFEA51F031E4EA5EF3AB55941C5F00FCDD377@SHSMSX102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1688426939==" Return-path: Received: from oproxy9.bluehost.com (oproxy9.bluehost.com [69.89.24.6]) by gabe.freedesktop.org (Postfix) with SMTP id 9C559A112F for ; Thu, 23 Feb 2012 09:01:43 -0800 (PST) In-Reply-To: <6EEEFEA51F031E4EA5EF3AB55941C5F00FCDD377@SHSMSX102.ccr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: "Lan, Hai" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org --===============1688426939== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/IbA3S15u6.8Nt+fY5_GfFAh"; protocol="application/pgp-signature" --Sig_/IbA3S15u6.8Nt+fY5_GfFAh Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 15 Feb 2012 03:18:42 +0000 "Lan, Hai" wrote: > Hi Jesse, > I have tested the video sprite with intel-gpu-tools on SNB and found a bu= g. > When setting overlay position with x<0, it will divide 0 and make drm dri= ver crash.=20 > I have fixed it. Please see my patch. Thanks. >=20 > Hai Lan >=20 > > -----Original Message----- > > From: intel-gfx-bounces+hai.lan=3Dintel.com@lists.freedesktop.org > > [mailto:intel-gfx-bounces+hai.lan=3Dintel.com@lists.freedesktop.org] On > > Behalf Of Jesse Barnes > > Sent: Wednesday, December 14, 2011 5:20 AM > > To: intel-gfx@lists.freedesktop.org > > Subject: [Intel-gfx] [PATCH 1/3] drm/i915: add SNB and IVB video sprite > > support v6 > >=20 > > The video sprites support various video surface formats natively and can > > handle scaling as well. So add support for them using the new DRM core > > sprite support functions. >=20 >=20 > > +static bool > > +sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane, > > + uint32_t sprite_width, int pixel_size, > > + const struct intel_watermark_params *display, > > + int latency_ns, int *sprite_wm) > > +{ > > + struct drm_crtc *crtc; > > + unsigned long line_time_us; > > + int clock; > > + int line_count, line_size; > > + int small, large; > > + int entries; > > + > > + if (!latency_ns) { > > + *sprite_wm =3D 0; > > + return false; > > + } > > + > > + crtc =3D intel_get_crtc_for_plane(dev, plane); > > + clock =3D crtc->mode.clock; > > + > > + line_time_us =3D (sprite_width * 1000) / clock; > > + line_count =3D (latency_ns / line_time_us + 1000) / 1000; > > + line_size =3D sprite_width * pixel_size; > > + >=20 Applied, thanks Hai. --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/IbA3S15u6.8Nt+fY5_GfFAh Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJPRnDwAAoJEIEoDkX4Qk9hnaQQAMd9Hun3422WGqQ4zIjzY9La tXmBwRxxEI8CgJRHn0qapsVjKOIOGQ74v/0f502i4oOQlvrHOj07eWuDbfXon21H +I6t3e6Tsm2L+/dtqmBXk1znsUFLwfDsJOjDIT0p+f+HoDxIIKw9X8zX7/IF/fWr tEG25NIyuMscJV4u2c6XTSNKMTd0PcaJdqUlgkMbUEcM/lyX1xy4fxTodIYq9YXk Oil+JBkRllR4wxfbEU7OG/9hQlZK8LKOjMDbAjpFm1oU46G7AZNdSlPCFHLEaotV 8BH33+p1wiIibhNuJZLyb/EaSW/Qh6zf4465+/mbazj5SwhhGudil6JtSwloYXjp HZm2Nk77MPdhWW7JI7Ik4BQ6aK2WydgBenJDMDtIBNH1oznwhh3pnnJVfSAoPYTX b+99/PBhe+rfMEAfDwUQkqKs4ngHVmwhjHoKnm28jMtL0lgFjQsJeU4ttRkONo9C 6gns7x2onroAfc7BJBc9ImbPz5fyvpKnpmW2g8jn2mxHBksam5jnzIjW88zP+RZa 6E+kel+hbGdbi3EM7DtnssV3Xd4uA5xItOR38vFI4jS2Sez0ZU7YU39CuymDT6WG HYyjvJuBJaHot5LrOlZjr48ophXEqy1merd0T+ljHdMMKCYzb9QUIG6PVkiKiJ71 3XAy8GKooqWypA3A4YOC =GPGX -----END PGP SIGNATURE----- --Sig_/IbA3S15u6.8Nt+fY5_GfFAh-- --===============1688426939== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1688426939==--