[PATCH 2/3] drm/radeon/kms: fix the crtc number check

Alex Deucher alexdeucher at gmail.com
Wed Oct 26 06:28:08 PDT 2011


On Tue, Oct 25, 2011 at 10:40 PM, Ilija Hadzic
<ihadzic at research.bell-labs.com> wrote:
> the crtc check in radeon_get_vblank_timestamp_kms should be against
> the num_crtc field in radeon_device not against num_crtcs in drm_device

This more correct, but would there ever be a case where they are different?

Alex

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

>
> Signed-off-by: Ilija Hadzic <ihadzic at research.bell-labs.com>
> ---
>  drivers/gpu/drm/radeon/radeon_kms.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index a749c26..540a9ee 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -347,7 +347,7 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
>        struct drm_crtc *drmcrtc;
>        struct radeon_device *rdev = dev->dev_private;
>
> -       if (crtc < 0 || crtc >= dev->num_crtcs) {
> +       if (crtc < 0 || crtc >= rdev->num_crtc) {
>                DRM_ERROR("Invalid crtc %d\n", crtc);
>                return -EINVAL;
>        }
> --
> 1.7.7
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>


More information about the dri-devel mailing list