[Intel-gfx] [PATCH v2 19/21] drm/vkms: Convert to CRTC VBLANK callbacks

Thomas Zimmermann tzimmermann at suse.de
Fri Jan 17 13:22:59 UTC 2020


Hi

Am 16.01.20 um 00:18 schrieb Rodrigo Siqueira:
> Hi,
> 
> Thanks for the patch, I reviewed and tested it. Everything looks fine
> for VKMS.
> 
> Reviewed-by: Rodrigo Siqueira <rodrigosiqueira at gmail.com>
> Tested-by: Rodrigo Siqueira <rodrigosiqueira at gmail.com>

Thanks a lot.

Best regards
Thomas

> 
> On 01/15, Thomas Zimmermann wrote:
>> VBLANK callbacks in struct drm_driver are deprecated in favor of
>> their equivalents in struct drm_crtc_funcs. Convert vkms over.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> ---
>>  drivers/gpu/drm/vkms/vkms_crtc.c | 9 ++++++---
>>  drivers/gpu/drm/vkms/vkms_drv.c  | 1 -
>>  drivers/gpu/drm/vkms/vkms_drv.h  | 4 ----
>>  3 files changed, 6 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
>> index 74f703b8d22a..ac85e17428f8 100644
>> --- a/drivers/gpu/drm/vkms/vkms_crtc.c
>> +++ b/drivers/gpu/drm/vkms/vkms_crtc.c
>> @@ -76,10 +76,12 @@ static void vkms_disable_vblank(struct drm_crtc *crtc)
>>  	hrtimer_cancel(&out->vblank_hrtimer);
>>  }
>>  
>> -bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
>> -			       int *max_error, ktime_t *vblank_time,
>> -			       bool in_vblank_irq)
>> +static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc,
>> +				      int *max_error, ktime_t *vblank_time,
>> +				      bool in_vblank_irq)
>>  {
>> +	struct drm_device *dev = crtc->dev;
>> +	unsigned int pipe = crtc->index;
>>  	struct vkms_device *vkmsdev = drm_device_to_vkms_device(dev);
>>  	struct vkms_output *output = &vkmsdev->output;
>>  	struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
>> @@ -154,6 +156,7 @@ static const struct drm_crtc_funcs vkms_crtc_funcs = {
>>  	.atomic_destroy_state   = vkms_atomic_crtc_destroy_state,
>>  	.enable_vblank		= vkms_enable_vblank,
>>  	.disable_vblank		= vkms_disable_vblank,
>> +	.get_vblank_timestamp	= vkms_get_vblank_timestamp,
>>  	.get_crc_sources	= vkms_get_crc_sources,
>>  	.set_crc_source		= vkms_set_crc_source,
>>  	.verify_crc_source	= vkms_verify_crc_source,
>> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
>> index 25bd7519295f..860de052e820 100644
>> --- a/drivers/gpu/drm/vkms/vkms_drv.c
>> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
>> @@ -103,7 +103,6 @@ static struct drm_driver vkms_driver = {
>>  	.dumb_create		= vkms_dumb_create,
>>  	.gem_vm_ops		= &vkms_gem_vm_ops,
>>  	.gem_free_object_unlocked = vkms_gem_free_object,
>> -	.get_vblank_timestamp	= vkms_get_vblank_timestamp,
>>  	.prime_fd_to_handle	= drm_gem_prime_fd_to_handle,
>>  	.gem_prime_import_sg_table = vkms_prime_import_sg_table,
>>  
>> diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
>> index 7d52e24564db..eda04ffba7b1 100644
>> --- a/drivers/gpu/drm/vkms/vkms_drv.h
>> +++ b/drivers/gpu/drm/vkms/vkms_drv.h
>> @@ -111,10 +111,6 @@ struct vkms_gem_object {
>>  int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
>>  		   struct drm_plane *primary, struct drm_plane *cursor);
>>  
>> -bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
>> -			       int *max_error, ktime_t *vblank_time,
>> -			       bool in_vblank_irq);
>> -
>>  int vkms_output_init(struct vkms_device *vkmsdev, int index);
>>  
>>  struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev,
>> -- 
>> 2.24.1
>>
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20200117/81bca429/attachment.sig>


More information about the Intel-gfx mailing list