* [PATCH] Another card with wrong primary dac adj
@ 2013-07-19 19:08 Ondrej Zary
2013-07-19 21:50 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Ondrej Zary @ 2013-07-19 19:08 UTC (permalink / raw)
To: dri-devel; +Cc: Alex Deucher
Hello,
got another card with "too bright" problem:
Sapphire Radeon VE 7000 DDR (VGA+S-Video)
lspci -vnn:
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI RV100 QY [Radeon 7000/VE] [1002:5159] (prog-if 00 [VGA controller])
Subsystem: PC Partner Limited Sapphire Radeon VE 7000 DDR [174b:7c28]
The patch below fixes the problem for this card.
But I don't like the blacklist, couldn't some heuristic be used instead?
The interesting thing is that the manufacturer is the same as the other card
needing the same quirk. I wonder how many different types are broken this way.
The "wrong" ps2_pdac_adj value that comes from BIOS on this card is 0x300.
====================
drm/radeon: Add primary dac adj quirk for Sapphire Radeon VE 7000 DDR
Values from BIOS are wrong, causing too bright colors.
Use default values instead.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
drivers/gpu/drm/radeon/radeon_combios.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 78edadc..8528b81 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -971,10 +971,14 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
}
/* quirks */
+ /* Radeon 7000 (RV100) */
+ if (((dev->pdev->device == 0x5159) &&
+ (dev->pdev->subsystem_vendor == 0x174B) &&
+ (dev->pdev->subsystem_device == 0x7c28)) ||
/* Radeon 9100 (R200) */
- if ((dev->pdev->device == 0x514D) &&
+ ((dev->pdev->device == 0x514D) &&
(dev->pdev->subsystem_vendor == 0x174B) &&
- (dev->pdev->subsystem_device == 0x7149)) {
+ (dev->pdev->subsystem_device == 0x7149))) {
/* vbios value is bad, use the default */
found = 0;
}
--
Ondrej Zary
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Another card with wrong primary dac adj
2013-07-19 19:08 [PATCH] Another card with wrong primary dac adj Ondrej Zary
@ 2013-07-19 21:50 ` Alex Deucher
2013-07-19 22:24 ` Ondrej Zary
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2013-07-19 21:50 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Alex Deucher, dri-devel
[-- Attachment #1: Type: text/plain, Size: 2428 bytes --]
On Fri, Jul 19, 2013 at 3:08 PM, Ondrej Zary <linux@rainbow-software.org> wrote:
> Hello,
> got another card with "too bright" problem:
> Sapphire Radeon VE 7000 DDR (VGA+S-Video)
>
> lspci -vnn:
> 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI RV100 QY [Radeon 7000/VE] [1002:5159] (prog-if 00 [VGA controller])
> Subsystem: PC Partner Limited Sapphire Radeon VE 7000 DDR [174b:7c28]
>
> The patch below fixes the problem for this card.
Applied.
> But I don't like the blacklist, couldn't some heuristic be used instead?
How about the attached patch?
> The interesting thing is that the manufacturer is the same as the other card
> needing the same quirk. I wonder how many different types are broken this way.
So far we only have two quirks, so it doesn't seem that widespread.
Alex
>
> The "wrong" ps2_pdac_adj value that comes from BIOS on this card is 0x300.
>
> ====================
> drm/radeon: Add primary dac adj quirk for Sapphire Radeon VE 7000 DDR
>
> Values from BIOS are wrong, causing too bright colors.
> Use default values instead.
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> ---
> drivers/gpu/drm/radeon/radeon_combios.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
> index 78edadc..8528b81 100644
> --- a/drivers/gpu/drm/radeon/radeon_combios.c
> +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> @@ -971,10 +971,14 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
> }
>
> /* quirks */
> + /* Radeon 7000 (RV100) */
> + if (((dev->pdev->device == 0x5159) &&
> + (dev->pdev->subsystem_vendor == 0x174B) &&
> + (dev->pdev->subsystem_device == 0x7c28)) ||
> /* Radeon 9100 (R200) */
> - if ((dev->pdev->device == 0x514D) &&
> + ((dev->pdev->device == 0x514D) &&
> (dev->pdev->subsystem_vendor == 0x174B) &&
> - (dev->pdev->subsystem_device == 0x7149)) {
> + (dev->pdev->subsystem_device == 0x7149))) {
> /* vbios value is bad, use the default */
> found = 0;
> }
> --
> Ondrej Zary
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
[-- Attachment #2: 0001-drm-radeon-improve-dac-adjust-heuristics-for-legacy-.patch --]
[-- Type: text/x-patch, Size: 1120 bytes --]
From 6ca68e557791c540200c67c09dfc6ad4a277017c Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Fri, 19 Jul 2013 17:44:43 -0400
Subject: [PATCH] drm/radeon: improve dac adjust heuristics for legacy pdac
Hopefully avoid more quirks in the future due to bogus
vbios dac data.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/radeon_combios.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 8528b81..485f82c 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -965,8 +965,10 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
dac = RBIOS8(dac_info + 0x3) & 0xf;
p_dac->ps2_pdac_adj = (bg << 8) | (dac);
}
- /* if the values are all zeros, use the table */
- if (p_dac->ps2_pdac_adj)
+ /* if the values are zeros, use the table */
+ if ((dac == 0) || (bg == 0))
+ found = 0;
+ else
found = 1;
}
--
1.7.7.5
[-- Attachment #3: 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 related [flat|nested] 3+ messages in thread
* Re: [PATCH] Another card with wrong primary dac adj
2013-07-19 21:50 ` Alex Deucher
@ 2013-07-19 22:24 ` Ondrej Zary
0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Zary @ 2013-07-19 22:24 UTC (permalink / raw)
To: Alex Deucher; +Cc: Alex Deucher, dri-devel
On Friday 19 July 2013 23:50:50 Alex Deucher wrote:
> On Fri, Jul 19, 2013 at 3:08 PM, Ondrej Zary <linux@rainbow-software.org>
wrote:
> > Hello,
> > got another card with "too bright" problem:
> > Sapphire Radeon VE 7000 DDR (VGA+S-Video)
> >
> > lspci -vnn:
> > 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD]
> > nee ATI RV100 QY [Radeon 7000/VE] [1002:5159] (prog-if 00 [VGA
> > controller]) Subsystem: PC Partner Limited Sapphire Radeon VE 7000 DDR
> > [174b:7c28]
> >
> > The patch below fixes the problem for this card.
>
> Applied.
>
> > But I don't like the blacklist, couldn't some heuristic be used instead?
>
> How about the attached patch?
Thanks, it fixes my card without the quirk. So if it does not break anything,
it can be used instead of my patch.
> > The interesting thing is that the manufacturer is the same as the other
> > card needing the same quirk. I wonder how many different types are broken
> > this way.
>
> So far we only have two quirks, so it doesn't seem that widespread.
>
> Alex
>
> > The "wrong" ps2_pdac_adj value that comes from BIOS on this card is
> > 0x300.
> >
> > ====================
> > drm/radeon: Add primary dac adj quirk for Sapphire Radeon VE 7000 DDR
> >
> > Values from BIOS are wrong, causing too bright colors.
> > Use default values instead.
> >
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> > ---
> > drivers/gpu/drm/radeon/radeon_combios.c | 8 ++++++--
> > 1 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
> > b/drivers/gpu/drm/radeon/radeon_combios.c index 78edadc..8528b81 100644
> > --- a/drivers/gpu/drm/radeon/radeon_combios.c
> > +++ b/drivers/gpu/drm/radeon/radeon_combios.c
> > @@ -971,10 +971,14 @@ struct radeon_encoder_primary_dac
> > *radeon_combios_get_primary_dac_info(struct }
> >
> > /* quirks */
> > + /* Radeon 7000 (RV100) */
> > + if (((dev->pdev->device == 0x5159) &&
> > + (dev->pdev->subsystem_vendor == 0x174B) &&
> > + (dev->pdev->subsystem_device == 0x7c28)) ||
> > /* Radeon 9100 (R200) */
> > - if ((dev->pdev->device == 0x514D) &&
> > + ((dev->pdev->device == 0x514D) &&
> > (dev->pdev->subsystem_vendor == 0x174B) &&
> > - (dev->pdev->subsystem_device == 0x7149)) {
> > + (dev->pdev->subsystem_device == 0x7149))) {
> > /* vbios value is bad, use the default */
> > found = 0;
> > }
> > --
> > Ondrej Zary
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ondrej Zary
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-19 22:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19 19:08 [PATCH] Another card with wrong primary dac adj Ondrej Zary
2013-07-19 21:50 ` Alex Deucher
2013-07-19 22:24 ` Ondrej Zary
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.