linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: remove unneeded ccflags-y from gvt/Makefile
@ 2020-04-09 15:06 Masahiro Yamada
  2020-04-09 15:06 ` [PATCH 2/2] drm/i915: remove gvt/Makefile Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2020-04-09 15:06 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx
  Cc: Masahiro Yamada, Daniel Vetter, David Airlie, Zhenyu Wang,
	Zhi Wang, dri-devel, intel-gvt-dev, linux-kernel

When CONFIG_DRM_I915_GVT=y, the same include path is added twice.

drivers/gpu/drm/i915/Makefile specifies:

  subdir-ccflags-y += -I$(srctree)/$(src)

drivers/gpu/drm/i915/gvt/Makefile adds the second '-I $(srctree)/$(src)',
which is redundant.

The include path '-I $(srctree)/$(src)/$(GVT_DIR)/' is added to allow
include/trace/define_trace.h to find the gvt/trace.h

By setting the correct relative path to TRACE_INCLUDE_PATH, this -I
is also unneeded.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/gpu/drm/i915/gvt/Makefile | 1 -
 drivers/gpu/drm/i915/gvt/trace.h  | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
index ea8324abc784..4d70f4689479 100644
--- a/drivers/gpu/drm/i915/gvt/Makefile
+++ b/drivers/gpu/drm/i915/gvt/Makefile
@@ -5,5 +5,4 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
 	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
 	fb_decoder.o dmabuf.o page_track.o
 
-ccflags-y				+= -I $(srctree)/$(src) -I $(srctree)/$(src)/$(GVT_DIR)/
 i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
diff --git a/drivers/gpu/drm/i915/gvt/trace.h b/drivers/gpu/drm/i915/gvt/trace.h
index 6d787750d279..d63b7eef6179 100644
--- a/drivers/gpu/drm/i915/gvt/trace.h
+++ b/drivers/gpu/drm/i915/gvt/trace.h
@@ -377,7 +377,7 @@ TRACE_EVENT(render_mmio,
 
 /* This part must be out of protection */
 #undef TRACE_INCLUDE_PATH
-#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/i915/gvt
 #undef TRACE_INCLUDE_FILE
 #define TRACE_INCLUDE_FILE trace
 #include <trace/define_trace.h>
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/i915: remove gvt/Makefile
  2020-04-09 15:06 [PATCH 1/2] drm/i915: remove unneeded ccflags-y from gvt/Makefile Masahiro Yamada
@ 2020-04-09 15:06 ` Masahiro Yamada
  2020-04-09 21:58   ` Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2020-04-09 15:06 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx
  Cc: Masahiro Yamada, Daniel Vetter, David Airlie, Zhenyu Wang,
	Zhi Wang, dri-devel, intel-gvt-dev, linux-kernel

Including subdirectory Makefile from the driver main Makefile does not
buy us much because this is not real isolation.

Having a single Makefile at the top of the module is clearer, and
it is what this driver almost does.

Move all gvt objects to the i915 main Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/gpu/drm/i915/Makefile     | 28 ++++++++++++++++++++++++----
 drivers/gpu/drm/i915/gvt/Makefile |  8 --------
 2 files changed, 24 insertions(+), 12 deletions(-)
 delete mode 100644 drivers/gpu/drm/i915/gvt/Makefile

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 6cd1f6253814..74e965882a98 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -275,10 +275,30 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
 # virtual gpu code
 i915-y += i915_vgpu.o
 
-ifeq ($(CONFIG_DRM_I915_GVT),y)
-i915-y += intel_gvt.o
-include $(src)/gvt/Makefile
-endif
+i915-$(CONFIG_DRM_I915_GVT) += \
+	intel_gvt.o \
+	gvt/gvt.o \
+	gvt/aperture_gm.o \
+	gvt/handlers.o \
+	gvt/vgpu.o \
+	gvt/trace_points.o \
+	gvt/firmware.o \
+	gvt/interrupt.o \
+	gvt/gtt.o \
+	gvt/cfg_space.o \
+	gvt/opregion.o \
+	gvt/mmio.o \
+	gvt/display.o \
+	gvt/edid.o \
+	gvt/execlist.o \
+	gvt/scheduler.o \
+	gvt/sched_policy.o \
+	gvt/mmio_context.o \
+	gvt/cmd_parser.o \
+	gvt/debugfs.o \
+	gvt/fb_decoder.o \
+	gvt/dmabuf.o \
+	gvt/page_track.o
 
 obj-$(CONFIG_DRM_I915) += i915.o
 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
deleted file mode 100644
index 4d70f4689479..000000000000
--- a/drivers/gpu/drm/i915/gvt/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-GVT_DIR := gvt
-GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
-	interrupt.o gtt.o cfg_space.o opregion.o mmio.o display.o edid.o \
-	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
-	fb_decoder.o dmabuf.o page_track.o
-
-i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/i915: remove gvt/Makefile
  2020-04-09 15:06 ` [PATCH 2/2] drm/i915: remove gvt/Makefile Masahiro Yamada
@ 2020-04-09 21:58   ` Jani Nikula
  2020-04-10  5:41     ` Zhenyu Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2020-04-09 21:58 UTC (permalink / raw)
  To: Masahiro Yamada, Joonas Lahtinen, Rodrigo Vivi, intel-gfx
  Cc: Masahiro Yamada, Daniel Vetter, David Airlie, Zhenyu Wang,
	Zhi Wang, dri-devel, intel-gvt-dev, linux-kernel

On Fri, 10 Apr 2020, Masahiro Yamada <masahiroy@kernel.org> wrote:
> Including subdirectory Makefile from the driver main Makefile does not
> buy us much because this is not real isolation.

The isolation it does buy us is that gvt/ subdirectory is developed and
maintained on a separate mailing list and separate git repo. I think at
some point there were plans to make it an actual module too.

So while you could quip about Conway's law here, I think it might be
better to keep this as it is.

Zhenyu, Zhi, what do you think?


BR,
Jani.


>
> Having a single Makefile at the top of the module is clearer, and
> it is what this driver almost does.
>
> Move all gvt objects to the i915 main Makefile.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>  drivers/gpu/drm/i915/Makefile     | 28 ++++++++++++++++++++++++----
>  drivers/gpu/drm/i915/gvt/Makefile |  8 --------
>  2 files changed, 24 insertions(+), 12 deletions(-)
>  delete mode 100644 drivers/gpu/drm/i915/gvt/Makefile
>
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 6cd1f6253814..74e965882a98 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -275,10 +275,30 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
>  # virtual gpu code
>  i915-y += i915_vgpu.o
>  
> -ifeq ($(CONFIG_DRM_I915_GVT),y)
> -i915-y += intel_gvt.o
> -include $(src)/gvt/Makefile
> -endif
> +i915-$(CONFIG_DRM_I915_GVT) += \
> +	intel_gvt.o \
> +	gvt/gvt.o \
> +	gvt/aperture_gm.o \
> +	gvt/handlers.o \
> +	gvt/vgpu.o \
> +	gvt/trace_points.o \
> +	gvt/firmware.o \
> +	gvt/interrupt.o \
> +	gvt/gtt.o \
> +	gvt/cfg_space.o \
> +	gvt/opregion.o \
> +	gvt/mmio.o \
> +	gvt/display.o \
> +	gvt/edid.o \
> +	gvt/execlist.o \
> +	gvt/scheduler.o \
> +	gvt/sched_policy.o \
> +	gvt/mmio_context.o \
> +	gvt/cmd_parser.o \
> +	gvt/debugfs.o \
> +	gvt/fb_decoder.o \
> +	gvt/dmabuf.o \
> +	gvt/page_track.o
>  
>  obj-$(CONFIG_DRM_I915) += i915.o
>  obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
> diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
> deleted file mode 100644
> index 4d70f4689479..000000000000
> --- a/drivers/gpu/drm/i915/gvt/Makefile
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0
> -GVT_DIR := gvt
> -GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
> -	interrupt.o gtt.o cfg_space.o opregion.o mmio.o display.o edid.o \
> -	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
> -	fb_decoder.o dmabuf.o page_track.o
> -
> -i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/i915: remove gvt/Makefile
  2020-04-09 21:58   ` Jani Nikula
@ 2020-04-10  5:41     ` Zhenyu Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Zhenyu Wang @ 2020-04-10  5:41 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Masahiro Yamada, Joonas Lahtinen, Rodrigo Vivi, intel-gfx,
	Daniel Vetter, David Airlie, Zhenyu Wang, Zhi Wang, dri-devel,
	intel-gvt-dev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3184 bytes --]

On 2020.04.10 00:58:16 +0300, Jani Nikula wrote:
> On Fri, 10 Apr 2020, Masahiro Yamada <masahiroy@kernel.org> wrote:
> > Including subdirectory Makefile from the driver main Makefile does not
> > buy us much because this is not real isolation.
> 
> The isolation it does buy us is that gvt/ subdirectory is developed and
> maintained on a separate mailing list and separate git repo. I think at
> some point there were plans to make it an actual module too.
> 
> So while you could quip about Conway's law here, I think it might be
> better to keep this as it is.
> 
> Zhenyu, Zhi, what do you think?

Yeah, I have the same feeling, maybe we can add some comment in gvt Makefile
to state that point.

Thanks

> >
> > Having a single Makefile at the top of the module is clearer, and
> > it is what this driver almost does.
> >
> > Move all gvt objects to the i915 main Makefile.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  drivers/gpu/drm/i915/Makefile     | 28 ++++++++++++++++++++++++----
> >  drivers/gpu/drm/i915/gvt/Makefile |  8 --------
> >  2 files changed, 24 insertions(+), 12 deletions(-)
> >  delete mode 100644 drivers/gpu/drm/i915/gvt/Makefile
> >
> > diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> > index 6cd1f6253814..74e965882a98 100644
> > --- a/drivers/gpu/drm/i915/Makefile
> > +++ b/drivers/gpu/drm/i915/Makefile
> > @@ -275,10 +275,30 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
> >  # virtual gpu code
> >  i915-y += i915_vgpu.o
> >  
> > -ifeq ($(CONFIG_DRM_I915_GVT),y)
> > -i915-y += intel_gvt.o
> > -include $(src)/gvt/Makefile
> > -endif
> > +i915-$(CONFIG_DRM_I915_GVT) += \
> > +	intel_gvt.o \
> > +	gvt/gvt.o \
> > +	gvt/aperture_gm.o \
> > +	gvt/handlers.o \
> > +	gvt/vgpu.o \
> > +	gvt/trace_points.o \
> > +	gvt/firmware.o \
> > +	gvt/interrupt.o \
> > +	gvt/gtt.o \
> > +	gvt/cfg_space.o \
> > +	gvt/opregion.o \
> > +	gvt/mmio.o \
> > +	gvt/display.o \
> > +	gvt/edid.o \
> > +	gvt/execlist.o \
> > +	gvt/scheduler.o \
> > +	gvt/sched_policy.o \
> > +	gvt/mmio_context.o \
> > +	gvt/cmd_parser.o \
> > +	gvt/debugfs.o \
> > +	gvt/fb_decoder.o \
> > +	gvt/dmabuf.o \
> > +	gvt/page_track.o
> >  
> >  obj-$(CONFIG_DRM_I915) += i915.o
> >  obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
> > diff --git a/drivers/gpu/drm/i915/gvt/Makefile b/drivers/gpu/drm/i915/gvt/Makefile
> > deleted file mode 100644
> > index 4d70f4689479..000000000000
> > --- a/drivers/gpu/drm/i915/gvt/Makefile
> > +++ /dev/null
> > @@ -1,8 +0,0 @@
> > -# SPDX-License-Identifier: GPL-2.0
> > -GVT_DIR := gvt
> > -GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \
> > -	interrupt.o gtt.o cfg_space.o opregion.o mmio.o display.o edid.o \
> > -	execlist.o scheduler.o sched_policy.o mmio_context.o cmd_parser.o debugfs.o \
> > -	fb_decoder.o dmabuf.o page_track.o
> > -
> > -i915-y					+= $(addprefix $(GVT_DIR)/, $(GVT_SOURCE))
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-10  5:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 15:06 [PATCH 1/2] drm/i915: remove unneeded ccflags-y from gvt/Makefile Masahiro Yamada
2020-04-09 15:06 ` [PATCH 2/2] drm/i915: remove gvt/Makefile Masahiro Yamada
2020-04-09 21:58   ` Jani Nikula
2020-04-10  5:41     ` Zhenyu Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).