From: Thierry Reding treding@nvidia.com
util_open() takes a device parameter, followed by a module parameter. The existing tests used the drmOpen() function, which uses a different ordering of the parameters, and the old ordering was accidentally kept during the conversion.
Signed-off-by: Thierry Reding treding@nvidia.com --- Evidently I didn't properly test this. Things do work in most cases with the current code because of the auto-detection, but there will be cases where it fails.
tests/modetest/modetest.c | 2 +- tests/proptest/proptest.c | 2 +- tests/vbltest/vbltest.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 22e3e81bd3cc..f665240a53c5 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -1603,7 +1603,7 @@ int main(int argc, char **argv) if (!args) encoders = connectors = crtcs = planes = framebuffers = 1;
- dev.fd = util_open(module, device); + dev.fd = util_open(device, module); if (dev.fd < 0) return -1;
diff --git a/tests/proptest/proptest.c b/tests/proptest/proptest.c index 24c634569f2f..4bd08665461c 100644 --- a/tests/proptest/proptest.c +++ b/tests/proptest/proptest.c @@ -295,7 +295,7 @@ int main(int argc, char *argv[])
args = argc - optind;
- fd = util_open(module, device); + fd = util_open(device, module); if (fd < 0) return 1;
diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index 183332122978..4475b49b7b9a 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -120,7 +120,7 @@ int main(int argc, char **argv) } }
- fd = util_open(module, device); + fd = util_open(device, module); if (fd < 0) return 1;
On 5 January 2016 at 14:21, Thierry Reding thierry.reding@gmail.com wrote:
From: Thierry Reding treding@nvidia.com
util_open() takes a device parameter, followed by a module parameter. The existing tests used the drmOpen() function, which uses a different ordering of the parameters, and the old ordering was accidentally kept during the conversion.
Signed-off-by: Thierry Reding treding@nvidia.com
Evidently I didn't properly test this. Things do work in most cases with the current code because of the auto-detection, but there will be cases where it fails.
Having the module name identical to the device name also helps ;-) But seriously - nicely spotted. I'll going through the list and I'll push this out shortly.
-Emil
dri-devel@lists.freedesktop.org