drm/radeon/kms: fix DVO setup on some r4xx chips
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 3 Apr 2012 21:05:41 +0000 (17:05 -0400)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:05 +0000 (19:15 +0100)
BugLink: http://bugs.launchpad.net/bugs/987337

commit afceb9319f21b18ee3bc15ee9a5f92e18ef8a8c9 upstream.

Some r4xx chips have the wrong frev in the
DVOEncoderControl table.  It should always be 1
on r4xx.  Fixes modesetting on DVO on r4xx chips
with the bad frev.

Reported by twied on #radeon.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

drivers/gpu/drm/radeon/atombios_encoders.c

index 0f8eb48..5351ee1 100644 (file)
@@ -246,6 +246,10 @@ atombios_dvo_setup(struct drm_encoder *encoder, int action)
        if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev))
                return;
 
+       /* some R4xx chips have the wrong frev */
+       if (rdev->family <= CHIP_RV410)
+               frev = 1;
+
        switch (frev) {
        case 1:
                switch (crev) {