Lines Matching +full:panel +full:- +full:specific

1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) COPYRIGHT 2012-2013 ARM Limited. All rights reserved.
7 * Copyright (c) 2006-2008 Intel Corporation
29 * - Fix race between setting plane base address and getting IRQ for
32 * - Read back hardware state at boot to skip reprogramming the
33 * hardware when doing a no-op modeset.
35 * - Use the CLKSEL bit to support switching between the two external
40 #include <linux/dma-buf.h>
75 struct pl111_drm_dev_private *priv = dev->dev_private; in pl111_modeset_init()
76 struct device_node *np = dev->dev->of_node; in pl111_modeset_init()
78 struct drm_panel *panel = NULL; in pl111_modeset_init() local
88 mode_config = &dev->mode_config; in pl111_modeset_init()
89 mode_config->funcs = &mode_config_funcs; in pl111_modeset_init()
90 mode_config->min_width = 1; in pl111_modeset_init()
91 mode_config->max_width = 1024; in pl111_modeset_init()
92 mode_config->min_height = 1; in pl111_modeset_init()
93 mode_config->max_height = 768; in pl111_modeset_init()
100 dev_dbg(dev->dev, "checking endpoint %d\n", i); in pl111_modeset_init()
102 ret = drm_of_find_panel_or_bridge(dev->dev->of_node, in pl111_modeset_init()
107 if (ret == -EPROBE_DEFER) { in pl111_modeset_init()
110 * another way of saying -ENODEV, but let's in pl111_modeset_init()
114 } else if (ret != -ENODEV) { in pl111_modeset_init()
116 dev_err(dev->dev, in pl111_modeset_init()
122 dev_info(dev->dev, in pl111_modeset_init()
123 "found panel on endpoint %d\n", i); in pl111_modeset_init()
124 panel = tmp_panel; in pl111_modeset_init()
127 dev_info(dev->dev, in pl111_modeset_init()
136 * If we can't find neither panel nor bridge on any of the in pl111_modeset_init()
137 * endpoints, and any of them retured -EPROBE_DEFER, then in pl111_modeset_init()
140 if ((!panel && !bridge) && defer) in pl111_modeset_init()
141 return -EPROBE_DEFER; in pl111_modeset_init()
143 if (panel) { in pl111_modeset_init()
144 bridge = drm_panel_bridge_add_typed(panel, in pl111_modeset_init()
151 dev_info(dev->dev, "Using non-panel bridge\n"); in pl111_modeset_init()
153 dev_err(dev->dev, "No bridge, exiting\n"); in pl111_modeset_init()
154 return -ENODEV; in pl111_modeset_init()
157 priv->bridge = bridge; in pl111_modeset_init()
158 if (panel) { in pl111_modeset_init()
159 priv->panel = panel; in pl111_modeset_init()
160 priv->connector = drm_panel_bridge_connector(bridge); in pl111_modeset_init()
165 dev_err(dev->dev, "Failed to init display\n"); in pl111_modeset_init()
169 ret = drm_simple_display_pipe_attach_bridge(&priv->pipe, in pl111_modeset_init()
174 if (!priv->variant->broken_vblank) { in pl111_modeset_init()
177 dev_err(dev->dev, "Failed to init vblank\n"); in pl111_modeset_init()
189 if (panel) in pl111_modeset_init()
200 struct pl111_drm_dev_private *priv = dev->dev_private; in pl111_gem_import_sg_table()
203 * When using device-specific reserved memory we can't import in pl111_gem_import_sg_table()
205 * memory and we can only handle a specific range of memory. in pl111_gem_import_sg_table()
207 if (priv->use_device_memory) in pl111_gem_import_sg_table()
208 return ERR_PTR(-EINVAL); in pl111_gem_import_sg_table()
237 struct device *dev = &amba_dev->dev; in pl111_amba_probe()
239 const struct pl111_variant_data *variant = id->data; in pl111_amba_probe()
245 return -ENOMEM; in pl111_amba_probe()
251 priv->drm = drm; in pl111_amba_probe()
252 drm->dev_private = priv; in pl111_amba_probe()
253 priv->variant = variant; in pl111_amba_probe()
257 dev_info(dev, "using device-specific reserved memory\n"); in pl111_amba_probe()
258 priv->use_device_memory = true; in pl111_amba_probe()
261 if (of_property_read_u32(dev->of_node, "max-memory-bandwidth", in pl111_amba_probe()
262 &priv->memory_bw)) { in pl111_amba_probe()
264 priv->memory_bw = 0; in pl111_amba_probe()
268 if (variant->is_pl110 || variant->is_lcdc) { in pl111_amba_probe()
269 priv->ienb = CLCD_PL110_IENB; in pl111_amba_probe()
270 priv->ctrl = CLCD_PL110_CNTL; in pl111_amba_probe()
272 priv->ienb = CLCD_PL111_IENB; in pl111_amba_probe()
273 priv->ctrl = CLCD_PL111_CNTL; in pl111_amba_probe()
276 priv->regs = devm_ioremap_resource(dev, &amba_dev->res); in pl111_amba_probe()
277 if (IS_ERR(priv->regs)) { in pl111_amba_probe()
279 ret = PTR_ERR(priv->regs); in pl111_amba_probe()
291 writel(0, priv->regs + priv->ienb); in pl111_amba_probe()
293 ret = devm_request_irq(dev, amba_dev->irq[0], pl111_irq, 0, in pl111_amba_probe()
294 variant->name, priv); in pl111_amba_probe()
308 drm_fbdev_dma_setup(drm, priv->variant->fb_depth); in pl111_amba_probe()
321 struct device *dev = &amba_dev->dev; in pl111_amba_remove()
323 struct pl111_drm_dev_private *priv = drm->dev_private; in pl111_amba_remove()
327 if (priv->panel) in pl111_amba_remove()
328 drm_panel_bridge_remove(priv->bridge); in pl111_amba_remove()
436 .name = "drm-clcd-pl111",