diff options
author | Dave Airlie <airlied@redhat.com> | 2010-04-22 23:21:58 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-22 23:29:43 -0400 |
commit | 9c950a43dd4d1e22a4b893c991871bac26930f97 (patch) | |
tree | 9e13b8fa715b5330a01e990ae95fc0e37a55bb19 /drivers/gpu | |
parent | 677d07683ea826c19ddcb156e9c1337cd7bd8539 (diff) |
drm/radeon/kms: don't print error for legal crtcs.
With evergreen this is bounded by num_crtc not by 0,1.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 20ec276e7596..8d1ad20fa5c1 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -164,7 +164,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc) | |||
164 | { | 164 | { |
165 | struct radeon_device *rdev = dev->dev_private; | 165 | struct radeon_device *rdev = dev->dev_private; |
166 | 166 | ||
167 | if (crtc < 0 || crtc > 1) { | 167 | if (crtc < 0 || crtc >= rdev->num_crtc) { |
168 | DRM_ERROR("Invalid crtc %d\n", crtc); | 168 | DRM_ERROR("Invalid crtc %d\n", crtc); |
169 | return -EINVAL; | 169 | return -EINVAL; |
170 | } | 170 | } |
@@ -176,7 +176,7 @@ int radeon_enable_vblank_kms(struct drm_device *dev, int crtc) | |||
176 | { | 176 | { |
177 | struct radeon_device *rdev = dev->dev_private; | 177 | struct radeon_device *rdev = dev->dev_private; |
178 | 178 | ||
179 | if (crtc < 0 || crtc > 1) { | 179 | if (crtc < 0 || crtc >= rdev->num_crtc) { |
180 | DRM_ERROR("Invalid crtc %d\n", crtc); | 180 | DRM_ERROR("Invalid crtc %d\n", crtc); |
181 | return -EINVAL; | 181 | return -EINVAL; |
182 | } | 182 | } |
@@ -190,7 +190,7 @@ void radeon_disable_vblank_kms(struct drm_device *dev, int crtc) | |||
190 | { | 190 | { |
191 | struct radeon_device *rdev = dev->dev_private; | 191 | struct radeon_device *rdev = dev->dev_private; |
192 | 192 | ||
193 | if (crtc < 0 || crtc > 1) { | 193 | if (crtc < 0 || crtc >= rdev->num_crtc) { |
194 | DRM_ERROR("Invalid crtc %d\n", crtc); | 194 | DRM_ERROR("Invalid crtc %d\n", crtc); |
195 | return; | 195 | return; |
196 | } | 196 | } |