[PATCH] drm/panel: simple: Support simple VGA panels

Rob Herring robh at kernel.org
Mon Jul 16 22:50:47 UTC 2018


On Mon, Jul 16, 2018 at 3:23 AM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> The need to support some straight-forward VGA panels that are
> not adhering to any standard like DPI arise in the ARM RTSM VE
> Real-Time Systems Model Virtual Executive. This emulator (which
> is not QEMU) does not model any bridge or panel other than
> displaying whatever the user defines that they have.
>
> Currently a fake "DPI panel" is used for this with the old
> FBDEV driver, but this is wrong as it is not conforming to any
> MIPI DPI standards. However the resolution chosen there is
> standard VGA, and we can cover this with the simple panel
> by simply adding the most common VGA resolutions as a kind
> of "simple panel".
>
> In difference from other cases where "simple panel" might be
> hiding something more complex (such as a panel driver or bridge)
> this case is actually applicable, since we are running inside
> a simulation with no real hardware on the output.
>
> Cc: devicetree at vger.kernel.org
> Cc: Sudeep Holla <sudeep.holla at arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
> Cc: Liviu Dudau <liviu.dudau at arm.com>
> Cc: Robin Murphy <robin.murphy at arm.com>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
>  .../display/panel/video-graphics-array.txt    | 21 ++++++
>  drivers/gpu/drm/panel/panel-simple.c          | 66 +++++++++++++++++++
>  2 files changed, 87 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/video-graphics-array.txt
>
> diff --git a/Documentation/devicetree/bindings/display/panel/video-graphics-array.txt b/Documentation/devicetree/bindings/display/panel/video-graphics-array.txt
> new file mode 100644
> index 000000000000..193d24ebe052
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/video-graphics-array.txt
> @@ -0,0 +1,21 @@
> +Video Graphics Array

VGA is more a controller interface than a panel...

> +
> +This binding is for simple panels using the standardized VGA resolutions
> +defined by de facto standards beginning with the IBM PS/2 in 1987.
> +
> +Required properties:
> +- compatible: should be "video-graphics-array"
> +
> +This binding is compatible with the simple-panel binding, which is specified
> +in simple-panel.txt in this directory.
> +
> +Example:
> +
> +panel {
> +       compatible = "video-graphics-array";
> +       port {
> +               vga_panel_in: endpoint {
> +                       remote-endpoint = <&foo>;
> +               };
> +       };
> +};
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index cbf1ab404ee7..db4db5a3f75e 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -2069,6 +2069,69 @@ static const struct panel_desc winstar_wf35ltiacd = {
>         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
>  };
>
> +static const struct drm_display_mode video_graphics_array_modes[] = {
> +       {
> +               /*
> +                * This is the most standardized "vanilla" VGA mode there is:
> +                * 640x480 @ 60 Hz

Don't we have standard VESA timings already defined as well as timings
that can be calculated based on resolution and refresh rate (called
CVT IIRC). Why duplicate here?

Why don't you just define a 'vga-connector' node and IIRC, you can
just force the standard modes from userspace with DRM. Maybe you need
some flag to force a connection in the emulator and perhaps some fake
EDID data to set a default mode. There's also some other cases of
"transparent" bridges which don't have any driver.

Rob


More information about the dri-devel mailing list