[PATCH] drm/radeon: make crtc number check in radeon_get_vblank_timestamp_kmsconsistent with other functions

Mario Kleiner mario.kleiner at tuebingen.mpg.de
Fri May 6 08:42:57 PDT 2011


On May 6, 2011, at 5:03 PM, Alex Deucher wrote:

> On Wed, May 4, 2011 at 11:52 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
>> like it's done in all other functions that handle crtc
>>
>
> Looks good to me.  Mario, any reason why we should use the dev version
> rather than the rdev version?
>

No, perfectly fine with me.

Reviewed-by: Mario Kleiner <mario.kleiner at tuebingen.mpg.de>

> Reviewed-by: Alex Deucher <alexdeucher at gmail.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 871df03..f9e968f 100644
>> --- a/drivers/gpu/drm/radeon/radeon_kms.c
>> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
>> @@ -331,7 +331,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.4.1
>>
>>

*********************************************************************
Mario Kleiner
Max Planck Institute for Biological Cybernetics
Spemannstr. 38
72076 Tuebingen
Germany

e-mail: mario.kleiner at tuebingen.mpg.de
office: +49 (0)7071/601-1623
fax:    +49 (0)7071/601-616
www:    http://www.kyb.tuebingen.mpg.de/~kleinerm
*********************************************************************
"For a successful technology, reality must take precedence
over public relations, for Nature cannot be fooled."
(Richard Feynman)



More information about the dri-devel mailing list