From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm: Simplify fb refcounting rules around ->update_plane Date: Tue, 22 Apr 2014 11:16:02 +0200 Message-ID: <20140422091600.GA22133@ulmo> References: <1398157633-31043-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0667687416==" Return-path: Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 965596E6E4 for ; Tue, 22 Apr 2014 02:17:20 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id t10so4371999eei.33 for ; Tue, 22 Apr 2014 02:17:19 -0700 (PDT) In-Reply-To: <1398157633-31043-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0667687416== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 22, 2014 at 11:07:13AM +0200, Daniel Vetter wrote: [...] > diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_pla= ne_helper.c > index e768d35ff22e..8db129c44fea 100644 > --- a/drivers/gpu/drm/drm_plane_helper.c > +++ b/drivers/gpu/drm/drm_plane_helper.c > @@ -175,22 +175,7 @@ int drm_primary_helper_update(struct drm_plane *plan= e, struct drm_crtc *crtc, > set.connectors =3D connector_list; > set.num_connectors =3D num_connectors; > =20 > - /* > - * set_config() adjusts crtc->primary->fb; however the DRM setplane > - * code that called us expects to handle the framebuffer update and > - * reference counting; save and restore the current fb before > - * calling it. > - * > - * N.B., we call set_config() directly here rather than using > - * drm_mode_set_config_internal. We're reprogramming the same > - * connectors that were already in use, so we shouldn't need the extra > - * cross-CRTC fb refcounting to accomodate stealing connectors. > - * drm_mode_setplane() already handles the basic refcounting for the > - * framebuffers involved in this operation. > - */ > - tmpfb =3D plane->fb; > ret =3D crtc->funcs->set_config(&set); > - plane->fb =3D tmpfb; This makes tmpfb unused. Other than that this looks sane to me and it doesn't make things worse from what I can tell: Tested-by: Thierry Reding --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTVjNQAAoJEN0jrNd/PrOhvE0QAIgsBnonDmQDoA45IVHzstox L1eWdYOBpMfsr88nGl4sbBjIQlHBpayA6xojvn1uGz8xdodE6ZlcwHp2YBFBEEPJ V1+blFkN2E7BV9s+GB7JY6QAIll7JjsMfsbIEubABDkyo122drG7Dez+Eh1DOs+C P6L2k/rhfaD69qSCT1SIiGcKVauszB0kUWS7Nmdc/l9tPCmbrjufA5B4EeWLewi9 JzQq3crNbEB/YEx6isu2IzQRUmUf25zDPOHEwWZ6Pk1W9dOWbiqHzdOH25hgcV12 PCnre5kYOUh2g5woFWP3D28Jqi+/CWodq58boN5668qvMpMZeQQTtqsujkJZmCkE QpD1yG6c9EHCy0O9xh9pOpKpbf1MoMtSGbAoFlPuB+o9Pwf16vkj74NxuVQqocTg 3u2B7h7mzjfDEa4nM72lze3zleG82834GgKliTAwHBENzBpORQM2fZXqnU4OfLwn 4BqxhxJObv8xNguu79qKUvtKpRRWW0AhQjc0TCdhu1sgo730oGhdNuF6DcZlVjD/ zztLWUEVs0cqW3e7vu2uOMGJra3k2+n/uvCDC3nZq1usZ/aBbWHTLqUyfyOaRdyi Vbb0HIH6In4Q1XlSnA2wxyx5nwuL2DgvbNmoJWpBLIcMGkymau8930o1H7n5R+OB TSpUZD8n179/UnIRjbE9 =H3b2 -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j-- --===============0667687416== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0667687416==--