drm/i915/gvt: Add gvt_debug in i915_params for GVT-g log classification
PATCH v4 1/3 drm/i915/gvt: Add gvt_debug in i915_params for GVT-g log classification
--- drivers/gpu/drm/i915/i915_params.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_params.h | 1 + 2 files changed, 14 insertions(+)
drivers/gpu/drm/i915/i915_params.c +13 -0
@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0, };module_param_named (modeset, i915.modeset, int,0400 );
@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 ); +MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +"\t\tBit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +"\t\tBit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +"\t\tBit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +"\t\tBit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" +"\t\tBit 4 (0x10) will enable DPY messages (GVT-g display message)\n" +"\t\tBit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +"\t\tBit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +"\t\tBit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" +"\t\tBit 8 (0x100) will enable CMD messages (GVT-g command message)" );
drivers/gpu/drm/i915/i915_params.h +1 -0
@@ -54,6 +54,7 @@func (int, edp_vswing); \func (int, reset); \ func(unsigned int, inject_load_failure); \ +func (int, debug_gvt); \/* leave bools at the end to not create holes */ \func (bool, alpha_support); \func (bool, enable_cmd_parser); \
Signature · 6 lines
1.9.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 2/3 drm/i915/gvt: Change log function of kvmgt to common ones
This can remove the dependence of i915 module if we change gvt_dbg_* to function in i915 module.
--- drivers/gpu/drm/i915/gvt/kvmgt.c | 55 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/gvt/kvmgt.c +36 -19
@@ -89,6 +89,20 @@ static inline bool handle_valid(unsigned long handle)static void intel_vgpu_release_work (struct work_struct *work);static bool kvmgt_guest_exit (struct kvmgt_guest_info *info); +static void gvt_kvmgt_dbg (const char *format, ...) +{ +struct va_format vaf; +va_list args; + +va_start (args, format); + vaf.fmt = format; + vaf.va = &args; + +pr_debug ("[gvt-mpt:%ps] %pV" ,__builtin_return_address (0 ), &vaf); + +va_end (args); +} +static int gvt_dma_map_iova (struct intel_vgpu *vgpu,kvm_pfn_t pfn,unsigned long *iova) {
@@ -443,7 +457,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) type =intel_gvt_find_vgpu_type (gvt,kobject_name (kobj));if (!type) { -gvt_vgpu_err ("failed to find type %s to create\n" , +pr_err ("failed to find type %s to create\n" ,kobject_name (kobj)); ret = -EINVAL ; goto out;
@@ -452,7 +466,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) vgpu = intel_gvt_ops->vgpu_create (gvt, type);if (IS_ERR_OR_NULL (vgpu)) { ret = vgpu ==NULL ? -EFAULT :PTR_ERR (vgpu); -gvt_vgpu_err ("failed to create intel vgpu: %d\n" , ret); +pr_err ("failed to create intel vgpu: %d\n" , ret); goto out; }
@@ -461,8 +475,7 @@ static int intel_vgpu_create(struct kobject *kobj, struct mdev_device *mdev) vgpu->vdev.mdev = mdev;mdev_set_drvdata (mdev, vgpu); -gvt_dbg_core ("intel_vgpu_create succeeded for mdev: %s\n" , -dev_name (mdev_dev (mdev))); +gvt_kvmgt_dbg ("succeeded for mdev: %s\n" ,dev_name (mdev_dev (mdev))); ret =0 ; out:
@@ -532,8 +545,8 @@ static int intel_vgpu_open(struct mdev_device *mdev) ret =vfio_register_notifier (mdev_dev (mdev),VFIO_IOMMU_NOTIFY , &events, &vgpu->vdev.iommu_notifier);if (ret !=0 ) { -gvt_vgpu_err ("vfio_register_notifier for iommu failed: %d\n" , - ret); +pr_err ("vgpu[%d]: vfio_register_notifier for iommu failed:%d\n" , + vgpu->id, ret); goto out; }
@@ -541,8 +554,8 @@ static int intel_vgpu_open(struct mdev_device *mdev) ret =vfio_register_notifier (mdev_dev (mdev),VFIO_GROUP_NOTIFY , &events, &vgpu->vdev.group_notifier);if (ret !=0 ) { -gvt_vgpu_err ("vfio_register_notifier for group failed: %d\n" , - ret); +pr_err ("vgpu[%d]: vfio_register_notifier for group failed:%d\n" , + vgpu->id, ret); goto undo_iommu; }
@@ -647,7 +660,7 @@ static ssize_t intel_vgpu_rw(struct mdev_device *mdev, char *buf,if (index >=VFIO_PCI_NUM_REGIONS ) { -gvt_vgpu_err ("invalid index: %u\n" , index); +pr_err ("vgpu[%d]: invalid index: %u\n" , vgpu->id, index);return -EINVAL ; }
@@ -681,7 +694,7 @@ static ssize_t intel_vgpu_rw(struct mdev_device *mdev, char *buf,case VFIO_PCI_VGA_REGION_INDEX :case VFIO_PCI_ROM_REGION_INDEX :default : -gvt_vgpu_err ("unsupported region: %u\n" , index); +pr_err ("vgpu[%d]: unsupported region: %u\n" , vgpu->id, index); }return ret ==0 ? count : ret;
@@ -873,7 +886,8 @@ static int intel_vgpu_set_msi_trigger(struct intel_vgpu *vgpu, trigger =eventfd_ctx_fdget (fd);if (IS_ERR (trigger)) { -gvt_vgpu_err ("eventfd_ctx_fdget failed\n" ); +pr_err ("vgpu[%d]: eventfd_ctx_fdget failed\n" , + vgpu->id);return PTR_ERR (trigger); } vgpu->vdev.msi_trigger = trigger;
@@ -929,7 +943,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,struct intel_vgpu *vgpu =mdev_get_drvdata (mdev);unsigned long minsz; -gvt_dbg_core ("vgpu%d ioctl, cmd: %d\n" , vgpu->id, cmd); +gvt_kvmgt_dbg ("vgpu%d ioctl, cmd: %d\n" , vgpu->id, cmd);if (cmd ==VFIO_DEVICE_GET_INFO ) {struct vfio_device_info info;
@@ -1016,12 +1030,12 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd, info.size =0 ; info.flags =0 ; -gvt_dbg_core ("get region info bar:%d\n" , info.index); +gvt_kvmgt_dbg ("get region info bar:%d\n" , info.index);break ;case VFIO_PCI_ROM_REGION_INDEX :case VFIO_PCI_VGA_REGION_INDEX : -gvt_dbg_core ("get region info index:%d\n" , info.index); +gvt_kvmgt_dbg ("get region info index:%d\n" , info.index);break ;default : {
@@ -1132,7 +1146,8 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd, ret =vfio_set_irqs_validate_and_prepare (&hdr, max,VFIO_PCI_NUM_IRQS , &data_size);if (ret) { -gvt_vgpu_err ("intel:vfio_set_irqs_validate_and_prepare failed\n" ); +pr_err ("vgpu[%d]:vfio_set_irqs_validate_and_prepare failed\n" , + vgpu->id);return -EINVAL ; }if (data_size) {
@@ -1371,7 +1386,8 @@ static int kvmgt_guest_init(struct mdev_device *mdev) kvm = vgpu->vdev.kvm;if (!kvm || kvm->mm != current->mm) { -gvt_vgpu_err ("KVM is required to use Intel vGPU\n" ); +pr_err ("vgpu[%d]: KVM is required to use Intel vGPU\n" , + vgpu->id);return -ESRCH ; }
@@ -1457,14 +1473,15 @@ static unsigned long kvmgt_gfn_to_pfn(unsigned long handle, unsigned long gfn) dev =mdev_dev (info->vgpu->vdev.mdev); rc =vfio_pin_pages (dev, &gfn,1 ,IOMMU_READ |IOMMU_WRITE , &pfn);if (rc !=1 ) { -gvt_vgpu_err ("vfio_pin_pages failed for gfn 0x%lx: %d\n" , - gfn, rc); +pr_err ("vgpu[%d]: vfio_pin_pages failed for gfn 0x%lx: %d\n" , + vgpu->id, gfn, rc);return INTEL_GVT_INVALID_ADDR ; }/* transfer to host iova for GFX to use DMA */ rc =gvt_dma_map_iova (info->vgpu, pfn, &iova);if (rc) { -gvt_vgpu_err ("gvt_dma_map_iova failed for gfn: 0x%lx\n" , gfn); +pr_err ("vgpu[%d]: gvt_dma_map_iova failed for gfn: 0x%lx\n" , + vgpu->id, gfn);vfio_unpin_pages (dev, &gfn,1 );return INTEL_GVT_INVALID_ADDR ; }
Signature · 6 lines
1.9.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v4 3/3 drm/i915/gvt: Use debug_gvt to classify GVT-g log messages
In reply to Shuo LiuAdd a silimar log mechanism as like drm. Classify GVT-g log messages as different categories by differnt log functions.
--- drivers/gpu/drm/i915/Kconfig | 8 +++++++ drivers/gpu/drm/i915/gvt/Makefile | 1 + drivers/gpu/drm/i915/gvt/debug.c | 24 +++++++++++++++++++++ drivers/gpu/drm/i915/gvt/debug.h | 44 +++++++++++++++++++++++++++++---------- 4 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 drivers/gpu/drm/i915/gvt/debug.c
drivers/gpu/drm/i915/Kconfig +8 -0
@@ -125,6 +125,14 @@ config DRM_I915_GVT_KVMGT Choose this option if you want to enable KVMGT support for Intel GVT-g. +config DRM_I915_GVT_DEBUG + bool "Enable debug support for Intel GVT-g" + depends on DRM_I915_GVT + default n + help + Choose this option if you want to enable debug support for + Intel GVT-g. + menu "drm/i915 Debugging" depends on DRM_I915 depends on EXPERT
drivers/gpu/drm/i915/gvt/Makefile +1 -0
@@ -5,4 +5,5 @@ GVT_SOURCE := gvt.o aperture_gm.o handlers.o vgpu.o trace_points.o firmware.o \ ccflags-y += -I$(src) -I$(src)/$(GVT_DIR) i915-y += $(addprefix $(GVT_DIR)/, $(GVT_SOURCE)) +i915-$(CONFIG_DRM_I915_GVT_DEBUG) += $(GVT_DIR)/debug.o obj-$(CONFIG_DRM_I915_GVT_KVMGT) += $(GVT_DIR)/kvmgt.o
drivers/gpu/drm/i915/gvt/debug.c new file +24 -0
@@ -0,0 +1,24 @@ +#include <linux/kernel.h> +#include <linux/string.h> +#include "i915_drv.h" +#include "debug.h" + +void gvt_printk (const char *level,unsigned int category, +const char *format, ...) +{ +struct va_format vaf; +va_list args; + +if (category !=GVT_MSG_NONE && !(i915.debug_gvt & category)) +return ; + +va_start (args, format); + vaf.fmt = format; + vaf.va = &args; + +printk ("%s[gvt:%ps]%s %pV" , + level,__builtin_return_address (0 ), +strcmp (level,KERN_ERR ) ==0 ?" *ERROR*" :"" , &vaf); + +va_end (args); +}
drivers/gpu/drm/i915/gvt/debug.h +33 -11
75 lines not on this page · raw message
Signature · 6 lines
1.9.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerThe title should begin with "drm/i915:" not "drm/i915/gvt:".
On Tue, 2017-09-19 at 15:54 +0800, Shuo Liu wrote:
Commit message is always needed.
Quoted 1 line
Signed-off-by Shuo Liu <[email protected]>
<SNIP>
drivers/gpu/drm/i915/i915_params.c struct i915_params i915 __read_mostly = { · line 68
Quoted 5 lines
drivers/gpu/drm/i915/i915_params.c +1
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0,
Let's try to keep the struct ordered.
Quoted 6 lines
drivers/gpu/drm/i915/i915_params.c +2
-0@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 );
drivers/gpu/drm/i915/i915_params.c struct i915_params i915 __read_mostly = { · line 272
Quoted 10 lines
drivers/gpu/drm/i915/i915_params.c +10
-0+MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +"\t\tBit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +"\t\tBit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +"\t\tBit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +"\t\tBit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" +"\t\tBit 4 (0x10) will enable DPY messages (GVT-g display message)\n" +"\t\tBit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +"\t\tBit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +"\t\tBit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" +"\t\tBit 8 (0x100) will enable CMD messages (GVT-g command message)" );
s/message/code/ for the description in braces, like the drm counterpart. Or change them to be just "GVT-g core", "GVT-g scheduling", "GVT-g commands" etc.
One tab indent is enough like mostly used in the file.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 1 line · Joonas Lahtinen
The title should begin with "drm/i915:" not "drm/i915/gvt:".
My fault. Will correct it.
Quoted 4 lines · Shuo Liu
Commit message is always needed.
OK, will add it.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Shuo Liu <[email protected]><SNIP>
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.c struct i915_params i915 __read_mostly = { · line 68
Quoted 5 lines
drivers/gpu/drm/i915/i915_params.c +1
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0,Let's try to keep the struct ordered.
What's the order? I see it's different with struct definition.
Quoted 13 lines
Quoted 13 lines
drivers/gpu/drm/i915/i915_params.c +8
-0@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 ); +MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +"\t\tBit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +"\t\tBit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +"\t\tBit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +"\t\tBit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" + "\t\tBit 4 (0x10) will enable DPY messages (GVT-g display message)\n"
Quoted 8 lines
drivers/gpu/drm/i915/i915_params.c struct i915_params i915 __read_mostly = { · line 272
Quoted 4 lines
drivers/gpu/drm/i915/i915_params.c +4
-0+"\t\tBit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +"\t\tBit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +"\t\tBit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" + "\t\tBit 8 (0x100) will enable CMD messages (GVT-g command message)");s/message/code/ for the description in braces, like the drm counterpart. Or change them to be just "GVT-g core", "GVT-g scheduling", "GVT-g commands" etc.
Will change to "code".
Quoted 2 lines
One tab indent is enough like mostly used in the file.
OK.
Thanks.
Shuo
Quoted 6 lines
Regards, Joonas
Signature · 3 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerQuoted 23 lines · Shuo Liu
Quoted 1 line · Joonas Lahtinen
The title should begin with "drm/i915:" not "drm/i915/gvt:".
My fault. Will correct it.
Quoted 4 lines · Shuo Liu
Commit message is always needed.
OK, will add it.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Shuo Liu <[email protected]><SNIP>
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.c struct i915_params i915 __read_mostly = { · line 68
Quoted 5 lines
drivers/gpu/drm/i915/i915_params.c +1
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0,Let's try to keep the struct ordered.
Quoted 1 line
What's the order? I see it's different with struct definition.
Yeah, it seems to be messed. Leave it as it is, I'll send a fix for all of them.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Shuo Liu (2017-09-19 08:54:43)
Quoted 39 lines
Signed-off-by Shuo Liu <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_params.h | 1 + 2 files changed, 14 insertions(+)drivers/gpu/drm/i915/i915_params.c +13
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0, };module_param_named (modeset, i915.modeset, int,0400 );@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 ); +MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +" Bit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +" Bit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +" Bit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +" Bit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" +" Bit 4 (0x10) will enable DPY messages (GVT-g display message)\n" +" Bit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +" Bit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +" Bit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" +" Bit 8 (0x100) will enable CMD messages (GVT-g command message)" );drivers/gpu/drm/i915/i915_params.h +0
-0
drivers/gpu/drm/i915/i915_params.h line 60
Quoted 7 lines
drivers/gpu/drm/i915/i915_params.h +1
-0@@ -54,6 +54,7 @@func (int, edp_vswing); \func (int, reset); \ func(unsigned int, inject_load_failure); \ +func (int, debug_gvt); \/* leave bools at the end to not create holes */ \func (bool, alpha_support); \func (bool, enable_cmd_parser); \
Note that you are not forced to use i915_params. If you have gvt only module options that you don't want exposed outside of gvt, just create them within gvt.
Having said that, I would strongly advise against having module options, and I would advise you to go the dyndebug route instead of copying a rectangular wheel.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Chris Wilson
Quoting Shuo Liu (2017-09-19 08:54:43)
Quoted 42 lines
Signed-off-by Shuo Liu <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_params.h | 1 + 2 files changed, 14 insertions(+)drivers/gpu/drm/i915/i915_params.c +13
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0, };module_param_named (modeset, i915.modeset, int,0400 );@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 ); +MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +" Bit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +" Bit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +" Bit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +" Bit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" +" Bit 4 (0x10) will enable DPY messages (GVT-g display message)\n" +" Bit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +" Bit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +" Bit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" +" Bit 8 (0x100) will enable CMD messages (GVT-g command message)" );drivers/gpu/drm/i915/i915_params.h +0
-0@@ -54,6 +54,7 @@func (int, edp_vswing); \func (int, reset); \ func(unsigned int, inject_load_failure); \
Quoted 8 lines
drivers/gpu/drm/i915/i915_params.h line 60
Quoted 4 lines
drivers/gpu/drm/i915/i915_params.h +1
-0+func (int, debug_gvt); \/* leave bools at the end to not create holes */ \func (bool, alpha_support); \func (bool, enable_cmd_parser); \Note that you are not forced to use
i915_params. If you have gvt only module options that you don't want exposed outside of gvt, just create them within gvt.
Have talked this with Zhenyu, his suggestion is put params together as gvt is in i915 module.
Quoted 4 lines
Having said that, I would strongly advise against having module options, and I would advise you to go the dyndebug route instead of copying a rectangular wheel.
Thanks Chris. dyndebug might be an option. The disadvantage of dyndebug is complicated to use, expecially in bootup debugging (add a long cmdline to enable interesting messages). Module option is straightforward. Zhenyu, any comments on this?
Thanks
Shuo
Quoted 1 line
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 52 lines · Shuo Liu
Quoted 43 lines · Chris Wilson
Quoting Shuo Liu (2017-09-19 08:54:43)
Quoted 42 lines
Signed-off-by Shuo Liu <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_params.h | 1 + 2 files changed, 14 insertions(+)drivers/gpu/drm/i915/i915_params.c +13
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0, };module_param_named (modeset, i915.modeset, int,0400 );@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 ); +MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +" Bit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +" Bit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +" Bit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +" Bit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" +" Bit 4 (0x10) will enable DPY messages (GVT-g display message)\n" +" Bit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +" Bit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +" Bit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" +" Bit 8 (0x100) will enable CMD messages (GVT-g command message)" );drivers/gpu/drm/i915/i915_params.h +0
-0@@ -54,6 +54,7 @@func (int, edp_vswing); \func (int, reset); \ func(unsigned int, inject_load_failure); \Quoted 8 lines
drivers/gpu/drm/i915/i915_params.h line 60
Quoted 4 lines
drivers/gpu/drm/i915/i915_params.h +1
-0+func (int, debug_gvt); \/* leave bools at the end to not create holes */ \func (bool, alpha_support); \func (bool, enable_cmd_parser); \Note that you are not forced to use
i915_params. If you have gvt only module options that you don't want exposed outside of gvt, just create them within gvt.
Quoted 2 lines
Have talked this with Zhenyu, his suggestion is put params together as gvt is in i915 module.
As gvt is in i915 module now, so I think better to put all the params in one place instead of any surprise.
Quoted 9 lines
Quoted 4 lines
Having said that, I would strongly advise against having module options, and I would advise you to go the dyndebug route instead of copying a rectangular wheel.
Thanks Chris. dyndebug might be an option. The disadvantage of dyndebug is complicated to use, expecially in bootup debugging (add a long cmdline to enable interesting messages). Module option is straightforward. Zhenyu, any comments on this?
yeah, I think moving to dyndebug is better than module option and boot debug shouldn't be that hard right? as we're mostly with file seperation for different function unit.
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 69 lines · Zhenyu Wang
Quoted 52 lines · Shuo Liu
Quoted 43 lines · Chris Wilson
Quoting Shuo Liu (2017-09-19 08:54:43)
Quoted 42 lines
Signed-off-by Shuo Liu <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_params.h | 1 + 2 files changed, 14 insertions(+)drivers/gpu/drm/i915/i915_params.c +13
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = false, .enable_gvt = false, + .debug_gvt = 0, };module_param_named (modeset, i915.modeset, int,0400 );@@ -257,3 +258,15 @@ struct i915_params i915 __read_mostly = {module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (debug_gvt, i915.debug_gvt, int,0600 ); +MODULE_PARM_DESC (debug_gvt,"Enable GVT-g debug output, where each bit enables a category.\n" +" Bit 0 (0x01) will enable CORE messages (GVT-g core message)\n" +" Bit 1 (0x02) will enable IRQ messages (GVT-g interrupt message)\n" +" Bit 2 (0x04) will enable MM messages (GVT-g memory management message)\n" +" Bit 3 (0x08) will enable MMIO messages (GVT-g MMIO message)\n" +" Bit 4 (0x10) will enable DPY messages (GVT-g display message)\n" +" Bit 5 (0x20) will enable EL messages (GVT-g execlist message)\n" +" Bit 6 (0x40) will enable SCHED messages (GVT-g schedule message)\n" +" Bit 7 (0x80) will enable RENDER messages (GVT-g render message)\n" +" Bit 8 (0x100) will enable CMD messages (GVT-g command message)" );drivers/gpu/drm/i915/i915_params.h +0
-0@@ -54,6 +54,7 @@func (int, edp_vswing); \func (int, reset); \ func(unsigned int, inject_load_failure); \Quoted 8 lines
drivers/gpu/drm/i915/i915_params.h line 60
Quoted 4 lines
drivers/gpu/drm/i915/i915_params.h +1
-0+func (int, debug_gvt); \/* leave bools at the end to not create holes */ \func (bool, alpha_support); \func (bool, enable_cmd_parser); \Note that you are not forced to use
i915_params. If you have gvt only module options that you don't want exposed outside of gvt, just create them within gvt.Quoted 2 lines
Have talked this with Zhenyu, his suggestion is put params together as gvt is in i915 module.
As gvt is in i915 module now, so I think better to put all the params in one place instead of any surprise.
Quoted 9 lines
Quoted 4 lines
Having said that, I would strongly advise against having module options, and I would advise you to go the dyndebug route instead of copying a rectangular wheel.
Thanks Chris. dyndebug might be an option. The disadvantage of dyndebug is complicated to use, expecially in bootup debugging (add a long cmdline to enable interesting messages). Module option is straightforward. Zhenyu, any comments on this?
Quoted 4 lines
yeah, I think moving to dyndebug is better than module option and boot debug shouldn't be that hard right? as we're mostly with file seperation for different function unit.
OK. I will try to move to dyndebug approach.
Thanks
Shuo
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [v4,1/3] drm/i915/gvt: Add gvt_debug in i915_params for GVT-g log classification
In reply to Shuo Liu== Series Details ==
== Series Details ==
Series: series starting with [v4,1/3] drm/i915/gvt: Add gvt_debug in i915_params for GVT-g log classification
URL : https://patchwork.freedesktop.org/series/30574/
State : failure
== Summary ==
Series 30574v1 series starting with [v4,1/3] drm/i915/gvt: Add gvt_debug in i915_params for GVT-g log classification
https://patchwork.freedesktop.org/api/1.0/series/30574/revisions/1/mbox/
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
Test kms_addfb_basic:
Subgroup small-bo:
pass -> DMESG-WARN (fi-kbl-7500u)
Subgroup unused-pitches:
pass -> DMESG-WARN (fi-kbl-7500u)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
pass -> FAIL (fi-snb-2600) fdo#100215
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> INCOMPLETE (fi-kbl-7500u)fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:436s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:476s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:421s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:520s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:279s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:500s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:491s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:489s fi-cfl-s total:289 pass:222 dwarn:35 dfail:0 fail:0 skip:32 time:539s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:419s fi-glk-1 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:563s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:404s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:428s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:487s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:463s fi-kbl-7500u total:245 pass:220 dwarn:3 dfail:0 fail:1 skip:20 fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:580s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:585s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:545s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:449s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:748s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:493s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:469s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:566s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:420s
fi-hsw-4770 failed to connect after reboot
ab2e3a0685b0a5cfba35ddda1f9179c2e9bff3e0 drm-tip: 2017y-09m-19d-16h-17m-40s UTC integration manifest c3c73d8ad385 drm/i915/gvt: Use debug_gvt to classify GVT-g log messages56ead48f3560 drm/i915/gvt: Change log function of kvmgt to common onesaf7592e743ac drm/i915/gvt: Add gvt_debug in i915_params for GVT-g log classification
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5746/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx