drm/v3d: Add support for V3D v4.2.
No compatible string for it yet, just the version-dependent changes. They've now tied the hub and the core interrupt lines into a single interrupt line coming out of the block. It also turns out I made a mistake in modeling the V3D v3.3 and v4.1 bridge as a part of V3D itself -- the bridge is going away in favor of an external reset controller in a larger HW module. v2: Use consistent checks for whether we're on 4.2, and fix a leak in an error path. v3: Use more general means of determining if the current 4.2 changes are in place, as apparently other platforms may switch back (noted by Dave). Update the binding doc. v4: Improve error handling for IRQ init. Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190308174336.7866-2-eric@anholt.net Reviewed-by: Dave Emett <david.emett@broadcom.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <drm/drm_fb_cma_helper.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
|
||||
@@ -264,10 +265,6 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
|
||||
v3d->pdev = pdev;
|
||||
drm = &v3d->drm;
|
||||
|
||||
ret = map_regs(v3d, &v3d->bridge_regs, "bridge");
|
||||
if (ret)
|
||||
goto dev_free;
|
||||
|
||||
ret = map_regs(v3d, &v3d->hub_regs, "hub");
|
||||
if (ret)
|
||||
goto dev_free;
|
||||
@@ -282,6 +279,22 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
|
||||
v3d->cores = V3D_GET_FIELD(ident1, V3D_HUB_IDENT1_NCORES);
|
||||
WARN_ON(v3d->cores > 1); /* multicore not yet implemented */
|
||||
|
||||
v3d->reset = devm_reset_control_get_exclusive(dev, NULL);
|
||||
if (IS_ERR(v3d->reset)) {
|
||||
ret = PTR_ERR(v3d->reset);
|
||||
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto dev_free;
|
||||
|
||||
v3d->reset = NULL;
|
||||
ret = map_regs(v3d, &v3d->bridge_regs, "bridge");
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"Failed to get reset control or bridge regs\n");
|
||||
goto dev_free;
|
||||
}
|
||||
}
|
||||
|
||||
if (v3d->ver < 41) {
|
||||
ret = map_regs(v3d, &v3d->gca_regs, "gca");
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user