diff mbox series

[09/18] vfio-mdev/mdpy-fb: Do not set struct fb_info.apertures

Message ID 20221219160516.23436-10-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm,fbdev: Remove apertures structure and FBINFO_MISC_FIRMWARE | expand

Commit Message

Thomas Zimmermann Dec. 19, 2022, 4:05 p.m. UTC
Generic fbdev drivers use the apertures field in struct fb_info to
control ownership of the framebuffer memory and graphics device. Do
not set the values in mdpy-fb.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 samples/vfio-mdev/mdpy-fb.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Javier Martinez Canillas Dec. 20, 2022, 9:32 a.m. UTC | #1
[adding Kirti Wankhede and kvm@vger.kernel.org to Cc list]

On 12/19/22 17:05, Thomas Zimmermann wrote:
> Generic fbdev drivers use the apertures field in struct fb_info to
> control ownership of the framebuffer memory and graphics device. Do
> not set the values in mdpy-fb.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  samples/vfio-mdev/mdpy-fb.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
> index 9ec93d90e8a5..1de5801cd2e8 100644
> --- a/samples/vfio-mdev/mdpy-fb.c
> +++ b/samples/vfio-mdev/mdpy-fb.c
> @@ -161,14 +161,6 @@ static int mdpy_fb_probe(struct pci_dev *pdev,
>  		goto err_release_fb;
>  	}
>  
> -	info->apertures = alloc_apertures(1);
> -	if (!info->apertures) {
> -		ret = -ENOMEM;
> -		goto err_unmap;
> -	}
> -	info->apertures->ranges[0].base = info->fix.smem_start;
> -	info->apertures->ranges[0].size = info->fix.smem_len;
> -
>  	info->fbops = &mdpy_fb_ops;
>  	info->flags = FBINFO_DEFAULT;
>  	info->pseudo_palette = par->palette;
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

But I think an ack from Kirti Wankhede or other virt folk is needed if you
want to merge this through drm-misc-next.
Thomas Zimmermann Jan. 3, 2023, 1:54 p.m. UTC | #2
Am 20.12.22 um 10:32 schrieb Javier Martinez Canillas:
> [adding Kirti Wankhede and kvm@vger.kernel.org to Cc list]
> 
> On 12/19/22 17:05, Thomas Zimmermann wrote:
>> Generic fbdev drivers use the apertures field in struct fb_info to
>> control ownership of the framebuffer memory and graphics device. Do
>> not set the values in mdpy-fb.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>   samples/vfio-mdev/mdpy-fb.c | 8 --------
>>   1 file changed, 8 deletions(-)
>>
>> diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
>> index 9ec93d90e8a5..1de5801cd2e8 100644
>> --- a/samples/vfio-mdev/mdpy-fb.c
>> +++ b/samples/vfio-mdev/mdpy-fb.c
>> @@ -161,14 +161,6 @@ static int mdpy_fb_probe(struct pci_dev *pdev,
>>   		goto err_release_fb;
>>   	}
>>   
>> -	info->apertures = alloc_apertures(1);
>> -	if (!info->apertures) {
>> -		ret = -ENOMEM;
>> -		goto err_unmap;
>> -	}
>> -	info->apertures->ranges[0].base = info->fix.smem_start;
>> -	info->apertures->ranges[0].size = info->fix.smem_len;
>> -
>>   	info->fbops = &mdpy_fb_ops;
>>   	info->flags = FBINFO_DEFAULT;
>>   	info->pseudo_palette = par->palette;
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> 
> But I think an ack from Kirti Wankhede or other virt folk is needed if you
> want to merge this through drm-misc-next.

ping. Could I have a review from the vfio devs, please.

Best regards
Thomas

>
diff mbox series

Patch

diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c
index 9ec93d90e8a5..1de5801cd2e8 100644
--- a/samples/vfio-mdev/mdpy-fb.c
+++ b/samples/vfio-mdev/mdpy-fb.c
@@ -161,14 +161,6 @@  static int mdpy_fb_probe(struct pci_dev *pdev,
 		goto err_release_fb;
 	}
 
-	info->apertures = alloc_apertures(1);
-	if (!info->apertures) {
-		ret = -ENOMEM;
-		goto err_unmap;
-	}
-	info->apertures->ranges[0].base = info->fix.smem_start;
-	info->apertures->ranges[0].size = info->fix.smem_len;
-
 	info->fbops = &mdpy_fb_ops;
 	info->flags = FBINFO_DEFAULT;
 	info->pseudo_palette = par->palette;