* [PATCH] agp: Enable all supported rates for graphic cards
@ 2011-11-06 15:03 Tormod Volden
2011-11-06 15:37 ` Corbin Simpson
2011-11-07 13:50 ` Konrad Rzeszutek Wilk
0 siblings, 2 replies; 8+ messages in thread
From: Tormod Volden @ 2011-11-06 15:03 UTC (permalink / raw)
To: dri-devel
From: Tormod Volden <debian.tormod@gmail.com>
Some cards report that they support only 4x, in which case they
should support 2x and 1x as well, according to the AGP spec.
Otherwise a requested 1x or 2x rate will result in 0 being set:
agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
For instance ProSavage KN133 [5333:8d02] only reports 4x.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
---
drivers/char/agp/generic.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index b072648..c5d04e5 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
break;
}
+ /* Some graphic cards report they only support 4x, however the AGP 2.0 spec
+ * (section 4.1.1) says components must support the lower speeds as well.
+ */
+ switch (*vga_agpstat & 7) {
+ case 4:
+ *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
+ printk(KERN_INFO PFX "Graphics card claims to only support x4 rate. "
+ "Fixing up support for x2 & x1\n");
+ break;
+ case 2:
+ *vga_agpstat |= AGPSTAT2_1X;
+ printk(KERN_INFO PFX "Graphics card claims to only support x2 rate. "
+ "Fixing up support for x1\n");
+ break;
+ default:
+ break;
+ }
+
/* Check the speed bits make sense. Only one should be set. */
tmp = *requested_mode & 7;
switch (tmp) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-06 15:03 [PATCH] agp: Enable all supported rates for graphic cards Tormod Volden
@ 2011-11-06 15:37 ` Corbin Simpson
2011-11-06 18:39 ` Tormod Volden
2011-11-07 13:50 ` Konrad Rzeszutek Wilk
1 sibling, 1 reply; 8+ messages in thread
From: Corbin Simpson @ 2011-11-06 15:37 UTC (permalink / raw)
To: Tormod Volden; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2229 bytes --]
Trusting the spec worries me; could this break anybody?
Is there any reason to use the not-so-magic numbers instead of the named
constants?
Sending from a mobile, pardon my terseness. ~ C.
On Nov 6, 2011 7:03 AM, "Tormod Volden" <lists.tormod@gmail.com> wrote:
> From: Tormod Volden <debian.tormod@gmail.com>
>
> Some cards report that they support only 4x, in which case they
> should support 2x and 1x as well, according to the AGP spec.
>
> Otherwise a requested 1x or 2x rate will result in 0 being set:
>
> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
>
> For instance ProSavage KN133 [5333:8d02] only reports 4x.
>
> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
> ---
> drivers/char/agp/generic.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
> index b072648..c5d04e5 100644
> --- a/drivers/char/agp/generic.c
> +++ b/drivers/char/agp/generic.c
> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32
> *bridge_agpstat, u32 *vga_
> break;
> }
>
> + /* Some graphic cards report they only support 4x, however the AGP
> 2.0 spec
> + * (section 4.1.1) says components must support the lower speeds
> as well.
> + */
> + switch (*vga_agpstat & 7) {
> + case 4:
> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
> + printk(KERN_INFO PFX "Graphics card claims to only support
> x4 rate. "
> + "Fixing up support for x2 & x1\n");
> + break;
> + case 2:
> + *vga_agpstat |= AGPSTAT2_1X;
> + printk(KERN_INFO PFX "Graphics card claims to only support
> x2 rate. "
> + "Fixing up support for x1\n");
> + break;
> + default:
> + break;
> + }
> +
> /* Check the speed bits make sense. Only one should be set. */
> tmp = *requested_mode & 7;
> switch (tmp) {
> --
> 1.7.5.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
[-- Attachment #1.2: Type: text/html, Size: 2932 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-06 15:37 ` Corbin Simpson
@ 2011-11-06 18:39 ` Tormod Volden
2011-11-06 18:55 ` Corbin Simpson
0 siblings, 1 reply; 8+ messages in thread
From: Tormod Volden @ 2011-11-06 18:39 UTC (permalink / raw)
To: Corbin Simpson; +Cc: dri-devel
On Sun, Nov 6, 2011 at 4:37 PM, Corbin Simpson
<mostawesomedude@gmail.com> wrote:
> Trusting the spec worries me; could this break anybody?
It will allow the user to override possibly safer default settings. If
a user has specified, say, 2x in his xorg.conf and this was not
honored because the card only reported 4x, this patch would finally
give him the 2x he is asking for. If 2x turns out to not work, he will
suddenly have problems. But the solution would be to fix his
xorg.conf. Up till now he might be thinking 2x works fine, while he
was actually getting another rate.
Generally, the default rate is defined by the DDX and the patch does
not change these policies. However, with the patch we may actually
apply the default value, instead of an undefined "0x" (i.e. the case
when the DDX sets 1x or 2x by default, but the card says only 4x). The
spec (I have checked section 6.1.10) does not say anything about
writing a zero rate, and I don't know what the silicon does. I don't
know of any way to read out the resulting speed. Is there any simple
agp benchmarking tools?
Of course, it would be good if more people who currently see "0x" in
dmesg would try this patch.
Note that Dave Jones did the same for bridges in
28af24bb8470c7d0573b703a2955548b73a6c066 to get rid of "0x" cases.
>
> Is there any reason to use the not-so-magic numbers instead of the named
> constants?
I followed the style of the surrounding code. I can follow up with a
patch using named constants everywhere if that would be desired.
Thanks for looking at it!
Tormod
>
> Sending from a mobile, pardon my terseness. ~ C.
>
> On Nov 6, 2011 7:03 AM, "Tormod Volden" <lists.tormod@gmail.com> wrote:
>>
>> From: Tormod Volden <debian.tormod@gmail.com>
>>
>> Some cards report that they support only 4x, in which case they
>> should support 2x and 1x as well, according to the AGP spec.
>>
>> Otherwise a requested 1x or 2x rate will result in 0 being set:
>>
>> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
>>
>> For instance ProSavage KN133 [5333:8d02] only reports 4x.
>>
>> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
>> ---
>> drivers/char/agp/generic.c | 18 ++++++++++++++++++
>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
>> index b072648..c5d04e5 100644
>> --- a/drivers/char/agp/generic.c
>> +++ b/drivers/char/agp/generic.c
>> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32
>> *bridge_agpstat, u32 *vga_
>> break;
>> }
>>
>> + /* Some graphic cards report they only support 4x, however the AGP
>> 2.0 spec
>> + * (section 4.1.1) says components must support the lower speeds
>> as well.
>> + */
>> + switch (*vga_agpstat & 7) {
>> + case 4:
>> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
>> + printk(KERN_INFO PFX "Graphics card claims to only support
>> x4 rate. "
>> + "Fixing up support for x2 & x1\n");
>> + break;
>> + case 2:
>> + *vga_agpstat |= AGPSTAT2_1X;
>> + printk(KERN_INFO PFX "Graphics card claims to only support
>> x2 rate. "
>> + "Fixing up support for x1\n");
>> + break;
>> + default:
>> + break;
>> + }
>> +
>> /* Check the speed bits make sense. Only one should be set. */
>> tmp = *requested_mode & 7;
>> switch (tmp) {
>> --
>> 1.7.5.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-06 18:39 ` Tormod Volden
@ 2011-11-06 18:55 ` Corbin Simpson
0 siblings, 0 replies; 8+ messages in thread
From: Corbin Simpson @ 2011-11-06 18:55 UTC (permalink / raw)
To: Tormod Volden; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 4121 bytes --]
Thanks for writing it!
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Sending from a mobile, pardon my terseness. ~ C.
On Nov 6, 2011 10:39 AM, "Tormod Volden" <lists.tormod@gmail.com> wrote:
> On Sun, Nov 6, 2011 at 4:37 PM, Corbin Simpson
> <mostawesomedude@gmail.com> wrote:
> > Trusting the spec worries me; could this break anybody?
>
> It will allow the user to override possibly safer default settings. If
> a user has specified, say, 2x in his xorg.conf and this was not
> honored because the card only reported 4x, this patch would finally
> give him the 2x he is asking for. If 2x turns out to not work, he will
> suddenly have problems. But the solution would be to fix his
> xorg.conf. Up till now he might be thinking 2x works fine, while he
> was actually getting another rate.
>
> Generally, the default rate is defined by the DDX and the patch does
> not change these policies. However, with the patch we may actually
> apply the default value, instead of an undefined "0x" (i.e. the case
> when the DDX sets 1x or 2x by default, but the card says only 4x). The
> spec (I have checked section 6.1.10) does not say anything about
> writing a zero rate, and I don't know what the silicon does. I don't
> know of any way to read out the resulting speed. Is there any simple
> agp benchmarking tools?
>
> Of course, it would be good if more people who currently see "0x" in
> dmesg would try this patch.
>
> Note that Dave Jones did the same for bridges in
> 28af24bb8470c7d0573b703a2955548b73a6c066 to get rid of "0x" cases.
>
> >
> > Is there any reason to use the not-so-magic numbers instead of the named
> > constants?
>
> I followed the style of the surrounding code. I can follow up with a
> patch using named constants everywhere if that would be desired.
>
> Thanks for looking at it!
> Tormod
>
>
> >
> > Sending from a mobile, pardon my terseness. ~ C.
> >
> > On Nov 6, 2011 7:03 AM, "Tormod Volden" <lists.tormod@gmail.com> wrote:
> >>
> >> From: Tormod Volden <debian.tormod@gmail.com>
> >>
> >> Some cards report that they support only 4x, in which case they
> >> should support 2x and 1x as well, according to the AGP spec.
> >>
> >> Otherwise a requested 1x or 2x rate will result in 0 being set:
> >>
> >> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
> >>
> >> For instance ProSavage KN133 [5333:8d02] only reports 4x.
> >>
> >> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
> >> ---
> >> drivers/char/agp/generic.c | 18 ++++++++++++++++++
> >> 1 files changed, 18 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
> >> index b072648..c5d04e5 100644
> >> --- a/drivers/char/agp/generic.c
> >> +++ b/drivers/char/agp/generic.c
> >> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode,
> u32
> >> *bridge_agpstat, u32 *vga_
> >> break;
> >> }
> >>
> >> + /* Some graphic cards report they only support 4x, however the
> AGP
> >> 2.0 spec
> >> + * (section 4.1.1) says components must support the lower speeds
> >> as well.
> >> + */
> >> + switch (*vga_agpstat & 7) {
> >> + case 4:
> >> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
> >> + printk(KERN_INFO PFX "Graphics card claims to only
> support
> >> x4 rate. "
> >> + "Fixing up support for x2 & x1\n");
> >> + break;
> >> + case 2:
> >> + *vga_agpstat |= AGPSTAT2_1X;
> >> + printk(KERN_INFO PFX "Graphics card claims to only
> support
> >> x2 rate. "
> >> + "Fixing up support for x1\n");
> >> + break;
> >> + default:
> >> + break;
> >> + }
> >> +
> >> /* Check the speed bits make sense. Only one should be set. */
> >> tmp = *requested_mode & 7;
> >> switch (tmp) {
> >> --
> >> 1.7.5.4
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
>
[-- Attachment #1.2: Type: text/html, Size: 5548 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-06 15:03 [PATCH] agp: Enable all supported rates for graphic cards Tormod Volden
2011-11-06 15:37 ` Corbin Simpson
@ 2011-11-07 13:50 ` Konrad Rzeszutek Wilk
2011-11-07 16:05 ` Tormod Volden
1 sibling, 1 reply; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-11-07 13:50 UTC (permalink / raw)
To: Tormod Volden; +Cc: dri-devel
On Sun, Nov 06, 2011 at 04:03:21PM +0100, Tormod Volden wrote:
> From: Tormod Volden <debian.tormod@gmail.com>
>
> Some cards report that they support only 4x, in which case they
> should support 2x and 1x as well, according to the AGP spec.
Have you tested it on other hardware besides your KN133?
>
> Otherwise a requested 1x or 2x rate will result in 0 being set:
>
> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
>
> For instance ProSavage KN133 [5333:8d02] only reports 4x.
>
> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
> ---
> drivers/char/agp/generic.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
> index b072648..c5d04e5 100644
> --- a/drivers/char/agp/generic.c
> +++ b/drivers/char/agp/generic.c
> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
> break;
> }
>
> + /* Some graphic cards report they only support 4x, however the AGP 2.0 spec
> + * (section 4.1.1) says components must support the lower speeds as well.
> + */
> + switch (*vga_agpstat & 7) {
> + case 4:
> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
> + printk(KERN_INFO PFX "Graphics card claims to only support x4 rate. "
> + "Fixing up support for x2 & x1\n");
> + break;
> + case 2:
> + *vga_agpstat |= AGPSTAT2_1X;
> + printk(KERN_INFO PFX "Graphics card claims to only support x2 rate. "
> + "Fixing up support for x1\n");
> + break;
> + default:
> + break;
> + }
> +
> /* Check the speed bits make sense. Only one should be set. */
> tmp = *requested_mode & 7;
> switch (tmp) {
> --
> 1.7.5.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-07 13:50 ` Konrad Rzeszutek Wilk
@ 2011-11-07 16:05 ` Tormod Volden
2011-11-07 16:08 ` Alex Deucher
0 siblings, 1 reply; 8+ messages in thread
From: Tormod Volden @ 2011-11-07 16:05 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: dri-devel
On Mon, Nov 7, 2011 at 2:50 PM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> wrote:
> On Sun, Nov 06, 2011 at 04:03:21PM +0100, Tormod Volden wrote:
>> From: Tormod Volden <debian.tormod@gmail.com>
>>
>> Some cards report that they support only 4x, in which case they
>> should support 2x and 1x as well, according to the AGP spec.
>
> Have you tested it on other hardware besides your KN133?
No, I don't have access to other AGP hardware. Note that this will
only affect the hardware & software/configuration combinations that
currently result in the "0x" message. A web search on this message
shows that also some radeon cards are bitten by this. So testing on
these cards would be welcome.
Tormod
>
>>
>> Otherwise a requested 1x or 2x rate will result in 0 being set:
>>
>> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
>>
>> For instance ProSavage KN133 [5333:8d02] only reports 4x.
>>
>> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
>> ---
>> drivers/char/agp/generic.c | 18 ++++++++++++++++++
>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
>> index b072648..c5d04e5 100644
>> --- a/drivers/char/agp/generic.c
>> +++ b/drivers/char/agp/generic.c
>> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
>> break;
>> }
>>
>> + /* Some graphic cards report they only support 4x, however the AGP 2.0 spec
>> + * (section 4.1.1) says components must support the lower speeds as well.
>> + */
>> + switch (*vga_agpstat & 7) {
>> + case 4:
>> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
>> + printk(KERN_INFO PFX "Graphics card claims to only support x4 rate. "
>> + "Fixing up support for x2 & x1\n");
>> + break;
>> + case 2:
>> + *vga_agpstat |= AGPSTAT2_1X;
>> + printk(KERN_INFO PFX "Graphics card claims to only support x2 rate. "
>> + "Fixing up support for x1\n");
>> + break;
>> + default:
>> + break;
>> + }
>> +
>> /* Check the speed bits make sense. Only one should be set. */
>> tmp = *requested_mode & 7;
>> switch (tmp) {
>> --
>> 1.7.5.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-07 16:05 ` Tormod Volden
@ 2011-11-07 16:08 ` Alex Deucher
2011-11-07 16:33 ` Tormod Volden
0 siblings, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2011-11-07 16:08 UTC (permalink / raw)
To: Tormod Volden; +Cc: dri-devel
On Mon, Nov 7, 2011 at 11:05 AM, Tormod Volden <lists.tormod@gmail.com> wrote:
> On Mon, Nov 7, 2011 at 2:50 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
>> On Sun, Nov 06, 2011 at 04:03:21PM +0100, Tormod Volden wrote:
>>> From: Tormod Volden <debian.tormod@gmail.com>
>>>
>>> Some cards report that they support only 4x, in which case they
>>> should support 2x and 1x as well, according to the AGP spec.
>>
>> Have you tested it on other hardware besides your KN133?
>
> No, I don't have access to other AGP hardware. Note that this will
> only affect the hardware & software/configuration combinations that
> currently result in the "0x" message. A web search on this message
> shows that also some radeon cards are bitten by this. So testing on
> these cards would be welcome.
There are already a number of chipset/asic combos where we force a
certain AGP mode in order to get stable operation.
Alex
>
> Tormod
>
>
>>
>>>
>>> Otherwise a requested 1x or 2x rate will result in 0 being set:
>>>
>>> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
>>>
>>> For instance ProSavage KN133 [5333:8d02] only reports 4x.
>>>
>>> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
>>> ---
>>> drivers/char/agp/generic.c | 18 ++++++++++++++++++
>>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
>>> index b072648..c5d04e5 100644
>>> --- a/drivers/char/agp/generic.c
>>> +++ b/drivers/char/agp/generic.c
>>> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
>>> break;
>>> }
>>>
>>> + /* Some graphic cards report they only support 4x, however the AGP 2.0 spec
>>> + * (section 4.1.1) says components must support the lower speeds as well.
>>> + */
>>> + switch (*vga_agpstat & 7) {
>>> + case 4:
>>> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
>>> + printk(KERN_INFO PFX "Graphics card claims to only support x4 rate. "
>>> + "Fixing up support for x2 & x1\n");
>>> + break;
>>> + case 2:
>>> + *vga_agpstat |= AGPSTAT2_1X;
>>> + printk(KERN_INFO PFX "Graphics card claims to only support x2 rate. "
>>> + "Fixing up support for x1\n");
>>> + break;
>>> + default:
>>> + break;
>>> + }
>>> +
>>> /* Check the speed bits make sense. Only one should be set. */
>>> tmp = *requested_mode & 7;
>>> switch (tmp) {
>>> --
>>> 1.7.5.4
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] agp: Enable all supported rates for graphic cards
2011-11-07 16:08 ` Alex Deucher
@ 2011-11-07 16:33 ` Tormod Volden
0 siblings, 0 replies; 8+ messages in thread
From: Tormod Volden @ 2011-11-07 16:33 UTC (permalink / raw)
To: Alex Deucher; +Cc: dri-devel
On Mon, Nov 7, 2011 at 5:08 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Mon, Nov 7, 2011 at 11:05 AM, Tormod Volden <lists.tormod@gmail.com> wrote:
>> On Mon, Nov 7, 2011 at 2:50 PM, Konrad Rzeszutek Wilk
>> <konrad.wilk@oracle.com> wrote:
>>> On Sun, Nov 06, 2011 at 04:03:21PM +0100, Tormod Volden wrote:
>>>> From: Tormod Volden <debian.tormod@gmail.com>
>>>>
>>>> Some cards report that they support only 4x, in which case they
>>>> should support 2x and 1x as well, according to the AGP spec.
>>>
>>> Have you tested it on other hardware besides your KN133?
>>
>> No, I don't have access to other AGP hardware. Note that this will
>> only affect the hardware & software/configuration combinations that
>> currently result in the "0x" message. A web search on this message
>> shows that also some radeon cards are bitten by this. So testing on
>> these cards would be welcome.
>
> There are already a number of chipset/asic combos where we force a
> certain AGP mode in order to get stable operation.
>
> Alex
Exactly, we /try/ to force a certain AGP mode. But if we end up
pushing x0 to the bridge, that is not successful. I don't think we
ever want to set x0 for any reason. Of course, it is possible that in
some cases 0x magically work, and that the quirked rate that we tried
to set will not work, but then we should fix that quirk.
Tormod
>
>>
>> Tormod
>>
>>
>>>
>>>>
>>>> Otherwise a requested 1x or 2x rate will result in 0 being set:
>>>>
>>>> agpgart-via 0000:00:00.0: putting AGP V2 device into 0x mode
>>>>
>>>> For instance ProSavage KN133 [5333:8d02] only reports 4x.
>>>>
>>>> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
>>>> ---
>>>> drivers/char/agp/generic.c | 18 ++++++++++++++++++
>>>> 1 files changed, 18 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
>>>> index b072648..c5d04e5 100644
>>>> --- a/drivers/char/agp/generic.c
>>>> +++ b/drivers/char/agp/generic.c
>>>> @@ -526,6 +526,24 @@ static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_
>>>> break;
>>>> }
>>>>
>>>> + /* Some graphic cards report they only support 4x, however the AGP 2.0 spec
>>>> + * (section 4.1.1) says components must support the lower speeds as well.
>>>> + */
>>>> + switch (*vga_agpstat & 7) {
>>>> + case 4:
>>>> + *vga_agpstat |= (AGPSTAT2_2X | AGPSTAT2_1X);
>>>> + printk(KERN_INFO PFX "Graphics card claims to only support x4 rate. "
>>>> + "Fixing up support for x2 & x1\n");
>>>> + break;
>>>> + case 2:
>>>> + *vga_agpstat |= AGPSTAT2_1X;
>>>> + printk(KERN_INFO PFX "Graphics card claims to only support x2 rate. "
>>>> + "Fixing up support for x1\n");
>>>> + break;
>>>> + default:
>>>> + break;
>>>> + }
>>>> +
>>>> /* Check the speed bits make sense. Only one should be set. */
>>>> tmp = *requested_mode & 7;
>>>> switch (tmp) {
>>>> --
>>>> 1.7.5.4
>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-11-07 16:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 15:03 [PATCH] agp: Enable all supported rates for graphic cards Tormod Volden
2011-11-06 15:37 ` Corbin Simpson
2011-11-06 18:39 ` Tormod Volden
2011-11-06 18:55 ` Corbin Simpson
2011-11-07 13:50 ` Konrad Rzeszutek Wilk
2011-11-07 16:05 ` Tormod Volden
2011-11-07 16:08 ` Alex Deucher
2011-11-07 16:33 ` Tormod Volden
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.