Sorry for the empty message. I would like to add Joerg Roedel and
IOMMU related maillist in case they can help on this issue.

пн, 23 нояб. 2020 г. в 16:32, Matwey V. Kornilov <korni...@physics.msu.ru>:
>
> пн, 23 нояб. 2020 г. в 14:19, Thimo Emmerich <thimo.emmer...@sony.com>:
> >
> > Hi,
> >
> > thanks for your prompt answer. Unfortunately I was out of office on Friday.
> >
> > Here the updates:
> >   - Tracing showed the lines you mentioned.
> >   - Updating the kernel to the latest stable (v5.9.10) did not change
> > anything.
> >   - Adding "amd_iommu=off" fixes the issue (of course including
> > dysfunctional IOMMU)
> >
> > Best regards,
> >   Thimo
> >
> > On 20.11.20 08:55, Matwey V. Kornilov wrote:
> > > Hi,
> > >
> > > As far as I understand, the driver itself works correctly. It
> > > communicates with the device and receives the data. Only difference is
> > > that the data is zeroed. If so, it means that the memory is allocated
> > > without errors and the DMA is also mapped without errors. Otherwise,
> > > you would get an error when trying to open the device/start stream. To
> > > finally prove this, could you please use tracing points to see what is
> > > going on while the video stream is on?
> > >
> > > mount -ttracefs tracefs /sys/kernel/tracing
> > > cd /sys/kernel/tracing
> > > echo 1 > events/pwc/enable
> > > echo 1 > tracing_on
> > > cat trace
> > >
> > > And then you should see lots of lines like the following when video
> > > stream is running:
> > >
> > > -0 [002] ..s. 34645.185239: pwc_handler_enter: dev=Philips webcam
> > > 1-1.4:1.0 (fbuf=00000000303a809e filled=31581) urb=000000007e3783c4
> > > (status=0 actual_length=9570)
> > > -0 [002] ..s. 34645.185244: pwc_handler_exit: dev=Philips webcam
> > > 1-1.4:1.0 (fbuf=00000000303a809e filled=41151) urb=000000007e3783c4
> > >
> > > Use
> > >
> > > echo 0 > tracing_on
> > >
> > > to disable the recording.
> > >
> > >
> > > I've found a commit that claims to fix an issue with similar wording:
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_torvalds_linux_commit_27d2dcb1b95c8c39da417839c11eda2e665cd389&d=DwIFaQ&c=fP4tf--1dS0biCFlB0saz0I0kjO5v7-GLPtvShAo4cc&r=uorjfjHlvtqEyqWp5b8YlexJq-ujpFniwt87GU9IrXI&m=ZPgwadRZcYtXJwzoIM6ibrGC8jNcJkKloZFNKDK6PBE&s=pC6Xy7iT5Yf6nx7dSNiDOCvvCs7HENylTiquLeJ_0Og&e=
> > >
> > > Could you please try to boot with "amd_iommu=off" kernel command line
> > > parameter and see what happens?
> > > Is it also possible for you to check the latest kernel version on your 
> > > setup?
> > >
> > >
> > > чт, 19 нояб. 2020 г. в 18:49, Thimo Emmerich <thimo.emmer...@sony.com>:
> > >
> > >
> > >> Hi,
> > >>
> > >> not sure about the application behaviour.
> > >> I observed this green screen in MS Teams. For easy verification I used
> > >> "cheese" which shows a live stream. Same behaviour.
> > >> The issue is 100% reproducible: loading the stock Ubuntu (HWE) kernel
> > >> module --> green screen, unloading and loading patched module --> 
> > >> picture.
> > >> For this procedure it is even not necessary to disconnect the cam itself.
> > >>
> > >> I did now also another test excluding possible application magic:
> > >> dd if=/dev/video0 of=/tmp/vid.raw bs=460800 count=20
> > >> If I interpret this data as a video (640x720), with the patched module,
> > >> I see a running sequence whereas with the stock module there are just
> > >> zeros. Of course, the zeros interpreted as YCbCr stream lead to a still
> > >> green image.
> > >>
> > >> I am using the stock Ubuntu HWE kernel (linux-image-5.4.0-53-generic),
> > >> config is attached.
> > >> I have to admit that I did not use the Ubuntu-patched kernel sources but
> > >> the v5.4 tagged sources from git.kernel.org since I guess there are no
> > >> patches in this special section. I also verified building the vanilla
> > >> module has the same behaviour as the Ubuntu kernel module (green screen).
> > >>
> > >> I am not using the virtualization feature (currently). Nevertheless, the
> > >> IOMMU is enabled (by default) in the BIOS.
> > >> Unfortunately, I do not have another webcam at hand (the other ones are
> > >> notebook build-ins).
> > >> I checked now with another PC (ancient Intel Xeon system) - the stock
> > >> driver works without trouble.
> > >>
> > >> Do you use/have access to a Ryzen CPU? Maybe there is some
> > >> issue/specialty with its IOMMU?
> > >>
> > >> Best regards,
> > >>    Thimo Emmerich
> > >>
> > >> On 19.11.20 14:26, Matwey V. Kornilov wrote:
> > >>> Hi,
> > >>>
> > >>> I've just checked my PWC900 camera at kernel 5.9.8 and unfortunately
> > >>> It works perfectly, so there issue is probably deeper.
> > >>>
> > >>> You say that you see the green image. Could you ensure that the green
> > >>> image is what you actually get from the kernel driver, but not an
> > >>> application behaviour when there are no frames.
> > >>> Could you also provide your kernel build config? I see that you are
> > >>> running some kind of hardware assisted virtualization, right? May I
> > >>> also ask you to look for some other USB webcam (other model) around
> > >>> you and check if it works at the same configuration?
> > >>>
> > >>>
> > >>> чт, 19 нояб. 2020 г. в 14:59, Thimo Emmerich<thimo.emmer...@sony.com>:
> > >>>
> > >>>> Hi Matwey,
> > >>>>
> > >>>> I am using a Philips SPC 900NC USB webcam on my Ubuntu 18.04 system.
> > >>>> Recently I upgraded from the stock kernel (4.15) to the latest HWE
> > >>>> kernel (5.4).
> > >>>>
> > >>>> Unfortunately my camera was not working anymore. Instead a green image
> > >>>> was shown and a lot of kernel messages were showing up (see below).
> > >>>>
> > >>>> If I revert the single commit 1161db6776bd1c35257e1e362e91bcb1b3fe4347
> > >>>> from the pwc source, the camera is back.
> > >>>>
> > >>>> Since I guess you had a good reason to integrate this change, do you
> > >>>> have any idea, how this issue could be solved?
> > >>>>
> > >>>> Best Regards,
> > >>>>     Thimo Emmerich
> > >>>>
> > >>>> dmesg events:
> > >>>> [Do Nov 19 10:12:50 2020] pwc: Philips SPC 900NC USB webcam detected.
> > >>>> [Do Nov 19 10:12:50 2020] pwc: Registered as video0.
> > >>>> [Do Nov 19 10:12:50 2020] input: PWC snapshot button as
> > >>>> /devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:08.0/0000:06:00.1/usb1/1-6/1-6.4/input/input30
> > >>>> [Do Nov 19 10:12:50 2020] usbcore: registered new interface driver
> > >>>> Philips webcam
> > >>>> [Do Nov 19 10:13:05 2020] amd_iommu_report_page_fault: 20055 callbacks
> > >>>> suppressed
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5835e00 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5835eb0 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5835f68 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5836000 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5836024 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a58360e0 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5836198 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a58361c0 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5836270 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] xhci_hcd 0000:06:00.1: AMD-Vi: Event logged
> > >>>> [IO_PAGE_FAULT domain=0x0011 address=0x5a5836328 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] amd_iommu_report_page_fault: 20045 callbacks
> > >>>> suppressed
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a58363e4 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a58364a0 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a583655c flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a5838000 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a58380b0 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a583816c flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a5838228 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a58382e0 flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a583839c flags=0x0020]
> > >>>> [Do Nov 19 10:13:05 2020] AMD-Vi: Event logged [IO_PAGE_FAULT
> > >>>> device=06:00.1 domain=0x0011 address=0x5a58383c0 flags=0x0020]
> > >>>>
> > >>>>
> > >>>> --
> > >>>> Mit freundlichen Grüßen / with kind regards
> > >>>>
> > >>>>      Thimo Emmerich
> > >>>>
> > >>>> -------------------------------------------
> > >>>>
> > >>>> R&D Center Europe Stuttgart Laboratory 01
> > >>>>
> > >>>> Phone:    +49 (0) 711 / 5858 - 282
> > >>>> E-mail:thimo.emmer...@eu.sony.com
> > >>>>
> > >>>> Sony Europe B.V., Zweigniederlassung Deutschland
> > >>>> Stuttgart Technology Center
> > >>>> Hedelfinger Str. 61, 70327 Stuttgart, Germany
> > >>>>
> > >>>> Registered at the Court of Berlin-Charlottenburg HRB 129332 B
> > >>>>
> > >>>> Main Establishment: Sony Europe B.V.
> > >>>> Registered Office: The Heights, Brooklands, Weybridge, Surrey, KT13 
> > >>>> 0XW, UK
> > >>>> Incorporated in the Netherlands No. 71682147
> > >>>> Directors: Hideyuki Furumi, Masaki Kurebayashi, Ricky Londema
> > >>>>
> > >> --
> > >> Mit freundlichen Grüßen / with kind regards
> > >>
> > >>     Thimo Emmerich
> > >>
> > >> -------------------------------------------
> > >>
> > >> R&D Center Europe Stuttgart Laboratory 01
> > >>
> > >> Phone:    +49 (0) 711 / 5858 - 282
> > >> E-mail:thimo.emmer...@eu.sony.com
> > >>
> > >> Sony Europe B.V., Zweigniederlassung Deutschland
> > >> Stuttgart Technology Center
> > >> Hedelfinger Str. 61, 70327 Stuttgart, Germany
> > >>
> > >> Registered at the Court of Berlin-Charlottenburg HRB 129332 B
> > >>
> > >> Main Establishment: Sony Europe B.V.
> > >> Registered Office: The Heights, Brooklands, Weybridge, Surrey, KT13 0XW, 
> > >> UK
> > >> Incorporated in the Netherlands No. 71682147
> > >> Directors: Hideyuki Furumi, Masaki Kurebayashi, Ricky Londema
> > >>
> >
> > --
> > Mit freundlichen Grüßen / with kind regards
> >
> >    Thimo Emmerich
> >
> > -------------------------------------------
> >
> > R&D Center Europe Stuttgart Laboratory 01
> >
> > Phone:    +49 (0) 711 / 5858 - 282
> > E-mail:   thimo.emmer...@eu.sony.com
> >
> > Sony Europe B.V., Zweigniederlassung Deutschland
> > Stuttgart Technology Center
> > Hedelfinger Str. 61, 70327 Stuttgart, Germany
> >
> > Registered at the Court of Berlin-Charlottenburg HRB 129332 B
> >
> > Main Establishment: Sony Europe B.V.
> > Registered Office: The Heights, Brooklands, Weybridge, Surrey, KT13 0XW, UK
> > Incorporated in the Netherlands No. 71682147
> > Directors: Hideyuki Furumi, Masaki Kurebayashi, Ricky Londema
> >
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to