summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 556ad0f02a0d..8a60fb8ad370 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -30,6 +30,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <drm/drm_aperture.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_cma_helper.h>
@@ -56,10 +57,8 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index)
res = platform_get_resource(dev, IORESOURCE_MEM, index);
map = devm_ioremap_resource(&dev->dev, res);
- if (IS_ERR(map)) {
- DRM_ERROR("Failed to map registers: %ld\n", PTR_ERR(map));
+ if (IS_ERR(map))
return map;
- }
return map;
}
@@ -266,7 +265,9 @@ static int vc4_drm_bind(struct device *dev)
if (ret)
goto unbind_all;
- drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false);
+ ret = drm_aperture_remove_framebuffers(false, "vc4drmfb");
+ if (ret)
+ goto unbind_all;
ret = vc4_kms_load(drm);
if (ret < 0)
@@ -303,12 +304,21 @@ static const struct component_master_ops vc4_drm_ops = {
.unbind = vc4_drm_unbind,
};
+/*
+ * This list determines the binding order of our components, and we have
+ * a few constraints:
+ * - The TXP driver needs to be bound before the PixelValves (CRTC)
+ * but after the HVS to set the possible_crtc field properly
+ * - The HDMI driver needs to be bound after the HVS so that we can
+ * lookup the HVS maximum core clock rate and figure out if we
+ * support 4kp60 or not.
+ */
static struct platform_driver *const component_drivers[] = {
+ &vc4_hvs_driver,
&vc4_hdmi_driver,
&vc4_vec_driver,
&vc4_dpi_driver,
&vc4_dsi_driver,
- &vc4_hvs_driver,
&vc4_txp_driver,
&vc4_crtc_driver,
&vc4_v3d_driver,