From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: linaro-kernel@lists.linaro.org, michel@daenzer.net,
philippe.cornu@st.com, dri-devel@lists.freedesktop.org,
yannick.fertre@st.com, airlied@redhat.com
Subject: Re: [PATCH v4 3/4] drm: compile drm_vm.c only when needed
Date: Wed, 07 Dec 2016 16:34:03 +0200 [thread overview]
Message-ID: <1675139.Zgmug2COoQ@avalon> (raw)
In-Reply-To: <1481105211-18020-4-git-send-email-benjamin.gaignard@linaro.org>
Hi Benjamin,
Thank you for the patch.
On Wednesday 07 Dec 2016 11:06:50 Benjamin Gaignard wrote:
> drm_vm.c functions are only need for DRM_LEGACY and DRM_NOUVEAU.
> Use a new DRM_VM to define when drm_vm.c in needed.
>
> stub drm_legacy_vma_flush() to avoid compilation issues
>
> version 4:
> - a "config DRM_VM" in Kconfig
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/Kconfig | 5 +++++
> drivers/gpu/drm/Makefile | 3 ++-
> drivers/gpu/drm/drm_legacy.h | 7 +++++++
> drivers/gpu/drm/nouveau/Kconfig | 1 +
> 4 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 8d9cf73..83ac815 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -121,6 +121,10 @@ config DRM_KMS_CMA_HELPER
> help
> Choose this if you need the KMS CMA helper functions
>
> +config DRM_VM
> + bool
> + depends on DRM
> +
> source "drivers/gpu/drm/i2c/Kconfig"
>
> source "drivers/gpu/drm/arm/Kconfig"
> @@ -246,6 +250,7 @@ source "drivers/gpu/drm/zte/Kconfig"
> menuconfig DRM_LEGACY
> bool "Enable legacy drivers (DANGEROUS)"
> depends on DRM
> + select DRM_VM
> help
> Enable legacy DRI1 drivers. Those drivers expose unsafe and
dangerous
> APIs to user-space, which can be used to circumvent access
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index e10e935..5b73b16 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -5,7 +5,7 @@
> drm-y := drm_auth.o drm_bufs.o drm_cache.o \
> drm_context.o drm_dma.o \
> drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
> - drm_lock.o drm_memory.o drm_drv.o drm_vm.o \
> + drm_lock.o drm_memory.o drm_drv.o \
> drm_scatter.o drm_pci.o \
> drm_platform.o drm_sysfs.o drm_hashtab.o drm_mm.o \
> drm_crtc.o drm_fourcc.o drm_modes.o drm_edid.o \
> @@ -18,6 +18,7 @@ drm-y := drm_auth.o drm_bufs.o drm_cache.o \
> drm_plane.o drm_color_mgmt.o drm_print.o \
> drm_dumb_buffers.o drm_mode_config.o
>
> +drm-$(CONFIG_DRM_VM) += drm_vm.o
> drm-$(CONFIG_COMPAT) += drm_ioc32.o
> drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o
> drm-$(CONFIG_PCI) += ati_pcigart.o
> diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h
> index c6f422e..e4bb5ad 100644
> --- a/drivers/gpu/drm/drm_legacy.h
> +++ b/drivers/gpu/drm/drm_legacy.h
> @@ -74,7 +74,14 @@ int drm_legacy_getmap_ioctl(struct drm_device *dev, void
> *data, int drm_legacy_mapbufs(struct drm_device *d, void *v, struct
> drm_file *f); int drm_legacy_dma_ioctl(struct drm_device *d, void *v,
> struct drm_file *f);
>
> +#ifdef CONFIG_DRM_VM
> void drm_legacy_vma_flush(struct drm_device *d);
> +#else
> +static inline void drm_legacy_vma_flush(struct drm_device *d)
> +{
> + /* do nothing */
> +}
> +#endif
>
> /*
> * AGP Support
> diff --git a/drivers/gpu/drm/nouveau/Kconfig
> b/drivers/gpu/drm/nouveau/Kconfig index 2922a82..0f2f0af 100644
> --- a/drivers/gpu/drm/nouveau/Kconfig
> +++ b/drivers/gpu/drm/nouveau/Kconfig
> @@ -16,6 +16,7 @@ config DRM_NOUVEAU
> select INPUT if ACPI && X86
> select THERMAL if ACPI && X86
> select ACPI_VIDEO if ACPI && X86
> + select DRM_VM
> help
> Choose this option for open-source NVIDIA support.
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-12-07 14:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 10:06 [PATCH v4 0/4] DRM: allow to use mmuless devices Benjamin Gaignard
2016-12-07 10:06 ` [PATCH v4 1/4] nommu: allow mmap when !CONFIG_MMU Benjamin Gaignard
2016-12-07 10:06 ` [PATCH v4 2/4] fbmem: add a default get_fb_unmapped_area function Benjamin Gaignard
2016-12-07 14:35 ` Laurent Pinchart
2016-12-07 14:57 ` Benjamin Gaignard
2016-12-07 15:19 ` Laurent Pinchart
2016-12-07 15:31 ` Benjamin Gaignard
2016-12-07 10:06 ` [PATCH v4 3/4] drm: compile drm_vm.c only when needed Benjamin Gaignard
2016-12-07 14:34 ` Laurent Pinchart [this message]
2016-12-07 10:06 ` [PATCH v4 4/4] drm: allow to use mmuless SoC Benjamin Gaignard
2016-12-07 10:27 ` Daniel Vetter
2016-12-07 10:42 ` Benjamin Gaignard
2016-12-07 14:32 ` Laurent Pinchart
2016-12-07 14:49 ` Daniel Vetter
2016-12-07 15:19 ` Benjamin Gaignard
2016-12-07 16:17 ` Eric Engestrom
2016-12-07 20:44 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1675139.Zgmug2COoQ@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@redhat.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=michel@daenzer.net \
--cc=philippe.cornu@st.com \
--cc=yannick.fertre@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.