<div><div>Hi Jae,</div><div>   The bmc serial port will print an  usb_ep_queue errors when reboot the hostOS. </div><div>I can reproduce it by the following steps:</div><div>1, Login the bmc webpage ,open the kvm webpage.</div><div>2, reboot the host OS</div><div>3,  Bmc  Serial port will print error messages:</div><div>[  680.786134] aspeed-video 1e700000.video: Timed out; first mode detect       </div><div>[  681.846125] aspeed-video 1e700000.video: Timed out when stopping streaming   </div><div>[  682.356106] aspeed-video 1e700000.video: Timed out; first mode detect        </div><div>[  682.377294] configfs-gadget gadget: usb_ep_queue error on int endpoint -108  </div><div>[  682.896212] aspeed-video 1e700000.video: Timed out; first mode detect        </div><div>[  684.917892] configfs-gadget gadget: usb_ep_queue error on int endpoint -108  </div><div>[  685.426159] aspeed-video 1e700000.video: Timed out; first mode detect       </div></div><div>4, It will stop the error output when the hostOS start to bootup.[  739.598840] configfs-gadgetgadget: high-speed config #1: c                    [  739.629961] aspeed_vhub 1e6a0000.usb-vhub: status direction mismatch </div><div><br></div><div>Does this output make sense?</div><div><div>Best,</div><div>Xiuzhi</div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>From: </b> "jae.hyun.yoo";<jae.hyun.yoo@linux.intel.com>;</div><div><b>Date: </b> Jun 1, 2019</div><div><b>To: </b> "xiuzhi"<1450335857@qq.com>; "openbmc"<openbmc@lists.ozlabs.org>; "eajames"<eajames@linux.ibm.com>; "joel"<joel@jms.id.au>; "andrew"<andrew@aj.id.au>; <wbr></div><div></div><div><b>Subject: </b> Re: [PATCH dev-5.1 4/4] media: aspeed: add a workaround to fix asilicon bug (Jae Hyun Yoo)</div></div><div><br></div>On 5/31/2019 4:21 AM, xiuzhi wrote:<br>> Hi  Jae,<br>>     I tested this patch ,it works on 1680*1050,but I found an issue:<br>> <br>> The ikvm webpage will be black screen when you reboot the host after <br>> switching solution between 1680*1050 and 800*600 on chrome browser (my <br>> chrome version is 65).<br>> you can reproduce it:<br>> 1, Set host screen solution to 1680*1050 and save it . ikvm webpage works<br>> 2,Set host screen solution to 800*600 and save it. ikvm webpage works<br>> 3,Reset host screen solution to   1680*1050 and save it,<br>> 4,reboot the host,<br>> 5, the ikvm webpage is black screen when boot to Centos GUI<br><br>Hi Xiuzhi,<br><br>Checked that the issue isn't related this patch. Actually, that is<br>caused by the first patch of this patch series. Since the patch removes<br>source buffer allocation before mode detection, remaining allocation<br>logic should be changed accordingly, otherwise it can't allocate buffers<br>and eventually causes the issue. I'll fix the first patch in the next<br>spin. In the meantime, you can apply below quick fix on top of what you<br>tested the issue.<br><br>Thanks,<br>Jae<br><br><br>diff --git a/drivers/media/platform/aspeed-video.c <br>b/drivers/media/platform/aspeed-video.c<br>index c2d4a2e6f20f..034f2f436d76 100644<br>--- a/drivers/media/platform/aspeed-video.c<br>+++ b/drivers/media/platform/aspeed-video.c<br>@@ -865,20 +865,14 @@ static void aspeed_video_set_resolution(struct <br>aspeed_video *video)<br><br>         size *= 4;<br><br>-       if (size == video->srcs[0].size / 2) {<br>-               aspeed_video_write(video, VE_SRC1_ADDR,<br>-                                  video->srcs[0].dma + size);<br>-       } else if (size == video->srcs[0].size) {<br>-               if (!aspeed_video_alloc_buf(video, &video->srcs[1], size))<br>-                       goto err_mem;<br>-<br>-               aspeed_video_write(video, VE_SRC1_ADDR, video->srcs[1].dma);<br>-       } else {<br>-               aspeed_video_free_buf(video, &video->srcs[0]);<br>+       if (size != video->srcs[0].size) {<br>+               if (video->srcs[0].size)<br>+                       aspeed_video_free_buf(video, &video->srcs[0]);<br>+               if (video->srcs[1].size)<br>+                       aspeed_video_free_buf(video, &video->srcs[1]);<br><br>                 if (!aspeed_video_alloc_buf(video, &video->srcs[0], size))<br>                         goto err_mem;<br>-<br>                 if (!aspeed_video_alloc_buf(video, &video->srcs[1], size))<br>                         goto err_mem;<br><br></div>