Re: [PATCH v2] drm/tilcdc: Precalculate total frametime in tilcdc_crtc_set_mode()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 10/13/17 14:04, Tomi Valkeinen wrote:
>> +uint tilcdc_mode_hvtotal(const struct drm_display_mode *mode)
>> +{
>> +	uint ret;
>> +
>> +	ret = (uint) div_u64(1000llu * mode->htotal * mode->vtotal,
>> +			     mode->clock);
>> +
>> +	return ret;
>> +}
> I don't think "uint" is recommended. Just use u32. And drop the ret
> variable, just one-line return statement should be enough.
> 

The ret variable can of course be dropped, but how u32 is better than
uint? If the driver would ever be used in 64bit architecture (highly
unlikely), then it would automatically use the higher precision, and on
32-bit architecture there is no difference.

Also the data member in the private struct is uint and so are the other
similar data members like lcd_fck_rate.

So why change?

Best regards,
Jyri

> Otherwise:
> 
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
> 
>  Tomi


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux