Bug 91496 - [clover] Multiple device probe fails since a27ec5dc460b91dc44675f48cddbbb2631ee824f
Summary: [clover] Multiple device probe fails since a27ec5dc460b91dc44675f48cddbbb2631...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
Depends on:
Reported: 2015-07-28 23:35 UTC by Jay Cornwall
Modified: 2015-07-29 13:18 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Description Jay Cornwall 2015-07-28 23:35:08 UTC
This commit:

pipe-loader: simplify pipe_loader_drm_probe
Do not iterate and (attempt to) open the render device, if we're over
the requested number of devices.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>

Appears to break the pipe_loader_probe API:

 * Get a list of known devices.
 * \param devs Array that will be filled with pointers to the devices
 *             available in the system.
 * \param ndev Maximum number of devices to return.
 * \return Number of devices available in the system.
pipe_loader_probe(struct pipe_loader_device **devs, int ndev);

clover/core/platform.cpp relies on pipe_loader_probe(NULL, 0) to obtain the number of devices available. A fixed upper bound on device count doesn't seem ideal.

It currently appears to work for a single device because pipe_loader_sw_probe returns 1 and this is subsequently used to retrieve the device from pipe_loader_drm_probe.

I think a revert of the above commit is the only way to fulfill this API.
Comment 1 Francisco Jerez 2015-07-29 10:27:56 UTC
Yeah, you're right, sorry I didn't notice this during review.  Emil, are you OK with reverting this patch?
Comment 2 Emil Velikov 2015-07-29 10:52:53 UTC
(In reply to Francisco Jerez from comment #1)
> Yeah, you're right, sorry I didn't notice this during review.  Emil, are you
> OK with reverting this patch?

No objections at all. Feel free to directly revert it butpl ease add the bugzilla link, plus do a quick build test (just in case).

Apologies for breaking it.
Comment 3 Francisco Jerez 2015-07-29 13:18:51 UTC
This should be fixed in master now, patch reverted as e42d2948d3c58b86d3770d296b96fafcd1218858.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.