diff mbox

drm/radeon: program the MC if loading firmware fails on ARUBA

Message ID 201308041112.r74BCKkg028119@glazunov.sibelius.xs4all.nl (mailing list archive)
State New, archived
Headers show

Commit Message

Mark Kettenis Aug. 4, 2013, 11:12 a.m. UTC
Failure to load the firmwares on ARUBA isn't considered fatal.
However modesetting doesn't quite work in that case.  On an HP
Pavillion Sleekbook 15 with A4-4335M APU, I end up with a screen full
of garbage.  Calling evergreen_mc_program() fixes the issue.

Diff below is against the OpenBSD codebase, which corresponds to Linux
3.8.13.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>

Comments

Alex Deucher Aug. 4, 2013, 4:21 p.m. UTC | #1
On Sun, Aug 4, 2013 at 7:12 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> Failure to load the firmwares on ARUBA isn't considered fatal.
> However modesetting doesn't quite work in that case.  On an HP
> Pavillion Sleekbook 15 with A4-4335M APU, I end up with a screen full
> of garbage.  Calling evergreen_mc_program() fixes the issue.
>
> Diff below is against the OpenBSD codebase, which corresponds to Linux
> 3.8.13.
>
> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>

We should just always program the MC as on previous asics.

Alex


>
>
> diff --git a/sys/dev/pci/drm/radeon/ni.c b/sys/dev/pci/drm/radeon/ni.c
> index cebaf8a..1b29475 100644
> --- a/sys/dev/pci/drm/radeon/ni.c
> +++ b/sys/dev/pci/drm/radeon/ni.c
> @@ -1519,6 +1519,7 @@ static int cayman_startup(struct radeon_device *rdev)
>                         r = ni_init_microcode(rdev);
>                         if (r) {
>                                 DRM_ERROR("Failed to load firmware!\n");
> +                               evergreen_mc_program(rdev);
>                                 return r;
>                         }
>                 }
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Mark Kettenis Aug. 4, 2013, 8:06 p.m. UTC | #2
> Date: Sun, 4 Aug 2013 12:21:53 -0400
> From: Alex Deucher <alexdeucher@gmail.com>
> 
> On Sun, Aug 4, 2013 at 7:12 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> > Failure to load the firmwares on ARUBA isn't considered fatal.
> > However modesetting doesn't quite work in that case.  On an HP
> > Pavillion Sleekbook 15 with A4-4335M APU, I end up with a screen full
> > of garbage.  Calling evergreen_mc_program() fixes the issue.
> >
> > Diff below is against the OpenBSD codebase, which corresponds to Linux
> > 3.8.13.
> >
> > Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
> 
> We should just always program the MC as on previous asics.

That one does the trick as well.

Thanks,

Mark
diff mbox

Patch

diff --git a/sys/dev/pci/drm/radeon/ni.c b/sys/dev/pci/drm/radeon/ni.c
index cebaf8a..1b29475 100644
--- a/sys/dev/pci/drm/radeon/ni.c
+++ b/sys/dev/pci/drm/radeon/ni.c
@@ -1519,6 +1519,7 @@  static int cayman_startup(struct radeon_device *rdev)
 			r = ni_init_microcode(rdev);
 			if (r) {
 				DRM_ERROR("Failed to load firmware!\n");
+				evergreen_mc_program(rdev);
 				return r;
 			}
 		}