Bug 72849 - first argument to drmOpen() is a no-op
Summary: first argument to drmOpen() is a no-op
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 22:28 UTC by Robert Millan
Modified: 2013-12-24 02:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch (439 bytes, text/plain)
2013-12-18 22:28 UTC, Robert Millan
no flags Details

Description Robert Millan 2013-12-18 22:28:53 UTC
Created attachment 90951 [details]
patch

Since the introduction of a call to drmCheckModesettingSupported() in radeon_kernel_mode_enabled(), with abort condition if such call fails, the first argument to drmOpen() call in radeon_open_drm_master() has become a no-op red herring.

Such argument (a kernel module name) is supposed to result in load of specified kernel module. However, this will never happen. The problem is that if the code containing drmOpen() call is reached, it means that drmCheckModesettingSupported() check has previously succeeded, which implies the module is already loaded.

So, drmOpen() will never load a kernel module. But it gives the impression that it will.

In order to avoid this confusion, I suggest replacing it with NULL, like xf86-video-intel driver does:

src/intel_device.c:             fd = drmOpen(NULL, id);

and then taking care of module load elsewhere (I'll submit a separate bug for that).
Comment 1 Michel Dänzer 2013-12-19 01:35:56 UTC
Please submit patches directly to the xorg-driver-ati mailing list (preferably using git send-email) instead of attaching them in bugzilla.
Comment 2 Michel Dänzer 2013-12-24 02:13:55 UTC
commit 796c9a0cb587f528326bede11fa3f3eb7d3edaf1
Author: Robert Millan <rmh@freebsd.org>
Date:   Fri Dec 20 10:55:09 2013 +0000

    radeon: Set first parameter of drmOpen() to NULL


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.