aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/pl111/pl111_drv.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-02-06 10:35:39 +0100
committerLinus Walleij <linus.walleij@linaro.org>2018-02-07 09:08:46 +0100
commit08e3211251e36a506ff6b0c31620e362b5800f47 (patch)
tree49d795cba06fb5e11375b3ebaa02cdd55958b84f /drivers/gpu/drm/pl111/pl111_drv.c
parentdrm/pl111: Support variants with broken clock divider (diff)
downloadlinux-dev-08e3211251e36a506ff6b0c31620e362b5800f47.tar.xz
linux-dev-08e3211251e36a506ff6b0c31620e362b5800f47.zip
drm/pl111: Support variants with broken VBLANK
The early Integrator CLCD synthesized in the Integrator CP and IM-PD1 FPGAs are broken: their vertical and next base interrupts are not functional. Support these variants by simply disabling the use of the vblank interrupt on these variants. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180206093540.8147-4-linus.walleij@linaro.org
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_drv.c')
-rw-r--r--drivers/gpu/drm/pl111/pl111_drv.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index ad8dfead2d00..94fbc7cc5e19 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -132,10 +132,12 @@ static int pl111_modeset_init(struct drm_device *dev)
if (ret)
return ret;
- ret = drm_vblank_init(dev, 1);
- if (ret != 0) {
- dev_err(dev->dev, "Failed to init vblank\n");
- goto out_bridge;
+ if (!priv->variant->broken_vblank) {
+ ret = drm_vblank_init(dev, 1);
+ if (ret != 0) {
+ dev_err(dev->dev, "Failed to init vblank\n");
+ goto out_bridge;
+ }
}
drm_mode_config_reset(dev);
@@ -172,10 +174,6 @@ static struct drm_driver pl111_drm_driver = {
.dumb_create = drm_gem_cma_dumb_create,
.gem_free_object_unlocked = drm_gem_cma_free_object,
.gem_vm_ops = &drm_gem_cma_vm_ops,
-
- .enable_vblank = pl111_enable_vblank,
- .disable_vblank = pl111_disable_vblank,
-
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_import = drm_gem_prime_import,
@@ -201,6 +199,11 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
if (!priv)
return -ENOMEM;
+ if (!variant->broken_vblank) {
+ pl111_drm_driver.enable_vblank = pl111_enable_vblank;
+ pl111_drm_driver.disable_vblank = pl111_disable_vblank;
+ }
+
drm = drm_dev_alloc(&pl111_drm_driver, dev);
if (IS_ERR(drm))
return PTR_ERR(drm);