From mboxrd@z Thu Jan 1 00:00:00 1970 From: liviu.dudau@arm.com (Liviu Dudau) Date: Tue, 28 Aug 2018 15:46:36 +0100 Subject: [PATCH 2/2] drm/bridge: Add support for a virtual display bridge In-Reply-To: <20180824122332.3238-1-linus.walleij@linaro.org> References: <20180824122332.3238-1-linus.walleij@linaro.org> Message-ID: <20180828144636.GH907@e110455-lin.cambridge.arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Linus, On Fri, Aug 24, 2018 at 02:23:32PM +0200, Linus Walleij wrote: > This adds a very small and simple driver to read a virtual .... and simple bridge driver .... > display characteristic from the device tree and reflect it > back into DRM so a display driver in a virtual environment > knows how to configure its output. It is the job of the encoder to configure itself as well, and I think that for RTSM you need a virtual encoder as well. > > This was created for the ARM RTSM aemv8a emulator as a way > forward to convert all ARM reference designs to use the > PL11x DRM driver. > > Cc: Liviu Dudau > Cc: Ryan Harkin > Signed-off-by: Linus Walleij > --- > drivers/gpu/drm/bridge/Kconfig | 10 ++ > drivers/gpu/drm/bridge/Makefile | 1 + > drivers/gpu/drm/bridge/virtual-display.c | 186 +++++++++++++++++++++++ > 3 files changed, 197 insertions(+) > create mode 100644 drivers/gpu/drm/bridge/virtual-display.c > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > index fa2c7997e2fd..cfb61305b3f6 100644 > --- a/drivers/gpu/drm/bridge/Kconfig > +++ b/drivers/gpu/drm/bridge/Kconfig > @@ -126,6 +126,16 @@ config DRM_TI_TFP410 > ---help--- > Texas Instruments TFP410 DVI/HDMI Transmitter driver > > +config DRM_VIRTUAL_DISPLAY_BRIDGE > + tristate "Virtual Display Bridge support" > + depends on OF > + select DRM_KMS_HELPER > + select VIDEOMODE_HELPERS > + help > + Support for virtualized environments where the avilable > + resolution is controlled by software configuration in > + the device tree. > + > source "drivers/gpu/drm/bridge/analogix/Kconfig" > > source "drivers/gpu/drm/bridge/adv7511/Kconfig" > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > index 35f88d48ec20..2bdf67d98972 100644 > --- a/drivers/gpu/drm/bridge/Makefile > +++ b/drivers/gpu/drm/bridge/Makefile > @@ -14,4 +14,5 @@ obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o > obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ > obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ > obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o > +obj-$(CONFIG_DRM_VIRTUAL_DISPLAY_BRIDGE) += virtual-display.o > obj-y += synopsys/ > diff --git a/drivers/gpu/drm/bridge/virtual-display.c b/drivers/gpu/drm/bridge/virtual-display.c > new file mode 100644 > index 000000000000..ab55b3d6be8a > --- /dev/null > +++ b/drivers/gpu/drm/bridge/virtual-display.c > @@ -0,0 +1,186 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * (C) Copyright 2018 Linus Walleij > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include