Does anyone have any feedback for me?  I'm able to modify libdrm to make things 
work for me, but I'm pretty sure that isn't the right thing to do.

________________________________
From: Defnet, Benjamin R
Sent: Monday, October 12, 2009 8:59 PM
To: '[email protected]'
Subject: drmOpenByName opening incorrect minor?

Here is my situation.  I have two drm devices "alpha" and "beta" both mapped to 
the same hw with the same PCI Bus ID.  "alpha" is at minor 0 and "beta" is at 
minor 1.

If I do the following:

drmOpen("beta", NULL);
drmOpen("beta", NULL);

The second call will actually return a file descriptor pointing to the "alpha" 
device.  Based on my code traces, this is because for the second call, 
drmOpenByName( ) will iterate through the minors and find "beta" at minor 1, 
but the PCI Bus ID will be non-null due to the previous drmOpen, so it will 
skip that and not find any other name matches.  It will then try the 
"Backward-compatiblity /proc support" loop.  It will find a match at minor 1, 
but will then call drmOpenByBusid( ).  drmOpenByBusid( ) will again iterate 
through the minors looking for a PCI Bus ID match and will find one at minor 0, 
the "alpha" drm device, so it will open that and return the fd.

This obviously isn't what I expected.  I expected it to open minor 1, the 
"beta" drm device.  I end up using the wrong fd and get crashes because my 
"alpha" device obviously can't handle the "beta" ioctls.

A few questions:

1)       Is this expected behavior?
2)       In drmOpenByName( ), why does it reject a match if the PCI Bus ID is 
non-null?  drmOpenByBusID( ) doesn't do that.
3)       Any ideas how I can make this work assuming my setup above (2 drm 
devices with same PCI Bus ID) can't change?

Thank you,

Ben
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to