[PATCH 09/13] staging: sm750fb: use simpler remove_conflicting_pci_framebuffers()

Daniel Vetter daniel at ffwll.ch
Mon Nov 27 10:25:05 UTC 2017


On Fri, Nov 24, 2017 at 06:53:33PM +0100, Michał Mirosław wrote:
> Signed-off-by: Michał Mirosław <mirq-linux at rere.qmqm.pl>
> ---

Why exactly do we have an fbdev driver in staging? Afaiui fbdev is
entirely closed for new drivers (pls convert to an atomic drm driver
instead, it likely will be smaller even).

That's even worse than having a non-atomic drm driver in staging ...
-Daniel

>  drivers/staging/sm750fb/sm750.c | 22 +---------------------
>  1 file changed, 1 insertion(+), 21 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 67207b0554cd..0590fc45c493 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -1053,26 +1053,6 @@ static int sm750fb_frambuffer_alloc(struct sm750_dev *sm750_dev, int fbidx)
>  	return err;
>  }
>  
> -static int lynxfb_kick_out_firmware_fb(struct pci_dev *pdev)
> -{
> -	struct apertures_struct *ap;
> -	bool primary = false;
> -
> -	ap = alloc_apertures(1);
> -	if (!ap)
> -		return -ENOMEM;
> -
> -	ap->ranges[0].base = pci_resource_start(pdev, 0);
> -	ap->ranges[0].size = pci_resource_len(pdev, 0);
> -#ifdef CONFIG_X86
> -	primary = pdev->resource[PCI_ROM_RESOURCE].flags &
> -					IORESOURCE_ROM_SHADOW;
> -#endif
> -	remove_conflicting_framebuffers(ap, "sm750_fb1", primary);
> -	kfree(ap);
> -	return 0;
> -}
> -
>  static int lynxfb_pci_probe(struct pci_dev *pdev,
>  			    const struct pci_device_id *ent)
>  {
> @@ -1081,7 +1061,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
>  	int fbidx;
>  	int err;
>  
> -	err = lynxfb_kick_out_firmware_fb(pdev);
> +	err = remove_conflicting_pci_framebuffers(pdev, 0, "sm750_fb1");
>  	if (err)
>  		return err;
>  
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list