<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p dir="ltr">Hi Huacai,</p>
<p dir="ltr">Adding our internal list on CC as well, maybe somebody else has an idea.</p>
<p dir="ltr">I unfortunately don't understand at all how playing something with UVD could delay a simple register read by about 1ms.</p>
<p dir="ltr">And do I get that right that attaching something to the USB controller on the south bridge fixes the issue?</p>
<p dir="ltr">Additional to that the RS780 is already rather old and we don't have any hardware for testing that generation any more.</p>
<p dir="ltr">Sorry no idea of hand,<br>
Christina.</p>
<div class="gmail_quote">Am 17.06.2016 10:52 schrieb Huacai Chen <chenhuacai@gmail.com>:<br type="attribution">
<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><font size="2"><span style="font-size:10pt"></span></font>
<div>Hi, Christian<br>
<br>
We found that if we use RS780 UVD decoding, hpet_readl() will need as<br>
long as 1ms.<br>
But, if attach a U-disk on south bridge (SB700) and read some data<br>
from it, hpet_readl() has no problem.<br>
Could you please give me some suggestions or fix it?<br>
<br>
How to reproduce:<br>
1, apply the patch on top of kernel (4.2+) and boot with this kernel<br>
<br>
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c<br>
index 307a498..a0c8634 100644<br>
--- a/arch/x86/kernel/apic/apic.c<br>
+++ b/arch/x86/kernel/apic/apic.c<br>
@@ -452,10 +452,12 @@ EXPORT_SYMBOL_GPL(setup_APIC_eilvt);<br>
 /*<br>
  * Program the next event, relative to now<br>
  */<br>
+void check_hpet(void);<br>
 static int lapic_next_event(unsigned long delta,<br>
                            struct clock_event_device *evt)<br>
 {<!-- --><br>
        apic_write(APIC_TMICT, delta);<br>
+       check_hpet();<br>
        return 0;<br>
 }<br>
<br>
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c<br>
index 3acbff4..19329e8 100644<br>
--- a/arch/x86/kernel/hpet.c<br>
+++ b/arch/x86/kernel/hpet.c<br>
@@ -367,6 +367,15 @@ static void hpet_set_mode(enum clock_event_mode mode,<br>
        }<br>
 }<br>
<br>
+void check_hpet(void)<br>
+{<!-- --><br>
+       u32 cnt1,cnt2;<br>
+<br>
+       cnt1 = hpet_readl(HPET_COUNTER);<br>
+       cnt2 = hpet_readl(HPET_COUNTER);<br>
+       if(cnt2-cnt1>1000) printk("So big! (%u)\n",cnt2-cnt1);<br>
+}<br>
+<br>
 static int hpet_next_event(unsigned long delta,<br>
                           struct clock_event_device *evt, int timer)<br>
 {<!-- --><br>
<br>
2, ensure that no USB device attached on SB700 (except keyboard and mouse)<br>
3, download this file:<br>
<a href="http://mirror.lemote.com/fedora-users/ipfootball/video_bench/1920x1080_25fps_h264_ac3.mkv">http://mirror.lemote.com/fedora-users/ipfootball/video_bench/1920x1080_25fps_h264_ac3.mkv</a><br>
4, ffmpeg -hwaccel vdpau -i 1920x1080_25fps_h264_acc.mkv  -f rawvideo<br>
-an -y /dev/null<br>
5, dmesg will complain "So big..."<br>
<br>
Huacai<br>
</div>
</div>
</blockquote>
</div>
</body>
</html>