Re: [Intel-gfx] [PATCH v3 1/2] drm/i915: remove confusing GPIO vs PCH_GPIO
On 2018.07.19 17:20:15 +, De Marchi, Lucas wrote: > CC'ing gvt maintainers (and fixing Jani's address in CC). > > See below > > On Wed, 2018-07-18 at 13:01 +0300, Ville Syrjälä wrote: > > On Tue, Jul 17, 2018 at 03:16:53PM -0700, Lucas De Marchi wrote: > > > On Fri, Jul 13, 2018 at 9:10 AM Ville Syrjälä > > > wrote: > > > > > > > > On Fri, Jul 13, 2018 at 08:42:11AM -0700, Lucas De Marchi wrote: > > > > > Instead of defining all registers twice, define just a PCH_GPIO_BASE > > > > > that has the same address as PCH_GPIO_A and use that to calculate all > > > > > the others. This also brings VLV and !HAS_GMCH_DISPLAY in line, doing > > > > > the same thing. > > > > > > > > > > v2: Fix GMBUS registers to be relative to gpio base; create GPIO() > > > > > macro to return a particular gpio address and move the enum out of > > > > > i915_reg.h (suggested by Jani) > > > > > > > > > > v3: Move base offset inside the GPIO() macro so the GMBUS defines > > > > > don't > > > > > actually need to be changed (suggested by Daniel/Ville) > > > > > > > > > > Signed-off-by: Lucas De Marchi > > > > > --- > > > > > drivers/gpu/drm/i915/gvt/handlers.c | 2 +- > > > > > drivers/gpu/drm/i915/i915_drv.h | 3 ++- > > > > > drivers/gpu/drm/i915/i915_reg.h | 24 +--- > > > > > drivers/gpu/drm/i915/intel_drv.h| 16 > > > > > drivers/gpu/drm/i915/intel_i2c.c| 12 > > > > > 5 files changed, 28 insertions(+), 29 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/gvt/handlers.c > > > > > b/drivers/gpu/drm/i915/gvt/handlers.c > > > > > index 7a58ca555197..ecff866bbbf1 100644 > > > > > --- a/drivers/gpu/drm/i915/gvt/handlers.c > > > > > +++ b/drivers/gpu/drm/i915/gvt/handlers.c > > > > > @@ -2118,7 +2118,7 @@ static int init_generic_mmio_info(struct > > > > > intel_gvt *gvt) > > > > > > > > > > MMIO_F(PCH_GMBUS0, 4 * 4, 0, 0, 0, D_ALL, gmbus_mmio_read, > > > > > gmbus_mmio_write); > > > > > - MMIO_F(PCH_GPIOA, 6 * 4, F_UNALIGN, 0, 0, D_ALL, NULL, NULL); > > > > > + MMIO_F(GPIO(GPIOA), 6 * 4, F_UNALIGN, 0, 0, D_ALL, NULL, NULL); > > > > > > > > I have no idea of gpio_mmio_base is populated correctly at this point > > > > for gvt, and I'm too lazy to find out. > > > > > > humn, unfortunately it is not > > > > > > i915_driver_load() -> i915_load_modeset_init() -> intel_setup_gmbus() > > > -> dev_priv->gpio_mmio_base = ... > > > i915_driver_load() -> i915_driver_init_hw() -> intel_gvt_init() -> > > > intel_gvt_init_device() -> intel_gvt_setup_mmio_info() -> > > > init_generic_mmio_info() > > > > > > Is adding a single PCH_GPIO_BASE that doesn't depend on dev_priv being > > > populated for use on gvt an option? > > > > IIRC gvt already has some local register defines (possibly due to this > > same reason?). Could add a few more I suppose. +cc the gvt folks to get > > their input. > > Summary to gvt maintainers: I want to get rid of the multiple GPIO vs PCH_GPIO > defines we have today. For that I created the GPIO() macro, but it depends on > dev_priv being populated with the gpio's block offset already which is not > true while initializing gvt. > This also applys to GMBUS change, right? > I can define a PCH_GPIO_BASE as above in i915_reg.h that is the same as > PCH_GPIOA today. Or define it in a private gvt header. Do you have another > option/suggestion? > yeah, adding a base define for gvt private seems good to me, as gvt handles MMIO trap so may need to use them in different way. thanks -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 signature.asc Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] linux-next: build failure after merge of the drm-intel tree
Hi all, On Fri, 13 Jul 2018 11:54:19 +1000 Stephen Rothwell wrote: > > [Dave cc'd because this will probably turn up in the drm tree soon.] And now it has ... > After merging the drm-intel tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/gpu/drm/i915/gvt/kvmgt.c: In function 'gvt_dma_map_page': > drivers/gpu/drm/i915/gvt/kvmgt.c:188:17: error: 'pfn' undeclared (first use > in this function); did you mean 'gfn'? > if (!pfn_valid(pfn)) { > ^~~ > > Caused by commit > > 79e542f5af79 ("drm/i915/kvmgt: Support setting dma map for huge pages") > > interacting with commit > > 39b4cbadb9a9 ("drm/i915/kvmgt: Check the pfn got from vfio_pin_pages") > > from Linus' tree (v4.18-rc1). > > I added the following merge fix patch: > > From: Stephen Rothwell > Date: Fri, 13 Jul 2018 11:48:41 +1000 > Subject: [PATCH] drm/i915/kvmgt: merge fixup for "Check the pfn got from > vfio_pin_pages" > > Signed-off-by: Stephen Rothwell > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c > b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 718ab307a500..4d2f53ae9f0f 100644 > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c > @@ -185,12 +185,6 @@ static int gvt_dma_map_page(struct intel_vgpu *vgpu, > unsigned long gfn, > if (ret) > return ret; > > - if (!pfn_valid(pfn)) { > - gvt_vgpu_err("pfn 0x%lx is not mem backed\n", pfn); > - vfio_unpin_pages(mdev_dev(vgpu->vdev.mdev), &gfn, 1); > - return -EINVAL; > - } > - > /* Setup DMA mapping. */ > *dma_addr = dma_map_page(dev, page, 0, size, PCI_DMA_BIDIRECTIONAL); > ret = dma_mapping_error(dev, *dma_addr); -- Cheers, Stephen Rothwell pgpYOXVmvcrvX.pgp Description: OpenPGP digital signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for ALSA: hda/i915: Allow delayed i915 audio component binding
== Series Details == Series: ALSA: hda/i915: Allow delayed i915 audio component binding URL : https://patchwork.freedesktop.org/series/47024/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4523_full -> Patchwork_9744_full = == Summary - WARNING == Minor unknown changes coming with Patchwork_9744_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_9744_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9744_full: === IGT changes === Warnings igt@gem_exec_schedule@deep-bsd2: shard-kbl: SKIP -> PASS +1 == Known issues == Here are the changes found in Patchwork_9744_full that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_hangcheck: shard-kbl: PASS -> DMESG-FAIL (fdo#106947, fdo#106560) igt@kms_cursor_legacy@cursor-vs-flip-toggle: shard-hsw: PASS -> FAIL (fdo#103355) igt@kms_frontbuffer_tracking@fbc-1p-rte: shard-hsw: PASS -> DMESG-FAIL (fdo#103167) Possible fixes igt@kms_flip@2x-plain-flip-fb-recreate: shard-glk: FAIL (fdo#100368) -> PASS igt@kms_setmode@basic: shard-apl: FAIL (fdo#99912) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167 fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355 fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560 fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947 fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912 == Participating hosts (5 -> 5) == No changes in participating hosts == Build changes == * Linux: CI_DRM_4523 -> Patchwork_9744 CI_DRM_4523: c49f62682d40bd553d906245815a73976cfb604a @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4571: 65fccc149b85968cdce4737266b056059c1510f3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9744: 62b9844fab4a8f34d78568ef435c9620f2ebe479 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9744/shards.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for ALSA: hda/i915: Allow delayed i915 audio component binding
== Series Details == Series: ALSA: hda/i915: Allow delayed i915 audio component binding URL : https://patchwork.freedesktop.org/series/47024/ State : success == Summary == = CI Bug Log - changes from CI_DRM_4523 -> Patchwork_9744 = == Summary - SUCCESS == No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/47024/revisions/1/mbox/ == Possible new issues == Here are the unknown changes that may have been introduced in Patchwork_9744: === IGT changes === Possible regressions {igt@kms_psr@primary_page_flip}: fi-whl-u: PASS -> FAIL == Known issues == Here are the changes found in Patchwork_9744 that come from known issues: === IGT changes === Issues hit igt@drv_selftest@live_hangcheck: fi-skl-6600u: PASS -> DMESG-FAIL (fdo#106560, fdo#107174) igt@drv_selftest@live_workarounds: {fi-cfl-8109u}: PASS -> DMESG-FAIL (fdo#107292) igt@gem_ctx_create@basic-files: fi-glk-j4005: PASS -> DMESG-WARN (fdo#105719) igt@gem_exec_suspend@basic-s4-devices: fi-kbl-7500u: PASS -> DMESG-WARN (fdo#107139, fdo#105128) igt@kms_chamelium@dp-edid-read: fi-kbl-7500u: PASS -> FAIL (fdo#103841) igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic: fi-glk-j4005: PASS -> FAIL (fdo#106765) igt@kms_flip@basic-flip-vs-dpms: fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) Possible fixes igt@drv_module_reload@basic-reload-inject: fi-glk-j4005: DMESG-WARN (fdo#106725, fdo#106248) -> PASS igt@drv_selftest@live_hangcheck: fi-skl-guc: DMESG-FAIL (fdo#107174) -> PASS igt@gem_exec_reloc@basic-cpu-active: fi-glk-j4005: DMESG-WARN (fdo#105719) -> PASS igt@kms_flip@basic-flip-vs-modeset: fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: fi-skl-6700k2: FAIL (fdo#103191) -> PASS igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c: fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191 fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841 fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927 fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128 fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719 fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000 fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248 fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560 fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725 fdo#106765 https://bugs.freedesktop.org/show_bug.cgi?id=106765 fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139 fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174 fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292 == Participating hosts (44 -> 40) == Additional (1): fi-byt-j1900 Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u == Build changes == * Linux: CI_DRM_4523 -> Patchwork_9744 CI_DRM_4523: c49f62682d40bd553d906245815a73976cfb604a @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4571: 65fccc149b85968cdce4737266b056059c1510f3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_9744: 62b9844fab4a8f34d78568ef435c9620f2ebe479 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 62b9844fab4a ALSA: hda/i915: Allow delayed i915 audio component binding == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9744/issues.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] ALSA: hda/i915: Allow delayed i915 audio component binding
Currently HD-audio i915 audio binding doesn't support any delayed binding, and supposes that the i915 driver registers the component immediately. This has been OK, so far, but the work-in-progress change in i915 may introduce the asynchronous binding, which effectively delays the component registration. For addressing it, implement a completion to be synced with the master binding. The timeout is set to 10 seconds which should be long enough and hopefully be not too annoying if anyone boots up a debugging session with i915 KMS turned off. Signed-off-by: Takashi Iwai --- This is applied on top of the current for-next or topic/drm_audio_component branch of sound git tree. sound/hda/hdac_i915.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 8f2aa8bc1185..b5282cbbe489 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -20,6 +20,8 @@ #include #include +static struct completion bind_complete; + #define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \ ((pci)->device == 0x0c0c) || \ ((pci)->device == 0x0d0c) || \ @@ -97,6 +99,19 @@ static bool i915_gfx_present(void) return pci_dev_present(ids); } +static int i915_master_bind(struct device *dev, + struct drm_audio_component *acomp) +{ + complete_all(&bind_complete); + /* clear audio_ops here as it was needed only for completion call */ + acomp->audio_ops = NULL; + return 0; +} + +static const struct drm_audio_component_audio_ops i915_init_ops = { + .master_bind = i915_master_bind +}; + /** * snd_hdac_i915_init - Initialize i915 audio component * @bus: HDA core bus @@ -117,7 +132,9 @@ int snd_hdac_i915_init(struct hdac_bus *bus) if (!i915_gfx_present()) return -ENODEV; - err = snd_hdac_acomp_init(bus, NULL, + init_completion(&bind_complete); + + err = snd_hdac_acomp_init(bus, &i915_init_ops, i915_component_master_match, sizeof(struct i915_audio_component) - sizeof(*acomp)); if (err < 0) @@ -125,8 +142,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus) acomp = bus->audio_component; if (!acomp) return -ENODEV; - if (!acomp->ops) + if (!acomp->ops) { request_module("i915"); + /* 10s timeout */ + wait_for_completion_timeout(&bind_complete, 10 * 1000); + } if (!acomp->ops) { snd_hdac_acomp_exit(bus); return -ENODEV; -- 2.18.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx