diff options
Diffstat (limited to 'drivers/gpu/drm/meson/meson_drv.h')
-rw-r--r-- | drivers/gpu/drm/meson/meson_drv.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/meson/meson_drv.h b/drivers/gpu/drm/meson/meson_drv.h index c9aaec1a846e..820d07bdd42a 100644 --- a/drivers/gpu/drm/meson/meson_drv.h +++ b/drivers/gpu/drm/meson/meson_drv.h @@ -9,6 +9,7 @@ #include <linux/device.h> #include <linux/of.h> +#include <linux/of_device.h> #include <linux/regmap.h> struct drm_crtc; @@ -16,8 +17,16 @@ struct drm_device; struct drm_plane; struct meson_drm; +enum vpu_compatible { + VPU_COMPATIBLE_GXBB = 0, + VPU_COMPATIBLE_GXL = 1, + VPU_COMPATIBLE_GXM = 2, + VPU_COMPATIBLE_G12A = 3, +}; + struct meson_drm { struct device *dev; + enum vpu_compatible compat; void __iomem *io_base; struct regmap *hhi; int vsync_irq; @@ -116,9 +125,9 @@ struct meson_drm { }; static inline int meson_vpu_is_compatible(struct meson_drm *priv, - const char *compat) + enum vpu_compatible family) { - return of_device_is_compatible(priv->dev->of_node, compat); + return priv->compat == family; } #endif /* __MESON_DRV_H */ |