[PATCH] drm/vmwgfx: Stop requesting the pci regions

Javier Martinez Canillas javierm at redhat.com
Tue Jan 18 19:00:13 UTC 2022


Hello Zack,

On 1/17/22 19:03, Zack Rusin wrote:
> From: Zack Rusin <zackr at vmware.com>
> 
> When sysfb_simple is enabled loading vmwgfx fails because the regions
> are held by the platform. In that case remove_conflicting*_framebuffers
> only removes the simplefb but not the regions held by sysfb.
>

Indeed, that's an issue. I wonder if we should drop the IORESOURCE_BUSY
flag from the memory resource added to the "simple-framebuffer" device ?

In fact, maybe in sysfb_create_simplefb() shouldn't even attempt to claim
a memory resource and just register the platform device with no resources ?
 
> Like the other drm drivers we need to stop requesting all the pci regions
> to let the driver load with platform code enabled.
> This allows vmwgfx to load correctly on systems with sysfb_simple enabled.
>

I read this very interesting thread from two years ago:

https://lkml.org/lkml/2020/11/5/248

Maybe is worth mentioning in the commit message what Daniel said there,
that is that only a few DRM drivers request explicitly the PCI regions
and the only reliable approach is for bus drivers to claim these.

In other words, removing the pci_request_regions() seems to have merit
on its own.

> Signed-off-by: Zack Rusin <zackr at vmware.com>
> Fixes: 523375c943e5 ("drm/vmwgfx: Port vmwgfx to arm64")
> Cc: dri-devel at lists.freedesktop.org
> Cc: <stable at vger.kernel.org>
> Reviewed-by: Martin Krastev <krastevm at vmware.com>
> ---

The patch looks good to me, thanks a lot for fixing this:

Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>

Best regards,
-- 
Javier Martinez Canillas
Linux Engineering
Red Hat



More information about the dri-devel mailing list