fb & exynos5: avoid USB HID problems with FOC

USB HID gets stuck due to strange kernel error
as HDMI starts simulatnously. This workaround
delays HDMI init by a second (only in case we
build for Exynos5 & FOC with USB) to let
scenarious like demo get their USB HID started
without much CPU load.

ref #796
This commit is contained in:
Martin Stein 2013-10-15 15:19:12 +02:00 committed by Christian Helmuth
parent 1113f36e2f
commit 4196b9bc5c
4 changed files with 61 additions and 2 deletions

View File

@ -1107,9 +1107,14 @@ static Hdmi * hdmi()
** Framebuffer::Driver **
*************************/
void prepare_fb_driver_init(Mmio::Delayer * const d);
int Framebuffer::Driver::init_drv(size_t width, size_t height, Format format,
Output output, addr_t fb_phys)
{
/* FIXME: hook for scenario/platform dependent quirks */
prepare_fb_driver_init(delayer());
_fb_width = width;
_fb_height = height;
_fb_format = format;

View File

@ -0,0 +1,23 @@
/*
* \brief Framebuffer driver quirks for FOC with USB
* \author Martin Stein
* \date 2013-08-09
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <util/mmio.h>
using namespace Genode;
void prepare_fb_driver_init(Mmio::Delayer * const d)
{
/* FIXME: on Fiasco.OC USB HID gets stuck if HDMI starts simulatnously */
d->usleep(1000000);
}

View File

@ -0,0 +1,19 @@
/*
* \brief Dummies for framebuffer-driver quirks
* \author Martin Stein
* \date 2013-08-09
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <util/mmio.h>
using namespace Genode;
void prepare_fb_driver_init(Mmio::Delayer * const) { }

View File

@ -1,5 +1,17 @@
TARGET = fb_drv
REQUIRES = exynos5
SRC_CC = main.cc driver.cc
LIBS = base config
SRC_CC += main.cc driver.cc
SRC_CC += quirks.cc
LIBS += base config
INC_DIR += $(PRG_DIR)
ifneq ($(filter foc_arm, $(SPECS)),)
ifneq ($(filter usb, $(SPECS)),)
SPECS += exynos5_fb_foc_usb_quirk
endif
endif
ifneq ($(filter exynos5_fb_foc_usb_quirk, $(SPECS)),)
vpath quirks.cc $(PRG_DIR)/foc_usb
else
vpath quirks.cc $(PRG_DIR)
endif