From: Marius Vlad Subject: Re: [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0. Date: Tue, 5 Apr 2016 13:29:50 +0300 Message-ID: <20160405102950.GB16501@mcvlad-wk.rb.intel.com> References: <1459784845-13517-1-git-send-email-marius.c.vlad@intel.com> <57037B6D.8020605@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0673026272==" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 108EF6E737 for ; Tue, 5 Apr 2016 10:28:50 +0000 (UTC) In-Reply-To: <57037B6D.8020605@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Maarten Lankhorst Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0673026272== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v9Ux+11Zm5mwPlX6" Content-Disposition: inline --v9Ux+11Zm5mwPlX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 05, 2016 at 10:46:37AM +0200, Maarten Lankhorst wrote: > Op 04-04-16 om 17:47 schreef Marius Vlad: > > igt_atomic_prepare_plane_commit() assumes that the framebuffer is always > > set-up. > > > > Signed-off-by: Marius Vlad > > --- > > lib/igt_kms.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c > > index 82257a6..30c5b7e 100644 > > --- a/lib/igt_kms.c > > +++ b/lib/igt_kms.c > > @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plan= e, igt_output_t *output, > > igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id); > > } > > =20 > > - if (plane->position_changed || plane->size_changed) { > > + if ((plane->position_changed || plane->size_changed) && fb_id !=3D 0)= { > > uint32_t src_x =3D IGT_FIXED(plane->fb->src_x, 0); /* src_x */ > > uint32_t src_y =3D IGT_FIXED(plane->fb->src_y, 0); /* src_y */ > > uint32_t src_w =3D IGT_FIXED(plane->fb->src_w, 0); /* src_w */ > Why is this needed? Because plane->fb is NULL when fb_id =3D=3D 0. Maybe Ville had a point, not= having src_* in plane->fb. >=20 > ~Maarten --v9Ux+11Zm5mwPlX6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXA5OeAAoJELmLWIAQzyE+R94H/jgPTMVQeGOJ5fR5h+Q029eR xjTw8QkTh4AoCOg9HWX0qpvgKSjyuOYFIfEbSy24V+hFggSp4K44Rm1rBXtJVBl3 8XKP6GRzLmn6oWCTjZ3HqrIXHqziSbI8OK9Duq5R32oh2ZYmdXIiEQO6fVSFW44A Ng74eOQFKyi+/wB/UvOxsXjL5B5zW8qEzeJ4DaanRHvOXKcsPeq6I27trds84TZA VrIMLD9SbtcbW6M3hRqcUxdfq8m6kgf5XLXD6orVB/EjtpGJBrvFgmxA0jQiGhC2 etpPca88KH+oZ73jLtPLhVlG7RmFJyVcb7NG0yiPhG6nsvQUtwVTTFUaRT7Sudw= =EPy7 -----END PGP SIGNATURE----- --v9Ux+11Zm5mwPlX6-- --===============0673026272== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0673026272==--