From: Rob Clark <rob@ti.com>
To: dri-devel@lists.freedesktop.org
Cc: Rob Clark <rob@ti.com>
Subject: [PATCH] drm: platform multi-device support
Date: Wed, 13 Jul 2011 22:12:43 -0500 [thread overview]
Message-ID: <1310613163-4284-1-git-send-email-rob@ti.com> (raw)
In-Reply-To: <1301417093-14843-1-git-send-email-rob@ti.com>
Include the device id in the bus-id to give userspace a way to open
the correct "cardN" when there are multiple device instances.
Signed-off-by: Rob Clark <rob@ti.com>
---
drivers/gpu/drm/drm_platform.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c
index 7223f06..2a8b626 100644
--- a/drivers/gpu/drm/drm_platform.c
+++ b/drivers/gpu/drm/drm_platform.c
@@ -123,14 +123,15 @@ static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *mas
{
int len, ret;
- master->unique_len = 10 + strlen(dev->platformdev->name);
+ master->unique_len = 13 + strlen(dev->platformdev->name);
+ master->unique_size = master->unique_len;
master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL);
if (master->unique == NULL)
return -ENOMEM;
len = snprintf(master->unique, master->unique_len,
- "platform:%s", dev->platformdev->name);
+ "platform:%s:%02d", dev->platformdev->name, dev->platformdev->id);
if (len > master->unique_len) {
DRM_ERROR("Unique buffer overflowed\n");
--
1.7.4.1
prev parent reply other threads:[~2011-07-14 3:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 16:44 [RFC] drm platform multi-device support Rob Clark
2011-03-30 12:57 ` Ilija Hadzic
2011-03-30 14:26 ` Rob Clark
2011-04-05 0:30 ` Dave Airlie
2011-04-05 3:08 ` Rob Clark
2011-04-06 1:21 ` Dave Airlie
2011-07-14 3:12 ` Rob Clark [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310613163-4284-1-git-send-email-rob@ti.com \
--to=rob@ti.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox