* Radeon xpress 200m and radeonfb kinda work
@ 2007-03-06 0:16 Johan Henriksson
2007-03-07 16:43 ` Chuck Ebbert
2007-03-07 22:39 ` Radeon xpress 200m and radeonfb kinda work Nigel Cunningham
0 siblings, 2 replies; 9+ messages in thread
From: Johan Henriksson @ 2007-03-06 0:16 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
Hi!
I have gotten the radeon xpress 200m (the version without dedicated vmem)
to work with radeonfb.
The attached patch (against linux-2.6.20.1) works for me.
Since I don't have any docs for the card I am unsure if the patch is
100% correct.
Can someone else with a 200m try it out?
(I have tested it by enabling fbcon and radeonfb in the kernel and
added "video=radeonfb" to lilo. This gave me a nice 1280x800 console :) )
/Johan Henriksson
Please CC, I'm not on the list.
[-- Attachment #2: radeonfb_200m_patch.txt --]
[-- Type: text/plain, Size: 3040 bytes --]
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h linux-2.6.20.1/drivers/video/aty/ati_ids.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/ati_ids.h Tue Mar 6 00:31:16 2007
@@ -209,4 +209,4 @@
#define PCI_CHIP_R423_5D57 0x5D57
#define PCI_CHIP_RS350_7834 0x7834
#define PCI_CHIP_RS350_7835 0x7835
-
+#define PCI_CHIP_RS480_5955 0x5955
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c linux-2.6.20.1/drivers/video/aty/radeon_base.c
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeon_base.c Tue Mar 6 00:31:19 2007
@@ -100,6 +100,8 @@
{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
static struct pci_device_id radeonfb_pci_table[] = {
+ /* Radeon Xpress 200m */
+ CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
/* Mobility M6 */
CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
@@ -1990,7 +1992,8 @@ static void radeon_identify_vram(struct
/* framebuffer size */
if ((rinfo->family == CHIP_FAMILY_RS100) ||
(rinfo->family == CHIP_FAMILY_RS200) ||
- (rinfo->family == CHIP_FAMILY_RS300)) {
+ (rinfo->family == CHIP_FAMILY_RS300) ||
+ (rinfo->family == CHIP_FAMILY_RS480) ) {
u32 tom = INREG(NB_TOM);
tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
@@ -2329,7 +2332,7 @@ static int __devinit radeonfb_pci_regist
/* -2 is special: means ON on mobility chips and do not
* change on others
*/
- radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep);
+ radeonfb_pm_init(rinfo, -1,ignore_devlist, force_sleep);//rinfo->is_mobility ? 1 : -1);
} else
radeonfb_pm_init(rinfo, default_dynclk, ignore_devlist, force_sleep);
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h linux-2.6.20.1/drivers/video/aty/radeonfb.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeonfb.h Tue Mar 6 00:31:16 2007
@@ -48,6 +48,7 @@ enum radeon_family {
CHIP_FAMILY_RV350,
CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */
CHIP_FAMILY_R420, /* R420/R423/M18 */
+ CHIP_FAMILY_RS480,
CHIP_FAMILY_LAST,
};
@@ -64,7 +65,8 @@ enum radeon_family {
((rinfo)->family == CHIP_FAMILY_RV350) || \
((rinfo)->family == CHIP_FAMILY_R350) || \
((rinfo)->family == CHIP_FAMILY_RV380) || \
- ((rinfo)->family == CHIP_FAMILY_R420))
+ ((rinfo)->family == CHIP_FAMILY_R420) || \
+ ((rinfo)->family == CHIP_FAMILY_RS480) )
/*
* Chip flags
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Radeon xpress 200m and radeonfb kinda work
2007-03-06 0:16 Radeon xpress 200m and radeonfb kinda work Johan Henriksson
@ 2007-03-07 16:43 ` Chuck Ebbert
2007-03-07 20:58 ` johan henriksson
2007-03-07 22:39 ` Radeon xpress 200m and radeonfb kinda work Nigel Cunningham
1 sibling, 1 reply; 9+ messages in thread
From: Chuck Ebbert @ 2007-03-07 16:43 UTC (permalink / raw)
To: Johan Henriksson; +Cc: linux-kernel, Benjamin Herrenschmidt
Johan Henriksson wrote:
> Hi!
>
> I have gotten the radeon xpress 200m (the version without dedicated vmem)
> to work with radeonfb.
> The attached patch (against linux-2.6.20.1) works for me.
> Since I don't have any docs for the card I am unsure if the patch is
> 100% correct.
> Can someone else with a 200m try it out?
> (I have tested it by enabling fbcon and radeonfb in the kernel and
> added "video=radeonfb" to lilo. This gave me a nice 1280x800 console :) )
>
Works for me as a module on Compaq V2000 notebook.
160x48 is a bit small, but looks very clear and crisp.
Is there anything else needed to get this merged?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Radeon xpress 200m and radeonfb kinda work
2007-03-07 16:43 ` Chuck Ebbert
@ 2007-03-07 20:58 ` johan henriksson
2007-03-08 16:00 ` Chuck Ebbert
0 siblings, 1 reply; 9+ messages in thread
From: johan henriksson @ 2007-03-07 20:58 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: linux-kernel, Benjamin Herrenschmidt
Chuck Ebbert wrote:
> Johan Henriksson wrote:
>
> > Hi!
> >
> > I have gotten the radeon xpress 200m (the version without dedicated
> > vmem) to work with radeonfb. The attached patch (against
> > linux-2.6.20.1) works for me. Since I don't have any docs for the
> > card I am unsure if the patch is 100% correct. Can someone else
> > with a 200m try it out? (I have tested it by enabling fbcon and
> > radeonfb in the kernel and added "video=radeonfb" to lilo. This
> > gave me a nice 1280x800 console :) )
> >
>
> Works for me as a module on Compaq V2000 notebook. 160x48 is a bit
> small, but looks very clear and crisp.
>
> Is there anything else needed to get this merged?
>
As you can see in the patch I have disabled "Dynamic Clock PM"
since it makes my card freak out (Don't know why :( ).
Is there a reason why the "default_dynclk" parameter only is available
when radeonfb is built as a module or should it be added to radeonfb_setup?
/Johan Henriksson
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Radeon xpress 200m and radeonfb kinda work
2007-03-06 0:16 Radeon xpress 200m and radeonfb kinda work Johan Henriksson
2007-03-07 16:43 ` Chuck Ebbert
@ 2007-03-07 22:39 ` Nigel Cunningham
2007-03-07 22:59 ` johan henriksson
1 sibling, 1 reply; 9+ messages in thread
From: Nigel Cunningham @ 2007-03-07 22:39 UTC (permalink / raw)
To: Johan Henriksson; +Cc: linux-kernel
Hi.
On Tue, 2007-03-06 at 01:16 +0100, Johan Henriksson wrote:
> Hi!
>
> I have gotten the radeon xpress 200m (the version without dedicated
> vmem)
> to work with radeonfb.
> The attached patch (against linux-2.6.20.1) works for me.
> Since I don't have any docs for the card I am unsure if the patch is
> 100% correct.
> Can someone else with a 200m try it out?
> (I have tested it by enabling fbcon and radeonfb in the kernel and
> added "video=radeonfb" to lilo. This gave me a nice 1280x800
> console :) )
>
> /Johan Henriksson
>
> Please CC, I'm not on the list.
>
> @@ -2329,7 +2332,7 @@ static int __devinit radeonfb_pci_regist
> /* -2 is special: means ON on mobility chips and do not
> * change on others
> */
> - radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep);
> + radeonfb_pm_init(rinfo, -1,ignore_devlist, force_sleep);//rinfo->is_mobility ? 1 : -1);
That looks like it might break !200M. Maybe something line
rinfo->is_mobility && !rinfo->rs480 (with additional modifications to
define an rs480, of course) - or a more generic name indicating why the
rs480 is different?
Regards,
Nigel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Radeon xpress 200m and radeonfb kinda work
2007-03-07 22:39 ` Radeon xpress 200m and radeonfb kinda work Nigel Cunningham
@ 2007-03-07 22:59 ` johan henriksson
0 siblings, 0 replies; 9+ messages in thread
From: johan henriksson @ 2007-03-07 22:59 UTC (permalink / raw)
To: nigel; +Cc: linux-kernel
Nigel Cunningham wrote:
> Hi.
>
> On Tue, 2007-03-06 at 01:16 +0100, Johan Henriksson wrote:
> > Hi!
> >
> > I have gotten the radeon xpress 200m (the version without dedicated
> > vmem) to work with radeonfb. The attached patch (against
> > linux-2.6.20.1) works for me. Since I don't have any docs for the
> > card I am unsure if the patch is 100% correct. Can someone else
> > with a 200m try it out? (I have tested it by enabling fbcon and
> > radeonfb in the kernel and added "video=radeonfb" to lilo. This
> > gave me a nice 1280x800 console :) )
> >
> > /Johan Henriksson
> >
> > Please CC, I'm not on the list.
> >
> > @@ -2329,7 +2332,7 @@ static int __devinit radeonfb_pci_regist /*
> > -2 is special: means ON on mobility chips and do not * change on
> > others */ - radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1,
> > ignore_devlist, force_sleep); + radeonfb_pm_init(rinfo,
> > -1,ignore_devlist, force_sleep);//rinfo->is_mobility ? 1 : -1);
>
> That looks like it might break !200M. Maybe something line
> rinfo->is_mobility && !rinfo->rs480 (with additional modifications to
> define an rs480, of course) - or a more generic name indicating why
> the rs480 is different?
>
> Regards,
>
> Nigel
>
I know, I am sorry. We could use family as in:
rinfo->is_mobility && rinfo->family != CHIP_FAMILY_RS480
Another solution is to add "default_dynclk" to radeonfb_setup
so that everybody with a rs480 can disable it.
I don't have the register specification for the 200m (RS480) so I don't
know why enabling "dynamic clock pm" doesn't work.
/Johan Henriksson
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Radeon xpress 200m and radeonfb kinda work
2007-03-07 20:58 ` johan henriksson
@ 2007-03-08 16:00 ` Chuck Ebbert
2007-03-08 19:24 ` [patch 2.6.20-1] radeonfb: Add support for Radeon xpress 200m johan henriksson
0 siblings, 1 reply; 9+ messages in thread
From: Chuck Ebbert @ 2007-03-08 16:00 UTC (permalink / raw)
To: johan henriksson; +Cc: linux-kernel, Benjamin Herrenschmidt, Antonino A. Daplas
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
johan henriksson wrote:
> As you can see in the patch I have disabled "Dynamic Clock PM"
> since it makes my card freak out (Don't know why :( ).
> Is there a reason why the "default_dynclk" parameter only is available
> when radeonfb is built as a module or should it be added to radeonfb_setup?
I don't have a clue how that works; I just merged your patch
into a Fedora test kernel and it worked. (And it looks a lot
nicer than vesafb.)
Our X driver guru says the patch is OK and Xpress 200M is
the same as normal Radeon for 2D so framebuffer should be OK.
So we can add this to the patch:
Tested-by: Chuck Ebbert <cebbert@redhat.com>
Please repost it as a reply-to-all and add a decent description
and a signed-off-by per this document:
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
[-- Attachment #2: linux-2.6-20_radeon_fb_200M.patch --]
[-- Type: text/plain, Size: 3522 bytes --]
Hi!
I have gotten the radeon xpress 200m (the version without dedicated vmem)
to work with radeonfb.
The attached patch (against linux-2.6.20.1) works for me.
Since I don't have any docs for the card I am unsure if the patch is 100% correct.
Can someone else with a 200m try it out?
(I have tested it by enabling fbcon and radeonfb in the kernel and
added "video=radeonfb" to lilo. This gave me a nice 1280x800 console :) )
/Johan Henriksson
Please CC, I'm not on the list.
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h linux-2.6.20.1/drivers/video/aty/ati_ids.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/ati_ids.h Tue Mar 6 00:31:16 2007
@@ -209,4 +209,4 @@
#define PCI_CHIP_R423_5D57 0x5D57
#define PCI_CHIP_RS350_7834 0x7834
#define PCI_CHIP_RS350_7835 0x7835
-
+#define PCI_CHIP_RS480_5955 0x5955
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c linux-2.6.20.1/drivers/video/aty/radeon_base.c
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeon_base.c Tue Mar 6 00:31:19 2007
@@ -100,6 +100,8 @@
{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
static struct pci_device_id radeonfb_pci_table[] = {
+ /* Radeon Xpress 200m */
+ CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
/* Mobility M6 */
CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
@@ -1990,7 +1992,8 @@ static void radeon_identify_vram(struct
/* framebuffer size */
if ((rinfo->family == CHIP_FAMILY_RS100) ||
(rinfo->family == CHIP_FAMILY_RS200) ||
- (rinfo->family == CHIP_FAMILY_RS300)) {
+ (rinfo->family == CHIP_FAMILY_RS300) ||
+ (rinfo->family == CHIP_FAMILY_RS480) ) {
u32 tom = INREG(NB_TOM);
tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
@@ -2329,7 +2332,7 @@ static int __devinit radeonfb_pci_regist
/* -2 is special: means ON on mobility chips and do not
* change on others
*/
- radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep);
+ radeonfb_pm_init(rinfo, -1,ignore_devlist, force_sleep);//rinfo->is_mobility ? 1 : -1);
} else
radeonfb_pm_init(rinfo, default_dynclk, ignore_devlist, force_sleep);
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h linux-2.6.20.1/drivers/video/aty/radeonfb.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeonfb.h Tue Mar 6 00:31:16 2007
@@ -48,6 +48,7 @@ enum radeon_family {
CHIP_FAMILY_RV350,
CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */
CHIP_FAMILY_R420, /* R420/R423/M18 */
+ CHIP_FAMILY_RS480,
CHIP_FAMILY_LAST,
};
@@ -64,7 +65,8 @@ enum radeon_family {
((rinfo)->family == CHIP_FAMILY_RV350) || \
((rinfo)->family == CHIP_FAMILY_R350) || \
((rinfo)->family == CHIP_FAMILY_RV380) || \
- ((rinfo)->family == CHIP_FAMILY_R420))
+ ((rinfo)->family == CHIP_FAMILY_R420) || \
+ ((rinfo)->family == CHIP_FAMILY_RS480) )
/*
* Chip flags
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 2.6.20-1] radeonfb: Add support for Radeon xpress 200m
2007-03-08 16:00 ` Chuck Ebbert
@ 2007-03-08 19:24 ` johan henriksson
2007-03-09 13:00 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 9+ messages in thread
From: johan henriksson @ 2007-03-08 19:24 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: linux-kernel, Benjamin Herrenschmidt, Antonino A. Daplas
Added support for radeon xpress 200m(rs480).
Note that the card doesn't like dynclk turned on.
Please CC replies to jhn98032@gmail.com
Signed-off-by: Johan Henriksson <jhn98032@gmail.com>
---
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h linux-2.6.20.1/drivers/video/aty/ati_ids.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/ati_ids.h Thu Mar 8 19:13:04 2007
@@ -209,4 +209,4 @@
#define PCI_CHIP_R423_5D57 0x5D57
#define PCI_CHIP_RS350_7834 0x7834
#define PCI_CHIP_RS350_7835 0x7835
-
+#define PCI_CHIP_RS480_5955 0x5955
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c linux-2.6.20.1/drivers/video/aty/radeon_base.c
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeon_base.c Thu Mar 8 19:13:04 2007
@@ -100,6 +100,8 @@
{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
static struct pci_device_id radeonfb_pci_table[] = {
+ /* Radeon Xpress 200m */
+ CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
/* Mobility M6 */
CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
@@ -1990,7 +1992,8 @@ static void radeon_identify_vram(struct
/* framebuffer size */
if ((rinfo->family == CHIP_FAMILY_RS100) ||
(rinfo->family == CHIP_FAMILY_RS200) ||
- (rinfo->family == CHIP_FAMILY_RS300)) {
+ (rinfo->family == CHIP_FAMILY_RS300) ||
+ (rinfo->family == CHIP_FAMILY_RS480) ) {
u32 tom = INREG(NB_TOM);
tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
@@ -2329,7 +2332,7 @@ static int __devinit radeonfb_pci_regist
/* -2 is special: means ON on mobility chips and do not
* change on others
*/
- radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep);
+ radeonfb_pm_init(rinfo, rinfo->is_mobility && rinfo->family != CHIP_FAMILY_RS480 ? 1 : -1, ignore_devlist, force_sleep);
} else
radeonfb_pm_init(rinfo, default_dynclk, ignore_devlist, force_sleep);
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h linux-2.6.20.1/drivers/video/aty/radeonfb.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeonfb.h Thu Mar 8 19:13:04 2007
@@ -48,6 +48,7 @@ enum radeon_family {
CHIP_FAMILY_RV350,
CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */
CHIP_FAMILY_R420, /* R420/R423/M18 */
+ CHIP_FAMILY_RS480,
CHIP_FAMILY_LAST,
};
@@ -64,7 +65,8 @@ enum radeon_family {
((rinfo)->family == CHIP_FAMILY_RV350) || \
((rinfo)->family == CHIP_FAMILY_R350) || \
((rinfo)->family == CHIP_FAMILY_RV380) || \
- ((rinfo)->family == CHIP_FAMILY_R420))
+ ((rinfo)->family == CHIP_FAMILY_R420) || \
+ ((rinfo)->family == CHIP_FAMILY_RS480) )
/*
* Chip flags
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 2.6.20-1] radeonfb: Add support for Radeon xpress 200m
2007-03-08 19:24 ` [patch 2.6.20-1] radeonfb: Add support for Radeon xpress 200m johan henriksson
@ 2007-03-09 13:00 ` Benjamin Herrenschmidt
2007-03-09 19:57 ` johan henriksson
0 siblings, 1 reply; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2007-03-09 13:00 UTC (permalink / raw)
To: johan henriksson; +Cc: Chuck Ebbert, linux-kernel, Antonino A. Daplas
> - radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep);
> + radeonfb_pm_init(rinfo, rinfo->is_mobility && rinfo->family != CHIP_FAMILY_RS480 ? 1 : -1, ignore_devlist, force_sleep);
I'd rather you add a check for RS480 inside radeonfb_pm_*
Ben.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 2.6.20-1] radeonfb: Add support for Radeon xpress 200m
2007-03-09 13:00 ` Benjamin Herrenschmidt
@ 2007-03-09 19:57 ` johan henriksson
0 siblings, 0 replies; 9+ messages in thread
From: johan henriksson @ 2007-03-09 19:57 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Chuck Ebbert, linux-kernel, Antonino A. Daplas
Benjamin Herrenschmidt wrote:
>> - radeonfb_pm_init(rinfo, rinfo->is_mobility ? 1 : -1, ignore_devlist, force_sleep);
>> + radeonfb_pm_init(rinfo, rinfo->is_mobility && rinfo->family != CHIP_FAMILY_RS480 ? 1 : -1, ignore_devlist, force_sleep);
>
> I'd rather you add a check for RS480 inside radeonfb_pm_*
>
> Ben.
>
>
Something like this?
---
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h linux-2.6.20.1/drivers/video/aty/ati_ids.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/ati_ids.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/ati_ids.h Fri Mar 9 20:30:09 2007
@@ -209,4 +209,4 @@
#define PCI_CHIP_R423_5D57 0x5D57
#define PCI_CHIP_RS350_7834 0x7834
#define PCI_CHIP_RS350_7835 0x7835
-
+#define PCI_CHIP_RS480_5955 0x5955
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c linux-2.6.20.1/drivers/video/aty/radeon_base.c
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeon_base.c Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeon_base.c Fri Mar 9 20:42:31 2007
@@ -100,6 +100,8 @@
{ PCI_VENDOR_ID_ATI, id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (flags) | (CHIP_FAMILY_##family) }
static struct pci_device_id radeonfb_pci_table[] = {
+ /* Radeon Xpress 200m */
+ CHIP_DEF(PCI_CHIP_RS480_5955, RS480, CHIP_HAS_CRTC2 | CHIP_IS_IGP | CHIP_IS_MOBILITY),
/* Mobility M6 */
CHIP_DEF(PCI_CHIP_RADEON_LY, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
CHIP_DEF(PCI_CHIP_RADEON_LZ, RV100, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
@@ -1990,7 +1992,8 @@ static void radeon_identify_vram(struct
/* framebuffer size */
if ((rinfo->family == CHIP_FAMILY_RS100) ||
(rinfo->family == CHIP_FAMILY_RS200) ||
- (rinfo->family == CHIP_FAMILY_RS300)) {
+ (rinfo->family == CHIP_FAMILY_RS300) ||
+ (rinfo->family == CHIP_FAMILY_RS480) ) {
u32 tom = INREG(NB_TOM);
tmp = ((((tom >> 16) - (tom & 0xffff) + 1) << 6) * 1024);
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/radeon_pm.c linux-2.6.20.1/drivers/video/aty/radeon_pm.c
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeon_pm.c Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeon_pm.c Fri Mar 9 20:39:54 2007
@@ -2826,11 +2826,15 @@ void radeonfb_pm_init(struct radeonfb_in
rinfo->pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM);
/* Enable/Disable dynamic clocks: TODO add sysfs access */
- rinfo->dynclk = dynclk;
- if (dynclk == 1) {
+ if (rinfo->family == CHIP_FAMILY_RS480)
+ rinfo->dynclk = -1;
+ else
+ rinfo->dynclk = dynclk;
+
+ if (rinfo->dynclk == 1) {
radeon_pm_enable_dynamic_mode(rinfo);
printk("radeonfb: Dynamic Clock Power Management enabled\n");
- } else if (dynclk == 0) {
+ } else if (rinfo->dynclk == 0) {
radeon_pm_disable_dynamic_mode(rinfo);
printk("radeonfb: Dynamic Clock Power Management disabled\n");
}
diff -upr linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h linux-2.6.20.1/drivers/video/aty/radeonfb.h
--- linux-2.6.20.1-vanilla/drivers/video/aty/radeonfb.h Tue Feb 20 07:34:32 2007
+++ linux-2.6.20.1/drivers/video/aty/radeonfb.h Fri Mar 9 20:30:09 2007
@@ -48,6 +48,7 @@ enum radeon_family {
CHIP_FAMILY_RV350,
CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */
CHIP_FAMILY_R420, /* R420/R423/M18 */
+ CHIP_FAMILY_RS480,
CHIP_FAMILY_LAST,
};
@@ -64,7 +65,8 @@ enum radeon_family {
((rinfo)->family == CHIP_FAMILY_RV350) || \
((rinfo)->family == CHIP_FAMILY_R350) || \
((rinfo)->family == CHIP_FAMILY_RV380) || \
- ((rinfo)->family == CHIP_FAMILY_R420))
+ ((rinfo)->family == CHIP_FAMILY_R420) || \
+ ((rinfo)->family == CHIP_FAMILY_RS480) )
/*
* Chip flags
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-03-09 19:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 0:16 Radeon xpress 200m and radeonfb kinda work Johan Henriksson
2007-03-07 16:43 ` Chuck Ebbert
2007-03-07 20:58 ` johan henriksson
2007-03-08 16:00 ` Chuck Ebbert
2007-03-08 19:24 ` [patch 2.6.20-1] radeonfb: Add support for Radeon xpress 200m johan henriksson
2007-03-09 13:00 ` Benjamin Herrenschmidt
2007-03-09 19:57 ` johan henriksson
2007-03-07 22:39 ` Radeon xpress 200m and radeonfb kinda work Nigel Cunningham
2007-03-07 22:59 ` johan henriksson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox