[PATCH] drm/vboxvideo: Remove unused hgsmi_cursor_position

linux@treblig.org posted 1 patch 1 year ago
drivers/gpu/drm/vboxvideo/hgsmi_base.c      | 37 ---------------------
drivers/gpu/drm/vboxvideo/vboxvideo_guest.h |  2 --
2 files changed, 39 deletions(-)
[PATCH] drm/vboxvideo: Remove unused hgsmi_cursor_position
Posted by linux@treblig.org 1 year ago
From: "Dr. David Alan Gilbert" <linux@treblig.org>

hgsmi_cursor_position() has been unused since 2018's
commit 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to
universal plane")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 drivers/gpu/drm/vboxvideo/hgsmi_base.c      | 37 ---------------------
 drivers/gpu/drm/vboxvideo/vboxvideo_guest.h |  2 --
 2 files changed, 39 deletions(-)

diff --git a/drivers/gpu/drm/vboxvideo/hgsmi_base.c b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
index 87dccaecc3e5..db994aeaa0f9 100644
--- a/drivers/gpu/drm/vboxvideo/hgsmi_base.c
+++ b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
@@ -181,40 +181,3 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
 
 	return rc;
 }
-
-/**
- * hgsmi_cursor_position - Report the guest cursor position.  The host may
- *                         wish to use this information to re-position its
- *                         own cursor (though this is currently unlikely).
- *                         The current host cursor position is returned.
- * Return: 0 or negative errno value.
- * @ctx:              The context containing the heap used.
- * @report_position:  Are we reporting a position?
- * @x:                Guest cursor X position.
- * @y:                Guest cursor Y position.
- * @x_host:           Host cursor X position is stored here.  Optional.
- * @y_host:           Host cursor Y position is stored here.  Optional.
- */
-int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
-			  u32 x, u32 y, u32 *x_host, u32 *y_host)
-{
-	struct vbva_cursor_position *p;
-
-	p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA,
-			       VBVA_CURSOR_POSITION);
-	if (!p)
-		return -ENOMEM;
-
-	p->report_position = report_position;
-	p->x = x;
-	p->y = y;
-
-	hgsmi_buffer_submit(ctx, p);
-
-	*x_host = p->x;
-	*y_host = p->y;
-
-	hgsmi_buffer_free(ctx, p);
-
-	return 0;
-}
diff --git a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
index 55fcee3a6470..643c4448bdcb 100644
--- a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
+++ b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
@@ -34,8 +34,6 @@ int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret);
 int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
 			       u32 hot_x, u32 hot_y, u32 width, u32 height,
 			       u8 *pixels, u32 len);
-int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
-			  u32 x, u32 y, u32 *x_host, u32 *y_host);
 
 bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
 		 struct vbva_buffer *vbva, s32 screen);
-- 
2.47.1
Re: [PATCH] drm/vboxvideo: Remove unused hgsmi_cursor_position
Posted by Dr. David Alan Gilbert 9 months, 3 weeks ago
* linux@treblig.org (linux@treblig.org) wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> hgsmi_cursor_position() has been unused since 2018's
> commit 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to
> universal plane")
> 
> Remove it.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

Hi David, Simona,
  Will this one be picked up by drm-next?  It got Hans's
review back on 16 Dec.
( in 2513e942-6391-4a96-b487-1e4ba19b7aeb@redhat.com )

  Thanks,

Dave

> ---
>  drivers/gpu/drm/vboxvideo/hgsmi_base.c      | 37 ---------------------
>  drivers/gpu/drm/vboxvideo/vboxvideo_guest.h |  2 --
>  2 files changed, 39 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vboxvideo/hgsmi_base.c b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> index 87dccaecc3e5..db994aeaa0f9 100644
> --- a/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> +++ b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> @@ -181,40 +181,3 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
>  
>  	return rc;
>  }
> -
> -/**
> - * hgsmi_cursor_position - Report the guest cursor position.  The host may
> - *                         wish to use this information to re-position its
> - *                         own cursor (though this is currently unlikely).
> - *                         The current host cursor position is returned.
> - * Return: 0 or negative errno value.
> - * @ctx:              The context containing the heap used.
> - * @report_position:  Are we reporting a position?
> - * @x:                Guest cursor X position.
> - * @y:                Guest cursor Y position.
> - * @x_host:           Host cursor X position is stored here.  Optional.
> - * @y_host:           Host cursor Y position is stored here.  Optional.
> - */
> -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
> -			  u32 x, u32 y, u32 *x_host, u32 *y_host)
> -{
> -	struct vbva_cursor_position *p;
> -
> -	p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA,
> -			       VBVA_CURSOR_POSITION);
> -	if (!p)
> -		return -ENOMEM;
> -
> -	p->report_position = report_position;
> -	p->x = x;
> -	p->y = y;
> -
> -	hgsmi_buffer_submit(ctx, p);
> -
> -	*x_host = p->x;
> -	*y_host = p->y;
> -
> -	hgsmi_buffer_free(ctx, p);
> -
> -	return 0;
> -}
> diff --git a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> index 55fcee3a6470..643c4448bdcb 100644
> --- a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> +++ b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> @@ -34,8 +34,6 @@ int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret);
>  int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
>  			       u32 hot_x, u32 hot_y, u32 width, u32 height,
>  			       u8 *pixels, u32 len);
> -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
> -			  u32 x, u32 y, u32 *x_host, u32 *y_host);
>  
>  bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
>  		 struct vbva_buffer *vbva, s32 screen);
> -- 
> 2.47.1
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Re: [PATCH] drm/vboxvideo: Remove unused hgsmi_cursor_position
Posted by Thomas Zimmermann 9 months, 3 weeks ago
Hi

Am 27.02.25 um 22:34 schrieb Dr. David Alan Gilbert:
> * linux@treblig.org (linux@treblig.org) wrote:
>> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>>
>> hgsmi_cursor_position() has been unused since 2018's
>> commit 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to
>> universal plane")
>>
>> Remove it.
>>
>> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> Hi David, Simona,
>    Will this one be picked up by drm-next?  It got Hans's
> review back on 16 Dec.
> ( in 2513e942-6391-4a96-b487-1e4ba19b7aeb@redhat.com )

Merged into drm-misc-next now. Apologies for the delay.

Best regards
Thomas

>
>    Thanks,
>
> Dave
>
>> ---
>>   drivers/gpu/drm/vboxvideo/hgsmi_base.c      | 37 ---------------------
>>   drivers/gpu/drm/vboxvideo/vboxvideo_guest.h |  2 --
>>   2 files changed, 39 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/vboxvideo/hgsmi_base.c b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
>> index 87dccaecc3e5..db994aeaa0f9 100644
>> --- a/drivers/gpu/drm/vboxvideo/hgsmi_base.c
>> +++ b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
>> @@ -181,40 +181,3 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
>>   
>>   	return rc;
>>   }
>> -
>> -/**
>> - * hgsmi_cursor_position - Report the guest cursor position.  The host may
>> - *                         wish to use this information to re-position its
>> - *                         own cursor (though this is currently unlikely).
>> - *                         The current host cursor position is returned.
>> - * Return: 0 or negative errno value.
>> - * @ctx:              The context containing the heap used.
>> - * @report_position:  Are we reporting a position?
>> - * @x:                Guest cursor X position.
>> - * @y:                Guest cursor Y position.
>> - * @x_host:           Host cursor X position is stored here.  Optional.
>> - * @y_host:           Host cursor Y position is stored here.  Optional.
>> - */
>> -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
>> -			  u32 x, u32 y, u32 *x_host, u32 *y_host)
>> -{
>> -	struct vbva_cursor_position *p;
>> -
>> -	p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA,
>> -			       VBVA_CURSOR_POSITION);
>> -	if (!p)
>> -		return -ENOMEM;
>> -
>> -	p->report_position = report_position;
>> -	p->x = x;
>> -	p->y = y;
>> -
>> -	hgsmi_buffer_submit(ctx, p);
>> -
>> -	*x_host = p->x;
>> -	*y_host = p->y;
>> -
>> -	hgsmi_buffer_free(ctx, p);
>> -
>> -	return 0;
>> -}
>> diff --git a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
>> index 55fcee3a6470..643c4448bdcb 100644
>> --- a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
>> +++ b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
>> @@ -34,8 +34,6 @@ int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret);
>>   int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
>>   			       u32 hot_x, u32 hot_y, u32 width, u32 height,
>>   			       u8 *pixels, u32 len);
>> -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
>> -			  u32 x, u32 y, u32 *x_host, u32 *y_host);
>>   
>>   bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
>>   		 struct vbva_buffer *vbva, s32 screen);
>> -- 
>> 2.47.1
>>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Re: [PATCH] drm/vboxvideo: Remove unused hgsmi_cursor_position
Posted by Dr. David Alan Gilbert 9 months, 3 weeks ago
* Thomas Zimmermann (tzimmermann@suse.de) wrote:
> Hi
> 
> Am 27.02.25 um 22:34 schrieb Dr. David Alan Gilbert:
> > * linux@treblig.org (linux@treblig.org) wrote:
> > > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> > > 
> > > hgsmi_cursor_position() has been unused since 2018's
> > > commit 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to
> > > universal plane")
> > > 
> > > Remove it.
> > > 
> > > Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> > Hi David, Simona,
> >    Will this one be picked up by drm-next?  It got Hans's
> > review back on 16 Dec.
> > ( in 2513e942-6391-4a96-b487-1e4ba19b7aeb@redhat.com )
> 
> Merged into drm-misc-next now. Apologies for the delay.

Thanks; I've got a bunch of other old ones with reviews I'll also ping
soon.

Dave

> Best regards
> Thomas
> 
> > 
> >    Thanks,
> > 
> > Dave
> > 
> > > ---
> > >   drivers/gpu/drm/vboxvideo/hgsmi_base.c      | 37 ---------------------
> > >   drivers/gpu/drm/vboxvideo/vboxvideo_guest.h |  2 --
> > >   2 files changed, 39 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/vboxvideo/hgsmi_base.c b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> > > index 87dccaecc3e5..db994aeaa0f9 100644
> > > --- a/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> > > +++ b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> > > @@ -181,40 +181,3 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
> > >   	return rc;
> > >   }
> > > -
> > > -/**
> > > - * hgsmi_cursor_position - Report the guest cursor position.  The host may
> > > - *                         wish to use this information to re-position its
> > > - *                         own cursor (though this is currently unlikely).
> > > - *                         The current host cursor position is returned.
> > > - * Return: 0 or negative errno value.
> > > - * @ctx:              The context containing the heap used.
> > > - * @report_position:  Are we reporting a position?
> > > - * @x:                Guest cursor X position.
> > > - * @y:                Guest cursor Y position.
> > > - * @x_host:           Host cursor X position is stored here.  Optional.
> > > - * @y_host:           Host cursor Y position is stored here.  Optional.
> > > - */
> > > -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
> > > -			  u32 x, u32 y, u32 *x_host, u32 *y_host)
> > > -{
> > > -	struct vbva_cursor_position *p;
> > > -
> > > -	p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA,
> > > -			       VBVA_CURSOR_POSITION);
> > > -	if (!p)
> > > -		return -ENOMEM;
> > > -
> > > -	p->report_position = report_position;
> > > -	p->x = x;
> > > -	p->y = y;
> > > -
> > > -	hgsmi_buffer_submit(ctx, p);
> > > -
> > > -	*x_host = p->x;
> > > -	*y_host = p->y;
> > > -
> > > -	hgsmi_buffer_free(ctx, p);
> > > -
> > > -	return 0;
> > > -}
> > > diff --git a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> > > index 55fcee3a6470..643c4448bdcb 100644
> > > --- a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> > > +++ b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> > > @@ -34,8 +34,6 @@ int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret);
> > >   int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
> > >   			       u32 hot_x, u32 hot_y, u32 width, u32 height,
> > >   			       u8 *pixels, u32 len);
> > > -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
> > > -			  u32 x, u32 y, u32 *x_host, u32 *y_host);
> > >   bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
> > >   		 struct vbva_buffer *vbva, s32 screen);
> > > -- 
> > > 2.47.1
> > > 
> 
> -- 
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstrasse 146, 90461 Nuernberg, Germany
> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
> HRB 36809 (AG Nuernberg)
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
Re: [PATCH] drm/vboxvideo: Remove unused hgsmi_cursor_position
Posted by Hans de Goede 1 year ago
Hi,

On 15-Dec-24 11:00 PM, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
> 
> hgsmi_cursor_position() has been unused since 2018's
> commit 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to
> universal plane")
> 
> Remove it.
> 
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>  drivers/gpu/drm/vboxvideo/hgsmi_base.c      | 37 ---------------------
>  drivers/gpu/drm/vboxvideo/vboxvideo_guest.h |  2 --
>  2 files changed, 39 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vboxvideo/hgsmi_base.c b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> index 87dccaecc3e5..db994aeaa0f9 100644
> --- a/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> +++ b/drivers/gpu/drm/vboxvideo/hgsmi_base.c
> @@ -181,40 +181,3 @@ int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
>  
>  	return rc;
>  }
> -
> -/**
> - * hgsmi_cursor_position - Report the guest cursor position.  The host may
> - *                         wish to use this information to re-position its
> - *                         own cursor (though this is currently unlikely).
> - *                         The current host cursor position is returned.
> - * Return: 0 or negative errno value.
> - * @ctx:              The context containing the heap used.
> - * @report_position:  Are we reporting a position?
> - * @x:                Guest cursor X position.
> - * @y:                Guest cursor Y position.
> - * @x_host:           Host cursor X position is stored here.  Optional.
> - * @y_host:           Host cursor Y position is stored here.  Optional.
> - */
> -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
> -			  u32 x, u32 y, u32 *x_host, u32 *y_host)
> -{
> -	struct vbva_cursor_position *p;
> -
> -	p = hgsmi_buffer_alloc(ctx, sizeof(*p), HGSMI_CH_VBVA,
> -			       VBVA_CURSOR_POSITION);
> -	if (!p)
> -		return -ENOMEM;
> -
> -	p->report_position = report_position;
> -	p->x = x;
> -	p->y = y;
> -
> -	hgsmi_buffer_submit(ctx, p);
> -
> -	*x_host = p->x;
> -	*y_host = p->y;
> -
> -	hgsmi_buffer_free(ctx, p);
> -
> -	return 0;
> -}
> diff --git a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> index 55fcee3a6470..643c4448bdcb 100644
> --- a/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> +++ b/drivers/gpu/drm/vboxvideo/vboxvideo_guest.h
> @@ -34,8 +34,6 @@ int hgsmi_query_conf(struct gen_pool *ctx, u32 index, u32 *value_ret);
>  int hgsmi_update_pointer_shape(struct gen_pool *ctx, u32 flags,
>  			       u32 hot_x, u32 hot_y, u32 width, u32 height,
>  			       u8 *pixels, u32 len);
> -int hgsmi_cursor_position(struct gen_pool *ctx, bool report_position,
> -			  u32 x, u32 y, u32 *x_host, u32 *y_host);
>  
>  bool vbva_enable(struct vbva_buf_ctx *vbva_ctx, struct gen_pool *ctx,
>  		 struct vbva_buffer *vbva, s32 screen);