Bug 85479

Summary: [drm] [patch] Two small fixes for DRM/DRI
Product: Base System Reporter: Oliver Fromme <olli>
Component: kernAssignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me CC: olli
Priority: Normal    
Version: 6.0-BETA3   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Oliver Fromme 2005-08-30 14:20:11 UTC
   This patch fixex two small problems in the DRM part of
   the kernel:

   1.  In drm_pciids.h there is a typo (swapped digits)
       which prevents the i915GM from being detected
       correctly.  (Note:  DRM support for the i915GM
       does not work currently for other reasons, but
       this patch at least makes the kernel detect the
       device on my Samsung X20 notebook.  I'm currently
       trying to investigate the other issues.)

       You can verify at the following URL that the ID
       really must be 0x2592 (0x2982 does not exist):
       http://pci-ids.ucw.cz/iii/?i=8086

   2.  The DRM_DEBUG kernel option doesn't work.  When
       set, DRM_DEBUG_DEFAULT_ON gets defined, but it's
       never used.

Fix: 

+#ifdef DRM_DEBUG_DEFAULT_ON
+int drm_debug_flag = 1;
+#else
 int drm_debug_flag = 0;
+#endif

 static int drm_init(device_t nbdev);
 static void drm_cleanup(drm_device_t *dev);--rOJ5dqQW5pNcQl944OxshapZ4FouCGpby0Ak4mwa2okZOyYR
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- src/sys/dev/drm/drm_pciids.h.orig   Thu Aug  4 19:31:02 2005
+++ src/sys/dev/drm/drm_pciids.h        Mon Aug 29 16:04:30 2005
@@ -237,6 +237,6 @@
	{0x8086, 0x3582, 0, "Intel i852GM/i855GM GMCH"}, \
	{0x8086, 0x2572, 0, "Intel i865G GMCH"}, \
	{0x8086, 0x2582, 0, "Intel i915G"}, \
-	{0x8086, 0x2982, 0, "Intel i915GM"}, \
+	{0x8086, 0x2592, 0, "Intel i915GM"}, \
	{0, 0, 0, NULL}
How-To-Repeat: 
   Try to enable DRM on system with intel i915GM mobile
   graphics, and enable DRM_DEBUG.
Comment 1 Craig Rodrigues freebsd_committer freebsd_triage 2005-08-30 17:09:35 UTC
Responsible Changed
From-To: freebsd-bugs->anholt

Eric, can you take a look?
Comment 2 Eric Anholt freebsd_committer freebsd_triage 2005-12-02 08:54:09 UTC
State Changed
From-To: open->closed

The PCI ID was fixed in the last import, and your debug fix has been applied 
to DRM CVS and -current.