From olli@fromme.com  Wed Jul 28 16:03:31 2010
Return-Path: <olli@fromme.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 980561065673
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Jul 2010 16:03:31 +0000 (UTC)
	(envelope-from olli@fromme.com)
Received: from box.thiemo.net (box.thiemo.net [88.198.12.75])
	by mx1.freebsd.org (Postfix) with ESMTP id 10A9B8FC20
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Jul 2010 16:03:30 +0000 (UTC)
Received: from box.thiemo.net (localhost [127.0.0.1])
	by box.thiemo.net (8.14.2/8.14.2) with ESMTP id o6SFRt5d092438
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 28 Jul 2010 17:27:56 +0200 (CEST)
	(envelope-from olli@fromme.com)
Received: (from olli@localhost)
	by box.thiemo.net (8.14.2/8.14.2/Submit) id o6SFRtuE092437;
	Wed, 28 Jul 2010 17:27:55 +0200 (CEST)
	(envelope-from olli)
Message-Id: <201007281527.o6SFRtuE092437@box.thiemo.net>
Date: Wed, 28 Jul 2010 17:27:55 +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] DRM support for Radeon HD 4250
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         149041
>Category:       kern
>Synopsis:       [drm] [patch] DRM support for Radeon HD 4250
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    olli
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 28 16:10:02 UTC 2010
>Closed-Date:    Mon Nov 05 11:38:20 UTC 2012
>Last-Modified:  Mon Nov 05 11:38:20 UTC 2012
>Originator:     Oliver Fromme
>Release:        FreeBSD 8.1-RELEASE
>Organization:
secnetix GmbH & Co. KG
		http://www.secnetix.de/bsd
>Environment:

The patch applies and works on 8.1, 8-stable and HEAD.
The patch applies cleanly on 7-stable, too, but I haven't
tested whether it actually works.

>Description:

I've recently bought a new mainboard "M4A88TD-V EVO/USB3"
from ASUS.  This mainboard is gaining high popularity
because it features USB 3.0, SATA-3 and other things,
while still providing legacy stuff (serial RS232, PS/2
connector for mouse/keyboard) and being rather inexpensive.

This board has a newer version of the RS880 chip; the
graphics is identified as "Radeon HD 4250".

The one-line patch below makes it work.  By the way,
I noticed that Linux 2.6.33 has the same patch.

With that patch, DRM attaches and Xv acceleration works,
so I can watch video fullscreen at nearly 0% CPU load.

vgapci0: <VGA-compatible display> port 0xb000-0xb0ff mem 0xd0000000-0xdfffffff,0xfe8f0000-0xfe8fffff,0xfe700000-0xfe7fffff irq 18 at device 5.0 on pci1
drm0: <ATI Radeon HD 4250> on vgapci0
info: [drm] MSI enabled 1 message(s)
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] Initialized radeon 1.31.0 20080613

$ xvinfo
X-Video Extension version 2.2
screen #0
  Adaptor #0: "Radeon Textured Video"
    ...

While Xv works now, 3D acceleration does not, unfortunately.
But I think this is a different issue; I guess the chip is
not yet supported by the GL code (but I'm not an expert in
this area).

>How-To-Repeat:

>Fix:

--- sys/dev/drm/drm_pciids.h.orig	2010-04-04 17:46:46.000000000 +0200
+++ sys/dev/drm/drm_pciids.h	2010-07-21 22:53:45.000000000 +0200
@@ -335,6 +335,7 @@
	{0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \
	{0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \
	{0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \
+	{0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \
	{0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \
	{0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \
	{0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: olli 
State-Changed-When: Tue Aug 3 11:22:07 UTC 2010 
State-Changed-Why:  
Grab this PR myself.  Got approval from rnoland to commit it. 


Responsible-Changed-From-To: freebsd-bugs->olli 
Responsible-Changed-By: olli 
Responsible-Changed-When: Tue Aug 3 11:22:07 UTC 2010 
Responsible-Changed-Why:  
Grab this PR myself.  Got approval from rnoland to commit it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149041 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/149041: commit references a PR
Date: Tue,  3 Aug 2010 16:31:08 +0000 (UTC)

 Author: olli
 Date: Tue Aug  3 16:30:56 2010
 New Revision: 210819
 URL: http://svn.freebsd.org/changeset/base/210819
 
 Log:
   Add support for ATI Radeon HD 4250.
   
   PR:		kern/149041
   Submitted by:	olli
   Reviewed by:	rnoland
   Approved by:	des (mentor)
   MFC after:	1 week
 
 Modified:
   head/sys/dev/drm/drm_pciids.h
 
 Modified: head/sys/dev/drm/drm_pciids.h
 ==============================================================================
 --- head/sys/dev/drm/drm_pciids.h	Tue Aug  3 16:29:54 2010	(r210818)
 +++ head/sys/dev/drm/drm_pciids.h	Tue Aug  3 16:30:56 2010	(r210819)
 @@ -335,6 +335,7 @@
  	{0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \
  	{0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \
  	{0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \
 +	{0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \
  	{0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \
  	{0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \
  	{0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->patched 
State-Changed-By: olli 
State-Changed-When: Tue Aug 3 17:19:15 UTC 2010 
State-Changed-Why:  
Patched in head, r210819. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149041 
State-Changed-From-To: patched->closed 
State-Changed-By: olli 
State-Changed-When: Mon Nov 5 11:38:20 UTC 2012 
State-Changed-Why:  
Committed.  Available in stable (9) and head (10). 

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