From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 17/20] drm: add driver->set_busid() callback Date: Fri, 29 Aug 2014 15:30:16 +0200 Message-ID: <20140829133014.GX17519@ulmo> References: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> <1409307166-12396-18-git-send-email-dh.herrmann@gmail.com> <20140829130100.GK15520@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1584310412==" Return-path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E77D6E6F7 for ; Fri, 29 Aug 2014 06:30:19 -0700 (PDT) Received: by mail-wi0-f180.google.com with SMTP id ex7so2546718wid.1 for ; Fri, 29 Aug 2014 06:30:18 -0700 (PDT) In-Reply-To: <20140829130100.GK15520@phenom.ffwll.local> 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: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1584310412== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zOTFI1MayFoZtDo5" Content-Disposition: inline --zOTFI1MayFoZtDo5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 29, 2014 at 03:01:00PM +0200, Daniel Vetter wrote: > On Fri, Aug 29, 2014 at 12:12:43PM +0200, David Herrmann wrote: > > One step closer to dropping all the drm_bus_* code: > > Add a driver->set_busid() callback and make all drivers use the generic > > helpers. Nouveau is the only driver that uses two different bus-types w= ith > > the same drm_driver. This is totally broken if both buses are available= on > > the same machine (unlikely, but lets be safe). Therefore, we create two > > different drivers for each platform during module_init() and set the > > set_busid() callback respectively. > >=20 > > Signed-off-by: David Herrmann >=20 > This has a bit a midlayer smell to it tbh, we don't really need a > set_busid callback I think. Instead there's just two cases: > - The crazy implementation for pci devices. But we already have dev->pdev, > so the core can figure this out itself. > - Everyone else just sets a static name. For those I think we should just > add a drm_dev_set_busid function which they can call in their > driver-load function. Well maybe different versions for platform drivers > and stuff. We already have drm_dev_set_unique() for exactly this purpose. I think drivers can just be converted to use that one at a time and when no users are left we can drop drm_*_set_busid(). Thierry --zOTFI1MayFoZtDo5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUAIBmAAoJEN0jrNd/PrOhOQUP+gN29STCBR+AeiL47SSyjcQy cIgh7L+a1fZUdnSSeXXKkFpuMx6wPqrO0SrFej8hBaOsy5IHyIs+JpUEKuosQkhn Q8WJhmKx2WxSmZqrFo/mXnQFPO289TAyn8+D8YK0apQS4zb6v3ULIqwgswQIHKZh PS56eh2n1Y7Eem12hFj9MFSC0/yx53gxPuWTmlGn1qZ2lnuXVzPFVBluCgYS5+VH iYxfH62zLl3CCmQWK08Yor3ELEddLyLSrBqzaMZtg26NxDcssRle6U+xZN7n8bqY W9Bt1G7vqTk6+Rur7M7SeqGltPuWL/aggjTYr+Ot7rHkj/YsVeCeU2/J09uZIP6t AnqZOhOSs14XAySCTUjJdxEnU3U2+dzYPfEinpC0PWrRJnr5ZZu2UZE0STZ/ZwBS R79+UT1QOoYCdExlIfNSsGxEiaGorlOM0yaeuGKBoACT8trdL0Jgm8RfeGCzKeJC ErzRViBoNXrbpNqrRhx3lXo4hokBMSXwYHhpgpWloDTMTYPe61FCY2bp+5zOZqhf 4mqTJmM9QwXAhH6QQHVbp68h0dSEi6jfsJiMIDwR5exC3Xlcc50ZkNmIk2rknKkH 0iIUHj++ToSVNgzCiyNCo7SMqiSyc6/PvIsRXGD+s9hmzSzp9iMe4bBKgRhpa2GR ja/JaKBwvfAazUXHs6Jd =a4w4 -----END PGP SIGNATURE----- --zOTFI1MayFoZtDo5-- --===============1584310412== 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 --===============1584310412==--