From olli@lurza.secnetix.de  Tue Aug 30 13:10:15 2005
Return-Path: <olli@lurza.secnetix.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5237D16A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Aug 2005 13:10:15 +0000 (GMT)
	(envelope-from olli@lurza.secnetix.de)
Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A8D3843D45
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 30 Aug 2005 13:10:14 +0000 (GMT)
	(envelope-from olli@lurza.secnetix.de)
Received: from lurza.secnetix.de (dqtedg@localhost [127.0.0.1])
	by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id j7UDADUx090185;
	Tue, 30 Aug 2005 15:10:13 +0200 (CEST)
	(envelope-from oliver.fromme@secnetix.de)
Received: (from olli@localhost)
	by lurza.secnetix.de (8.13.1/8.13.1/Submit) id j7UDAD0L090184;
	Tue, 30 Aug 2005 15:10:13 +0200 (CEST)
	(envelope-from olli)
Message-Id: <200508301310.j7UDAD0L090184@lurza.secnetix.de>
Date: Tue, 30 Aug 2005 15:10:13 +0200 (CEST)
From: Oliver Fromme <olli@secnetix.de>
Reply-To: Oliver Fromme <olli@secnetix.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Fromme <olli@secnetix.de>
Subject: [patch] Two small fixes for DRM/DRI
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         85479
>Category:       kern
>Synopsis:       [drm] [patch] Two small fixes for DRM/DRI
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    anholt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 30 13:20:11 GMT 2005
>Closed-Date:    Fri Dec 02 08:54:39 GMT 2005
>Last-Modified:  Fri Dec 02 08:54:39 GMT 2005
>Originator:     Oliver Fromme
>Release:        HEAD, RELENG_6, 6.0-BETA3
>Organization:
secnetix GmbH & Co. KG, Munich, Germany
>Environment:

   This patch applies to HEAD and RELENG_6.

>Description:

   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.

>How-To-Repeat:

   Try to enable DRM on system with intel i915GM mobile
   graphics, and enable DRM_DEBUG.

>Fix:

--- 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}

--- src/sys/dev/drm/drm_drv.c.orig      Sat Apr 16 05:44:43 2005
+++ src/sys/dev/drm/drm_drv.c   Mon Aug 29 16:20:03 2005
@@ -35,7 +35,11 @@
 #include "dev/drm/drmP.h"
 #include "dev/drm/drm.h"

+#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);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->anholt 
Responsible-Changed-By: rodrigc 
Responsible-Changed-When: Tue Aug 30 16:09:35 GMT 2005 
Responsible-Changed-Why:  
Eric, can you take a look? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85479 
State-Changed-From-To: open->closed 
State-Changed-By: anholt 
State-Changed-When: Fri Dec 2 08:54:09 GMT 2005 
State-Changed-Why:  
The PCI ID was fixed in the last import, and your debug fix has been applied 
to DRM CVS and -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85479 
>Unformatted:
