SVGA3 is the only vmwgfx device available on ARM64. This change allows vmw_read and vmw_write to be completely eliminated by the compiler on ARM64 reducing the final module size by 128 KiB.
Signed-off-by: Ian Forbes <[email protected]> --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 3fde6dfe64e4..f7c760d72b85 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -630,7 +630,11 @@ static inline struct vmw_fpriv *vmw_fpriv(struct drm_file *file_priv) */ static inline bool vmw_is_svga_v3(const struct vmw_private *dev) { +#if defined(CONFIG_ARM64) + return true; +#else return dev->pci_id == VMWGFX_PCI_ID_SVGA3; +#endif } /* -- 2.51.1
