diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-11-17 23:08:55 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-02 02:37:08 +0100 |
commit | 2de3b4841f67a15c7b8e820b84dd6b7cc41370da (patch) | |
tree | a1341ed009c1d1f82952731efad67d078a4a4d92 /drivers/gpu/drm/radeon/radeon_legacy_crtc.c | |
parent | drm/radeon/kms: add quirk for MSI S270 (diff) | |
download | linux-2de3b4841f67a15c7b8e820b84dd6b7cc41370da.tar.xz linux-2de3b4841f67a15c7b8e820b84dd6b7cc41370da.zip |
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/radeon_legacy_crtc.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 8d0b7aa87fa4..5794364ff857 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -408,6 +408,11 @@ int radeon_crtc_set_base(struct drm_crtc *crtc, int x, int y, uint32_t gen_cntl_reg, gen_cntl_val; DRM_DEBUG("\n"); + /* no fb bound */ + if (!crtc->fb) { + DRM_DEBUG("No FB bound\n"); + return 0; + } radeon_fb = to_radeon_framebuffer(crtc->fb); |