diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-11-17 17:08:55 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-01 20:37:08 -0500 |
commit | 2de3b4841f67a15c7b8e820b84dd6b7cc41370da (patch) | |
tree | a1341ed009c1d1f82952731efad67d078a4a4d92 /drivers/gpu/drm/radeon/atombios_crtc.c | |
parent | fd874ad0a0dcf715333a3f3564c6486a3a90bb22 (diff) |
drm/radeon/kms: fix oops when set_base is call with no FB
Just do nothing if crct_set_base() is called with no FB.
The oops happens when the user switches between X & vt or in some case
when changing mode.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_crtc.c')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index c15287a590ff..f5987afcd48d 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -578,8 +578,11 @@ int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y, | |||
578 | uint64_t fb_location; | 578 | uint64_t fb_location; |
579 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 579 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
580 | 580 | ||
581 | if (!crtc->fb) | 581 | /* no fb bound */ |
582 | return -EINVAL; | 582 | if (!crtc->fb) { |
583 | DRM_DEBUG("No FB bound\n"); | ||
584 | return 0; | ||
585 | } | ||
583 | 586 | ||
584 | radeon_fb = to_radeon_framebuffer(crtc->fb); | 587 | radeon_fb = to_radeon_framebuffer(crtc->fb); |
585 | 588 | ||