aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arm/hdlcd_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/arm/hdlcd_drv.c')
-rw-r--r--drivers/gpu/drm/arm/hdlcd_drv.c55
1 files changed, 4 insertions, 51 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index 4ce4f970920b..0f49c4b12772 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -199,24 +199,6 @@ static void hdlcd_irq_uninstall(struct drm_device *drm)
hdlcd_write(hdlcd, HDLCD_REG_INT_MASK, irq_mask);
}
-static int hdlcd_enable_vblank(struct drm_device *drm, unsigned int crtc)
-{
- struct hdlcd_drm_private *hdlcd = drm->dev_private;
- unsigned int mask = hdlcd_read(hdlcd, HDLCD_REG_INT_MASK);
-
- hdlcd_write(hdlcd, HDLCD_REG_INT_MASK, mask | HDLCD_INTERRUPT_VSYNC);
-
- return 0;
-}
-
-static void hdlcd_disable_vblank(struct drm_device *drm, unsigned int crtc)
-{
- struct hdlcd_drm_private *hdlcd = drm->dev_private;
- unsigned int mask = hdlcd_read(hdlcd, HDLCD_REG_INT_MASK);
-
- hdlcd_write(hdlcd, HDLCD_REG_INT_MASK, mask & ~HDLCD_INTERRUPT_VSYNC);
-}
-
#ifdef CONFIG_DEBUG_FS
static int hdlcd_show_underrun_count(struct seq_file *m, void *arg)
{
@@ -257,17 +239,7 @@ static int hdlcd_debugfs_init(struct drm_minor *minor)
}
#endif
-static const struct file_operations fops = {
- .owner = THIS_MODULE,
- .open = drm_open,
- .release = drm_release,
- .unlocked_ioctl = drm_ioctl,
- .compat_ioctl = drm_compat_ioctl,
- .poll = drm_poll,
- .read = drm_read,
- .llseek = noop_llseek,
- .mmap = drm_gem_cma_mmap,
-};
+DEFINE_DRM_GEM_CMA_FOPS(fops);
static struct drm_driver hdlcd_driver = {
.driver_features = DRIVER_HAVE_IRQ | DRIVER_GEM |
@@ -278,9 +250,6 @@ static struct drm_driver hdlcd_driver = {
.irq_preinstall = hdlcd_irq_preinstall,
.irq_postinstall = hdlcd_irq_postinstall,
.irq_uninstall = hdlcd_irq_uninstall,
- .get_vblank_counter = drm_vblank_no_hw_counter,
- .enable_vblank = hdlcd_enable_vblank,
- .disable_vblank = hdlcd_disable_vblank,
.gem_free_object_unlocked = drm_gem_cma_free_object,
.gem_vm_ops = &drm_gem_cma_vm_ops,
.dumb_create = drm_gem_cma_dumb_create,
@@ -423,30 +392,14 @@ static int compare_dev(struct device *dev, void *data)
static int hdlcd_probe(struct platform_device *pdev)
{
- struct device_node *port, *ep;
+ struct device_node *port;
struct component_match *match = NULL;
- if (!pdev->dev.of_node)
- return -ENODEV;
-
/* there is only one output port inside each device, find it */
- ep = of_graph_get_next_endpoint(pdev->dev.of_node, NULL);
- if (!ep)
+ port = of_graph_get_remote_node(pdev->dev.of_node, 0, 0);
+ if (!port)
return -ENODEV;
- if (!of_device_is_available(ep)) {
- of_node_put(ep);
- return -ENODEV;
- }
-
- /* add the remote encoder port as component */
- port = of_graph_get_remote_port_parent(ep);
- of_node_put(ep);
- if (!port || !of_device_is_available(port)) {
- of_node_put(port);
- return -EAGAIN;
- }
-
drm_of_component_match_add(&pdev->dev, &match, compare_dev, port);
of_node_put(port);