From: Sean Young <sean@mess.org>
To: Martin Burnicki <martin.burnicki@burnicki.net>
Cc: Rolf Pedersen <rolfpedersen@mindspring.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Brad Love <brad@nextdimension.cc>
Subject: Re: HauppaugeTV-quadHD DVB-T mpeg risc op code error
Date: Sat, 25 Apr 2020 12:41:47 +0100 [thread overview]
Message-ID: <20200425114147.GA3037@gofer.mess.org> (raw)
In-Reply-To: <0cd2436c-0a39-0f85-929e-5d8f333b5027@burnicki.net>
Hi,
On Fri, Apr 24, 2020 at 07:46:26PM +0200, Martin Burnicki wrote:
> I came across this thread and want to let you know that I also have
> problems with the cx23885 driver on a Ryzen system.
>
> The only solution I found on the 'net that could make it work was to add
> a line
>
> options cx23885 debug=7
>
> to the file /etc/modprobe.d/cx23885.conf
Have you tried:
options cx23885 dma_reset_workaround=2
?
> However, this causes a *huge* number of debug messages, so I also run
> the command
>
> rm -f /var/log/kern.log*
>
> in a daily cronjob. This works stable here for some months now.
>
> With lower debug levels the problem occurred less often, but it still
> occurred. Only with debug level 7 (at least) the driver runs stable over
> time here.
>
> In case somebody is interested in details of the systemI'm running here:
> https://burnicki.net/public_html/martin/tmp/system-etails.txt
Not found, I'm afraid.
> The commit messages mentioned earlier in this thread are already pretty
> old (from ~2018 or so), and I'm running kernel 5.3 on my Ubuntu system,
> so I guess those commits are already in there, but the problem still occurs.
Those commits check for a particular PCI PID/VIDs; newer IDs could be
missing, if they are still broken.
> I'm not familiar with the video stuff, with the cx23885 driver, etc.,
> but I'm maintaining another kernel driver for different PCI cards and
> encountered similar problems as the cx23885 driver.
>
> The symptoms were that the driver worked stable for many years on all
> systems, but suddenly failed to work properly on systems with very new
> chips sets and/or CPUs (not only AMD Ryzen).
>
> It turned out that the problem was due to missing barriers when
> accessing memory mapped registers.
>
> In my original driver code (written many years ago) the driver accessed
> the memory mapped registers directly
>
> val = *mem_addr
> *mem_addr = val
>
> which worked without problems for a long time, so it looks like older
> CPUs/chipsets didn't do reordering which would have been inhibited by
> barriers.
>
> As said above, with recent versions of CPUs/chipsets this seems indeed
> to happen, but since I changed the driver code so that all access to
> memory mapped registers uses the specific kernel inline functions (which
> use barriers, AFAIK), all problems have vanished and my driver works
> fine with the latest CPUs and chipsets.
>
> So maybe somewhere in the cx23885 driver code a memory barrier may be
> missing, and depending on whether debugging is enabled, or not, accesses
> to the device are re-ordered, or not.
>
> This is just an idea, and maybe this is not the case here, but by chance
> someone who is familiar with the cx23885 code may have a look.
That does seem possible.
Actually I think it would be very useful if you could try and track down
this issue, by replacing the various lines that do some debug action
with a memory barrier or nothing. That would tell where the problem is.
Unless anyone has better ideas, of course.
Thanks,
Sean
next prev parent reply other threads:[~2020-04-25 11:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 12:32 HauppaugeTV-quadHD DVB-T mpeg risc op code error Rolf Pedersen
2020-04-23 15:35 ` Sean Young
2020-04-23 15:49 ` Rolf Pedersen
2020-04-23 15:59 ` Sean Young
2020-04-23 16:09 ` Rolf Pedersen
2020-04-23 16:35 ` Sean Young
2020-04-24 17:46 ` Martin Burnicki
2020-04-25 11:41 ` Sean Young [this message]
2020-04-25 14:06 ` Martin Burnicki
2020-04-27 7:03 ` Martin Burnicki
2020-04-27 8:07 ` Sean Young
2020-04-27 8:59 ` Martin Burnicki
2020-04-28 18:24 ` Martin Burnicki
2020-04-30 16:49 ` Sean Young
2022-05-23 22:36 ` HauppaugeTV-quadHD DVB-T & HVR5525 " Ken Smith
2022-05-24 7:51 ` Martin Burnicki
2022-05-26 17:06 ` Ken Smith
2022-06-06 13:59 ` Ken Smith
2022-06-30 9:59 ` Ken Smith
2022-05-24 8:36 ` Ken Smith
2022-05-26 9:52 ` Ken Smith
2022-05-26 11:33 ` Ken Smith
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=20200425114147.GA3037@gofer.mess.org \
--to=sean@mess.org \
--cc=brad@nextdimension.cc \
--cc=linux-media@vger.kernel.org \
--cc=martin.burnicki@burnicki.net \
--cc=rolfpedersen@mindspring.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox