diff options
Diffstat (limited to 'drivers/gpu/drm/mcde/mcde_drv.c')
| -rw-r--r-- | drivers/gpu/drm/mcde/mcde_drv.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index a8cd86c06c14..5f2c462bad7e 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -65,6 +65,7 @@ #include <linux/slab.h> #include <linux/delay.h> +#include <drm/clients/drm_client_setup.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_drv.h> @@ -207,11 +208,11 @@ static const struct drm_driver mcde_drm_driver = { .fops = &drm_fops, .name = "mcde", .desc = DRIVER_DESC, - .date = "20180529", .major = 1, .minor = 0, .patchlevel = 0, DRM_GEM_DMA_DRIVER_OPS, + DRM_FBDEV_DMA_DRIVER_OPS, }; static int mcde_drm_bind(struct device *dev) @@ -237,7 +238,7 @@ static int mcde_drm_bind(struct device *dev) if (ret < 0) goto unbind; - drm_fbdev_dma_setup(drm, 32); + drm_client_setup(drm, NULL); return 0; @@ -448,7 +449,7 @@ regulator_epod_off: } -static int mcde_remove(struct platform_device *pdev) +static void mcde_remove(struct platform_device *pdev) { struct drm_device *drm = platform_get_drvdata(pdev); struct mcde *mcde = to_mcde(drm); @@ -457,8 +458,14 @@ static int mcde_remove(struct platform_device *pdev) clk_disable_unprepare(mcde->mcde_clk); regulator_disable(mcde->vana); regulator_disable(mcde->epod); +} - return 0; +static void mcde_shutdown(struct platform_device *pdev) +{ + struct drm_device *drm = platform_get_drvdata(pdev); + + if (drm->registered) + drm_atomic_helper_shutdown(drm); } static const struct of_device_id mcde_of_match[] = { @@ -467,14 +474,16 @@ static const struct of_device_id mcde_of_match[] = { }, {}, }; +MODULE_DEVICE_TABLE(of, mcde_of_match); static struct platform_driver mcde_driver = { .driver = { .name = "mcde", - .of_match_table = of_match_ptr(mcde_of_match), + .of_match_table = mcde_of_match, }, .probe = mcde_probe, .remove = mcde_remove, + .shutdown = mcde_shutdown, }; static struct platform_driver *const component_drivers[] = { |
