[PATH 2/4] rcar-du: Add support virtual DRM device
Sam Ravnborg
sam at ravnborg.org
Mon Jun 21 15:57:28 UTC 2021
On Mon, Jun 21, 2021 at 03:44:01PM +0900, Tomohito Esaki wrote:
> In order to use vDRM, it is necessary that the vDRM device is registered
> to du decice in the device tree.
> The "vdrms" key is added in du node and the vDRM device node is specified.
> For example:
> ----------
> & du {
> ...
> vdrms = <&vdrm0>;
> };
> ----------
>
> Signed-off-by: Tomohito Esaki <etom at igel.co.jp>
> ---
> drivers/gpu/drm/rcar-du/Kconfig | 4 +
> drivers/gpu/drm/rcar-du/Makefile | 1 +
> drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 42 ++++++
> drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 13 ++
> drivers/gpu/drm/rcar-du/rcar_du_drv.c | 13 ++
> drivers/gpu/drm/rcar-du/rcar_du_drv.h | 3 +
> drivers/gpu/drm/rcar-du/rcar_du_vdrm.c | 191 +++++++++++++++++++++++++
> drivers/gpu/drm/rcar-du/rcar_du_vdrm.h | 67 +++++++++
> drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 22 +++
> drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 1 +
> 10 files changed, 357 insertions(+)
> create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_vdrm.c
> create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_vdrm.h
>
> diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
> index b47e74421e34..6747f69c8593 100644
> --- a/drivers/gpu/drm/rcar-du/Kconfig
> +++ b/drivers/gpu/drm/rcar-du/Kconfig
> @@ -50,3 +50,7 @@ config DRM_RCAR_WRITEBACK
> bool
> default y if ARM64
> depends on DRM_RCAR_DU
> +
> +config DRM_RCAR_DU_VDRM
> + tristate "Virtual DRM for R-Car DU"
> + depends on DRM_RCAR_DU && DRM_VDRM
> diff --git a/drivers/gpu/drm/rcar-du/Makefile b/drivers/gpu/drm/rcar-du/Makefile
> index 4d1187ccc3e5..b589b974a9f3 100644
> --- a/drivers/gpu/drm/rcar-du/Makefile
> +++ b/drivers/gpu/drm/rcar-du/Makefile
> @@ -14,6 +14,7 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS) += rcar_du_of.o \
> rcar_du_of_lvds_r8a7796.dtb.o
> rcar-du-drm-$(CONFIG_DRM_RCAR_VSP) += rcar_du_vsp.o
> rcar-du-drm-$(CONFIG_DRM_RCAR_WRITEBACK) += rcar_du_writeback.o
> +rcar-du-drm-$(CONFIG_DRM_RCAR_DU_VDRM) += rcar_du_vdrm.o
>
> obj-$(CONFIG_DRM_RCAR_CMM) += rcar_cmm.o
> obj-$(CONFIG_DRM_RCAR_DU) += rcar-du-drm.o
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> index ea7e39d03545..7d48db24090b 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -32,6 +32,11 @@
> #include "rcar_du_vsp.h"
> #include "rcar_lvds.h"
>
> +#include "rcar_du_vdrm.h"
> +#ifdef CONFIG_DRM_RCAR_DU_VDRM
> +#include "../vdrm/vdrm_api.h"
> +#endif
Seems like vdrm_api.h belongs in include/drm/ as we should not pull in
headers like this.
Sam
More information about the dri-devel
mailing list