All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jet Chen <jet.chen@intel.com>
To: dri-devel@lists.freedesktop.org
Subject: [libdrm]: drmOpen failed issue
Date: Tue, 28 Oct 2014 13:02:35 +0800	[thread overview]
Message-ID: <544F236B.2010007@intel.com> (raw)

Hello,

I find a drmOpen failed issue in our system as below description:

platform: 	ivy-bridge
OS: 		Ubuntu12.04 LTS
kernel:		3.13.0-32-generic
libdrm:		libdrm-2.4.46

root@tchen37-ivb:/home/tchen37/ws/lib3app/utests# ./test_osd
DRM_IOCTL_I915_GEM_APERTURE failed: Bad file descriptor
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [9]
param: 4, val: 0
Segmentation fault (core dumped)

by debugging libdrm code, I find following changes resolve the problem

diff --git a/xf86drm.c b/xf86drm.c
index 4791a05..3c7c362 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -562,7 +562,7 @@ static int drmOpenByName(const char *name)
                     drmFreeVersion(version);
                     id = drmGetBusid(fd);
                     drmMsg("drmGetBusid returned '%s'\n", id ? id : "NULL");
-                   if (!id || !*id) {
+                   if (id || *id) {
                         if (id)
                             drmFreeBusid(id);
                         return fd;

I know I'm not using the latest version of libdrm, but I confirm that latest code remains same for this scenario.

Is it possible a bug of libdrm?

Thanks,
-Jet
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2014-10-28  4:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=544F236B.2010007@intel.com \
    --to=jet.chen@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.