From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Clark Subject: Re: [RFC] drm platform multi-device support Date: Mon, 4 Apr 2011 22:08:29 -0500 Message-ID: References: <1301417093-14843-1-git-send-email-rob@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-bw0-f49.google.com (mail-bw0-f49.google.com [209.85.214.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 781BA9E768 for ; Mon, 4 Apr 2011 20:08:30 -0700 (PDT) Received: by bwz1 with SMTP id 1so5306100bwz.36 for ; Mon, 04 Apr 2011 20:08:29 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, Apr 4, 2011 at 7:30 PM, Dave Airlie wrote: > On Wed, Mar 30, 2011 at 2:44 AM, Rob Clark wrote: >> From: Rob Clark >> >> Include the minor device id in the bus-id to give userspace a way to open >> the correct "cardN" when there are multiple device instances. >> --- >> It may seem a bit strange to have multiple platform device instances, but >> we have a use-case for this. =A0And this relatively simple patch does the >> trick. > > I'm finding it hard to like this since I feel it might limit certain > thing in the future, by baking > this into the ABI. > > We have plans for multiple device nodes per device, but they don't > involve abusing the bus id like this. > > Surely you'd just have another platform device with another unique > name for this, I'd be more willing > to accept some sort of unique id stored in the platformdev or drm that > isn't the device node. What about: len =3D snprintf(master->unique, master->unique_len, "platform:%s:%02d", dev->platformdev->name, dev->platformdev->id); (ie. using the id field from struct platform_device).. Perhaps this is more analogous to using pci bus # / slot / func? BR, -R