@@ -19,6 +19,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
+#include <drm/dumb_vga_dac.h>
/**
* struct vga_dac_variant - characteristics of the DAC
@@ -51,6 +52,12 @@ drm_connector_to_dumb_vga(struct drm_connector *connector)
return container_of(connector, struct dumb_vga, connector);
}
+struct drm_connector *drm_dumb_vga_get_connector(struct drm_bridge *bridge)
+{
+ return &drm_bridge_to_dumb_vga(bridge)->connector;
+}
+EXPORT_SYMBOL_GPL(drm_dumb_vga_get_connector);
+
static int dumb_vga_get_modes(struct drm_connector *connector)
{
struct dumb_vga *vga = drm_connector_to_dumb_vga(connector);
new file mode 100644
@@ -0,0 +1,9 @@
+#ifndef _DUMB_VGA_DAC_H_
+#define _DUMB_VGA_DAC_H_
+
+struct drm_connector;
+struct drm_bridge;
+
+struct drm_connector *drm_dumb_vga_get_connector(struct drm_bridge *bridge);
+
+#endif
We need to be able to get the connector out of a dumb VGA for the PL111 driver. This is because we are using the connector in the driver when initializing the display pipe. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- This is a bit ugly but not uglier than how we are reaching into the connector of the panels in several drivers. I don't know any better idea, advice welcome. --- drivers/gpu/drm/bridge/dumb-vga-dac.c | 7 +++++++ include/drm/dumb_vga_dac.h | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 include/drm/dumb_vga_dac.h