diff options
Diffstat (limited to 'drivers/gpu/drm/arc')
-rw-r--r-- | drivers/gpu/drm/arc/arcpgu.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/arc/arcpgu_crtc.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/arc/arcpgu_drv.c | 34 |
3 files changed, 4 insertions, 37 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu.h b/drivers/gpu/drm/arc/arcpgu.h index e8fcf3ab1d9a..90ef76b19f8a 100644 --- a/drivers/gpu/drm/arc/arcpgu.h +++ b/drivers/gpu/drm/arc/arcpgu.h @@ -20,7 +20,6 @@ struct arcpgu_drm_private { void __iomem *regs; struct clk *clk; - struct drm_fbdev_cma *fbdev; struct drm_framebuffer *fb; struct drm_crtc crtc; struct drm_plane *plane; @@ -43,8 +42,5 @@ static inline u32 arc_pgu_read(struct arcpgu_drm_private *arcpgu, int arc_pgu_setup_crtc(struct drm_device *dev); int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np); int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np); -struct drm_fbdev_cma *arcpgu_fbdev_cma_init(struct drm_device *dev, - unsigned int preferred_bpp, unsigned int num_crtc, - unsigned int max_conn_count); #endif diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c index 965cda48dc13..62f51f70606d 100644 --- a/drivers/gpu/drm/arc/arcpgu_crtc.c +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c @@ -158,8 +158,6 @@ static void arc_pgu_crtc_atomic_begin(struct drm_crtc *crtc, static const struct drm_crtc_helper_funcs arc_pgu_crtc_helper_funcs = { .mode_valid = arc_pgu_crtc_mode_valid, - .mode_set = drm_helper_crtc_mode_set, - .mode_set_base = drm_helper_crtc_mode_set_base, .mode_set_nofb = arc_pgu_crtc_mode_set_nofb, .atomic_begin = arc_pgu_crtc_atomic_begin, .atomic_enable = arc_pgu_crtc_atomic_enable, @@ -186,7 +184,6 @@ static const struct drm_plane_helper_funcs arc_pgu_plane_helper_funcs = { static void arc_pgu_plane_destroy(struct drm_plane *plane) { - drm_plane_helper_disable(plane, NULL); drm_plane_cleanup(plane); } diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index f067de4e1e82..2af847ebca34 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -17,6 +17,7 @@ #include <linux/clk.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_atomic_helper.h> @@ -25,16 +26,8 @@ #include "arcpgu.h" #include "arcpgu_regs.h" -static void arcpgu_fb_output_poll_changed(struct drm_device *dev) -{ - struct arcpgu_drm_private *arcpgu = dev->dev_private; - - drm_fbdev_cma_hotplug_event(arcpgu->fbdev); -} - static const struct drm_mode_config_funcs arcpgu_drm_modecfg_funcs = { .fb_create = drm_gem_fb_create, - .output_poll_changed = arcpgu_fb_output_poll_changed, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, }; @@ -51,13 +44,6 @@ static void arcpgu_setup_mode_config(struct drm_device *drm) DEFINE_DRM_GEM_CMA_FOPS(arcpgu_drm_ops); -static void arcpgu_lastclose(struct drm_device *drm) -{ - struct arcpgu_drm_private *arcpgu = drm->dev_private; - - drm_fbdev_cma_restore_mode(arcpgu->fbdev); -} - static int arcpgu_load(struct drm_device *drm) { struct platform_device *pdev = to_platform_device(drm->dev); @@ -113,27 +99,14 @@ static int arcpgu_load(struct drm_device *drm) drm_mode_config_reset(drm); drm_kms_helper_poll_init(drm); - arcpgu->fbdev = drm_fbdev_cma_init(drm, 16, - drm->mode_config.num_connector); - if (IS_ERR(arcpgu->fbdev)) { - ret = PTR_ERR(arcpgu->fbdev); - arcpgu->fbdev = NULL; - return -ENODEV; - } - platform_set_drvdata(pdev, drm); return 0; } static int arcpgu_unload(struct drm_device *drm) { - struct arcpgu_drm_private *arcpgu = drm->dev_private; - - if (arcpgu->fbdev) { - drm_fbdev_cma_fini(arcpgu->fbdev); - arcpgu->fbdev = NULL; - } drm_kms_helper_poll_fini(drm); + drm_atomic_helper_shutdown(drm); drm_mode_config_cleanup(drm); return 0; @@ -167,7 +140,6 @@ static int arcpgu_debugfs_init(struct drm_minor *minor) static struct drm_driver arcpgu_drm_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_ATOMIC, - .lastclose = arcpgu_lastclose, .name = "arcpgu", .desc = "ARC PGU Controller", .date = "20160219", @@ -210,6 +182,8 @@ static int arcpgu_probe(struct platform_device *pdev) if (ret) goto err_unload; + drm_fbdev_generic_setup(drm, 16); + return 0; err_unload: |