/linux/drivers/gpu/drm/nouveau/ |
H A D | nouveau_drm.c | 212 mutex_lock(&cli->drm->client_mutex); in nouveau_cli_fini() 214 mutex_unlock(&cli->drm->client_mutex); in nouveau_cli_fini() 218 nouveau_cli_init(struct nouveau_drm *drm, const char *sname, in nouveau_cli_init() argument 240 cli->drm = drm; in nouveau_cli_init() 247 mutex_lock(&drm->client_mutex); in nouveau_cli_init() 248 ret = nvif_client_ctor(&drm->_client, cli->name, &cli->base); in nouveau_cli_init() 249 mutex_unlock(&drm->client_mutex); in nouveau_cli_init() 261 cli->device.object.map.ptr = drm->device.object.map.ptr; in nouveau_cli_init() 263 ret = nvif_mmu_ctor(&cli->device.object, "drmMmu", drm->mmu.object.oclass, in nouveau_cli_init() 300 ret = nouveau_sched_create(&cli->sched, drm, NULL, 1); in nouveau_cli_init() [all …]
|
H A D | nouveau_ttm.c | 70 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_vram_manager_new() local 73 if (drm->client.device.info.ram_size == 0) in nouveau_vram_manager_new() 76 ret = nouveau_mem_new(drm, nvbo->kind, nvbo->comp, res); in nouveau_vram_manager_new() 105 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_gart_manager_new() local 108 ret = nouveau_mem_new(drm, nvbo->kind, nvbo->comp, res); in nouveau_gart_manager_new() 131 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nv04_gart_manager_new() local 135 ret = nouveau_mem_new(drm, nvbo->kind, nvbo->comp, res); in nv04_gart_manager_new() 141 ret = nvif_vmm_get(&drm->client.vmm.vmm, PTES, false, 12, 0, in nv04_gart_manager_new() 160 nouveau_ttm_init_host(struct nouveau_drm *drm, u8 kind) in nouveau_ttm_init_host() argument 162 struct nvif_mmu *mmu = &drm->client.mmu; in nouveau_ttm_init_host() [all …]
|
H A D | nouveau_led.c | 40 struct nouveau_drm *drm = nouveau_drm(drm_dev); in nouveau_led_get_brightness() local 41 struct nvif_object *device = &drm->client.device.object; in nouveau_led_get_brightness() 57 struct nouveau_drm *drm = nouveau_drm(drm_dev); in nouveau_led_set_brightness() local 58 struct nvif_object *device = &drm->client.device.object; in nouveau_led_set_brightness() 80 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_led_init() local 81 struct nvkm_gpio *gpio = nvxx_gpio(drm); in nouveau_led_init() 92 drm->led = kzalloc(sizeof(*drm->led), GFP_KERNEL); in nouveau_led_init() 93 if (!drm->led) in nouveau_led_init() 95 drm->led->dev = dev; in nouveau_led_init() 97 drm->led->led.name = "nvidia-logo"; in nouveau_led_init() [all …]
|
H A D | nouveau_dmem.c | 60 typedef int (*nouveau_migrate_copy_t)(struct nouveau_drm *drm, u64 npages, 63 typedef int (*nouveau_clear_page_t)(struct nouveau_drm *drm, u32 length, 69 struct nouveau_drm *drm; member 81 struct nouveau_drm *drm; member 98 return chunk->drm; in page_to_drm() 113 struct nouveau_dmem *dmem = chunk->drm->dmem; in nouveau_dmem_page_free() 141 static int nouveau_dmem_copy_one(struct nouveau_drm *drm, struct page *spage, in nouveau_dmem_copy_one() argument 144 struct device *dev = drm->dev->dev; in nouveau_dmem_copy_one() 152 if (drm->dmem->migrate.copy_func(drm, 1, NOUVEAU_APER_HOST, *dma_addr, in nouveau_dmem_copy_one() 163 struct nouveau_drm *drm = page_to_drm(vmf->page); in nouveau_dmem_migrate_to_ram() local [all …]
|
H A D | nouveau_debugfs.c | 41 struct nouveau_drm *drm = nouveau_drm(node->minor->dev); in nouveau_debugfs_vbios_image() local 44 for (i = 0; i < drm->vbios.length; i++) in nouveau_debugfs_vbios_image() 45 seq_printf(m, "%c", drm->vbios.data[i]); in nouveau_debugfs_vbios_image() 53 struct nouveau_drm *drm = nouveau_drm(node->minor->dev); in nouveau_debugfs_strap_peek() local 56 ret = pm_runtime_get_sync(drm->dev->dev); in nouveau_debugfs_strap_peek() 58 pm_runtime_put_autosuspend(drm->dev->dev); in nouveau_debugfs_strap_peek() 63 nvif_rd32(&drm->client.device.object, 0x101000)); in nouveau_debugfs_strap_peek() 65 pm_runtime_mark_last_busy(drm->dev->dev); in nouveau_debugfs_strap_peek() 66 pm_runtime_put_autosuspend(drm->dev->dev); in nouveau_debugfs_strap_peek() 74 struct drm_device *drm = m->private; in nouveau_debugfs_pstate_get() local [all …]
|
H A D | nouveau_bo.c | 59 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_update_tile_region() local 60 int i = reg - drm->tile.reg; in nv10_bo_update_tile_region() 61 struct nvkm_fb *fb = nvxx_fb(drm); in nv10_bo_update_tile_region() 78 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_get_tile_region() local 79 struct nouveau_drm_tile *tile = &drm->tile.reg[i]; in nv10_bo_get_tile_region() 81 spin_lock(&drm->tile.lock); in nv10_bo_get_tile_region() 89 spin_unlock(&drm->tile.lock); in nv10_bo_get_tile_region() 97 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_put_tile_region() local 100 spin_lock(&drm->tile.lock); in nv10_bo_put_tile_region() 103 spin_unlock(&drm->tile.lock); in nv10_bo_put_tile_region() [all …]
|
H A D | nouveau_display.c | 132 nouveau_decode_mod(struct nouveau_drm *drm, in nouveau_decode_mod() argument 137 struct nouveau_display *disp = nouveau_display(drm->dev); in nouveau_decode_mod() 158 if (drm->client.device.info.chipset >= 0xc0) in nouveau_decode_mod() 169 struct nouveau_drm *drm = nouveau_drm(fb->dev); in nouveau_framebuffer_get_layout() local 171 nouveau_decode_mod(drm, fb->modifier, tile_mode, kind); in nouveau_framebuffer_get_layout() 191 nouveau_validate_decode_mod(struct nouveau_drm *drm, in nouveau_validate_decode_mod() argument 196 struct nouveau_display *disp = nouveau_display(drm->dev); in nouveau_validate_decode_mod() 199 if (drm->client.device.info.family < NV_DEVICE_INFO_V0_TESLA) { in nouveau_validate_decode_mod() 219 nouveau_decode_mod(drm, modifier, tile_mode, kind); in nouveau_validate_decode_mod() 225 nouveau_check_bl_size(struct nouveau_drm *drm, struct nouveau_bo *nvbo, in nouveau_check_bl_size() argument [all …]
|
H A D | nouveau_vga.c | 14 struct nouveau_drm *drm = pci_get_drvdata(pdev); in nouveau_vga_set_decode() local 15 struct nvif_object *device = &drm->client.device.object; in nouveau_vga_set_decode() 17 if (drm->client.device.info.family == NV_DEVICE_INFO_V0_CURIE && in nouveau_vga_set_decode() 18 drm->client.device.info.chipset >= 0x4c) in nouveau_vga_set_decode() 21 if (drm->client.device.info.chipset >= 0x40) in nouveau_vga_set_decode() 37 struct nouveau_drm *drm = pci_get_drvdata(pdev); in nouveau_switcheroo_set_state() local 38 struct drm_device *dev = drm->dev; in nouveau_switcheroo_set_state() 60 struct nouveau_drm *drm = pci_get_drvdata(pdev); in nouveau_switcheroo_reprobe() local 61 struct drm_device *dev = drm->dev; in nouveau_switcheroo_reprobe() 69 struct nouveau_drm *drm = pci_get_drvdata(pdev); in nouveau_switcheroo_can_switch() local [all …]
|
/linux/drivers/gpu/drm/mxsfb/ |
H A D | lcdif_drv.c | 50 struct device *dev = lcdif->drm->dev; in lcdif_attach_bridge() 91 ret = drm_encoder_init(lcdif->drm, encoder, &lcdif_encoder_funcs, in lcdif_attach_bridge() 114 struct drm_device *drm = data; in lcdif_irq_handler() local 115 struct lcdif_drm_private *lcdif = drm->dev_private; in lcdif_irq_handler() 133 static int lcdif_load(struct drm_device *drm) in lcdif_load() argument 135 struct platform_device *pdev = to_platform_device(drm->dev); in lcdif_load() 144 lcdif->drm = drm; in lcdif_load() 145 drm->dev_private = lcdif; in lcdif_load() 148 lcdif->base = devm_ioremap_resource(drm->dev, res); in lcdif_load() 152 lcdif->clk = devm_clk_get(drm->dev, "pix"); in lcdif_load() [all …]
|
H A D | mxsfb_drv.c | 121 struct drm_device *drm = mxsfb->drm; in mxsfb_attach_bridge() local 127 ret = drm_of_find_panel_or_bridge(drm->dev->of_node, 0, 0, &panel, in mxsfb_attach_bridge() 133 bridge = devm_drm_panel_bridge_add_typed(drm->dev, panel, in mxsfb_attach_bridge() 144 return dev_err_probe(drm->dev, ret, "Failed to attach bridge\n"); in mxsfb_attach_bridge() 152 drm_connector_list_iter_begin(drm, &iter); in mxsfb_attach_bridge() 161 struct drm_device *drm = data; in mxsfb_irq_handler() local 162 struct mxsfb_drm_private *mxsfb = drm->dev_private; in mxsfb_irq_handler() 182 static void mxsfb_irq_disable(struct drm_device *drm) in mxsfb_irq_disable() argument 184 struct mxsfb_drm_private *mxsfb = drm->dev_private; in mxsfb_irq_disable() 213 static int mxsfb_load(struct drm_device *drm, in mxsfb_load() argument [all …]
|
/linux/drivers/gpu/drm/kmb/ |
H A D | kmb_drv.c | 36 drm_err(&kmb->drm, "Failed to enable LCD clock: %d\n", ret); in kmb_display_clk_enable() 50 drm_err(&kmb->drm, "clk_get() failed clk_lcd\n"); in kmb_initialize_clocks() 56 drm_err(&kmb->drm, "clk_get() failed clk_pll0 "); in kmb_initialize_clocks() 60 drm_info(&kmb->drm, "system clk = %d Mhz", kmb->sys_clk_mhz); in kmb_initialize_clocks() 67 drm_err(&kmb->drm, "failed to set to clk_lcd to %d\n", in kmb_initialize_clocks() 71 drm_dbg(&kmb->drm, "clk_lcd = %ld\n", clk_get_rate(kmb->kmb_clk.clk_lcd)); in kmb_initialize_clocks() 79 drm_err(&kmb->drm, "failed to get msscam syscon"); in kmb_initialize_clocks() 94 static void __iomem *kmb_map_mmio(struct drm_device *drm, in kmb_map_mmio() argument 103 drm_err(drm, "failed to get resource for %s", name); in kmb_map_mmio() 106 mem = devm_ioremap_resource(drm->dev, res); in kmb_map_mmio() [all …]
|
/linux/include/drm/ |
H A D | drm_print.h | 386 static inline struct drm_printer drm_dbg_printer(struct drm_device *drm, in drm_dbg_printer() argument 392 .arg = drm, in drm_dbg_printer() 408 static inline struct drm_printer drm_err_printer(struct drm_device *drm, in drm_err_printer() argument 413 .arg = drm, in drm_err_printer() 585 #define __drm_printk(drm, level, type, fmt, ...) \ argument 586 dev_##level##type((drm) ? (drm)->dev : NULL, "[drm] " fmt, ##__VA_ARGS__) 589 #define drm_info(drm, fmt, ...) \ argument 590 __drm_printk((drm), info,, fmt, ##__VA_ARGS__) 592 #define drm_notice(drm, fmt, ...) \ argument 593 __drm_printk((drm), notice,, fmt, ##__VA_ARGS__) [all …]
|
/linux/drivers/gpu/drm/sprd/ |
H A D | sprd_drm.c | 40 static void sprd_drm_mode_config_init(struct drm_device *drm) in sprd_drm_mode_config_init() argument 42 drm->mode_config.min_width = 0; in sprd_drm_mode_config_init() 43 drm->mode_config.min_height = 0; in sprd_drm_mode_config_init() 44 drm->mode_config.max_width = 8192; in sprd_drm_mode_config_init() 45 drm->mode_config.max_height = 8192; in sprd_drm_mode_config_init() 47 drm->mode_config.funcs = &sprd_drm_mode_config_funcs; in sprd_drm_mode_config_init() 48 drm->mode_config.helper_private = &sprd_drm_mode_config_helper; in sprd_drm_mode_config_init() 70 struct drm_device *drm; in sprd_drm_bind() local 74 sprd = devm_drm_dev_alloc(dev, &sprd_drm_drv, struct sprd_drm, drm); in sprd_drm_bind() 78 drm = &sprd->drm; in sprd_drm_bind() [all …]
|
/linux/drivers/gpu/drm/arm/ |
H A D | hdlcd_drv.c | 100 static int hdlcd_load(struct drm_device *drm, unsigned long flags) in hdlcd_load() argument 102 struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm); in hdlcd_load() 103 struct platform_device *pdev = to_platform_device(drm->dev); in hdlcd_load() 107 hdlcd->clk = devm_clk_get(drm->dev, "pxlclk"); in hdlcd_load() 136 ret = of_reserved_mem_device_init(drm->dev); in hdlcd_load() 140 ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)); in hdlcd_load() 144 ret = hdlcd_setup_crtc(drm); in hdlcd_load() 166 of_reserved_mem_device_release(drm->dev); in hdlcd_load() 177 static int hdlcd_setup_mode_config(struct drm_device *drm) in hdlcd_setup_mode_config() argument 181 ret = drmm_mode_config_init(drm); in hdlcd_setup_mode_config() [all …]
|
H A D | malidp_drv.c | 172 static int malidp_set_and_wait_config_valid(struct drm_device *drm) in malidp_set_and_wait_config_valid() argument 174 struct malidp_drm *malidp = drm_to_malidp(drm); in malidp_set_and_wait_config_valid() 194 struct drm_device *drm = state->dev; in malidp_atomic_commit_hw_done() local 195 struct malidp_drm *malidp = drm_to_malidp(drm); in malidp_atomic_commit_hw_done() 211 if (malidp_set_and_wait_config_valid(drm) < 0) { in malidp_atomic_commit_hw_done() 217 if (!malidp_set_and_wait_config_valid(drm)) in malidp_atomic_commit_hw_done() 225 spin_lock_irq(&drm->event_lock); in malidp_atomic_commit_hw_done() 228 spin_unlock_irq(&drm->event_lock); in malidp_atomic_commit_hw_done() 235 struct drm_device *drm = state->dev; in malidp_atomic_commit_tail() local 236 struct malidp_drm *malidp = drm_to_malidp(drm); in malidp_atomic_commit_tail() [all …]
|
/linux/Documentation/gpu/imagination/ |
H A D | uapi.rst | 6 .. kernel-doc:: include/uapi/drm/pvr_drm.h 11 .. kernel-doc:: include/uapi/drm/pvr_drm.h 14 .. kernel-doc:: include/uapi/drm/pvr_drm.h 19 .. kernel-doc:: include/uapi/drm/pvr_drm.h 22 .. kernel-doc:: include/uapi/drm/pvr_drm.h 27 .. kernel-doc:: include/uapi/drm/pvr_drm.h 30 .. kernel-doc:: include/uapi/drm/pvr_drm.h 33 .. kernel-doc:: include/uapi/drm/pvr_drm.h 36 .. kernel-doc:: include/uapi/drm/pvr_drm.h 43 .. kernel-doc:: include/uapi/drm/pvr_drm.h [all …]
|
/linux/drivers/gpu/drm/imx/ipuv3/ |
H A D | imx-drm-core.c | 113 int imx_drm_encoder_parse_of(struct drm_device *drm, in imx_drm_encoder_parse_of() argument 116 uint32_t crtc_mask = drm_of_find_possible_crtcs(drm, np); in imx_drm_encoder_parse_of() 141 struct drm_device *drm, in imx_drm_dumb_create() argument 149 ret = drm_gem_dma_dumb_create(file_priv, drm, args); in imx_drm_dumb_create() 194 struct drm_device *drm; in imx_drm_bind() local 197 drm = drm_dev_alloc(&imx_drm_driver, dev); in imx_drm_bind() 198 if (IS_ERR(drm)) in imx_drm_bind() 199 return PTR_ERR(drm); in imx_drm_bind() 206 drm->mode_config.min_width = 1; in imx_drm_bind() 207 drm->mode_config.min_height = 1; in imx_drm_bind() [all …]
|
/linux/drivers/gpu/drm/aspeed/ |
H A D | aspeed_gfx_drv.c | 107 static int aspeed_gfx_setup_mode_config(struct drm_device *drm) in aspeed_gfx_setup_mode_config() argument 111 ret = drmm_mode_config_init(drm); in aspeed_gfx_setup_mode_config() 115 drm->mode_config.min_width = 0; in aspeed_gfx_setup_mode_config() 116 drm->mode_config.min_height = 0; in aspeed_gfx_setup_mode_config() 117 drm->mode_config.max_width = 800; in aspeed_gfx_setup_mode_config() 118 drm->mode_config.max_height = 600; in aspeed_gfx_setup_mode_config() 119 drm->mode_config.funcs = &aspeed_gfx_mode_config_funcs; in aspeed_gfx_setup_mode_config() 126 struct drm_device *drm = data; in aspeed_gfx_irq_handler() local 127 struct aspeed_gfx *priv = to_aspeed_gfx(drm); in aspeed_gfx_irq_handler() 141 static int aspeed_gfx_load(struct drm_device *drm) in aspeed_gfx_load() argument [all …]
|
/linux/drivers/gpu/drm/exynos/ |
H A D | exynos_drm_drv.c | 242 struct drm_device *drm; in exynos_drm_bind() local 246 drm = drm_dev_alloc(&exynos_drm_driver, dev); in exynos_drm_bind() 247 if (IS_ERR(drm)) in exynos_drm_bind() 248 return PTR_ERR(drm); in exynos_drm_bind() 259 dev_set_drvdata(dev, drm); in exynos_drm_bind() 260 drm->dev_private = (void *)private; in exynos_drm_bind() 262 drm_mode_config_init(drm); in exynos_drm_bind() 264 exynos_drm_mode_config_init(drm); in exynos_drm_bind() 268 list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) in exynos_drm_bind() 271 list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) in exynos_drm_bind() [all …]
|
/linux/drivers/gpu/drm/sun4i/ |
H A D | sun4i_drv.c | 35 struct drm_device *drm, in drm_sun4i_gem_dumb_create() argument 41 return drm_gem_dma_dumb_create_internal(file_priv, drm, args); in drm_sun4i_gem_dumb_create() 64 struct drm_device *drm; in sun4i_drv_bind() local 68 drm = drm_dev_alloc(&sun4i_drv_driver, dev); in sun4i_drv_bind() 69 if (IS_ERR(drm)) in sun4i_drv_bind() 70 return PTR_ERR(drm); in sun4i_drv_bind() 78 drm->dev_private = drv; in sun4i_drv_bind() 85 dev_err(drm->dev, "Couldn't claim our memory region\n"); in sun4i_drv_bind() 89 drm_mode_config_init(drm); in sun4i_drv_bind() 91 ret = component_bind_all(drm->dev, drm); in sun4i_drv_bind() [all …]
|
/linux/Documentation/gpu/ |
H A D | panfrost.rst | 4 drm/Panfrost Mali Driver 12 The drm/Panfrost driver implements the DRM client usage stats specification as 13 documented in :ref:`drm-client-usage-stats`. 23 drm-driver: panfrost 24 drm-client-id: 14 25 drm-engine-fragment: 1846584880 ns 26 drm-cycles-fragment: 1424359409 27 drm-maxfreq-fragment: 799999987 Hz 28 drm-curfreq-fragment: 799999987 Hz 29 drm-engine-vertex-tiler: 71932239 ns [all …]
|
/linux/drivers/gpu/drm/mcde/ |
H A D | mcde_drv.c | 128 static int mcde_modeset_init(struct drm_device *drm) in mcde_modeset_init() argument 131 struct mcde *mcde = to_mcde(drm); in mcde_modeset_init() 146 ret = drm_of_find_panel_or_bridge(drm->dev->of_node, in mcde_modeset_init() 149 dev_err(drm->dev, in mcde_modeset_init() 157 dev_err(drm->dev, in mcde_modeset_init() 167 mode_config = &drm->mode_config; in mcde_modeset_init() 176 ret = drm_vblank_init(drm, 1); in mcde_modeset_init() 178 dev_err(drm->dev, "failed to init vblank\n"); in mcde_modeset_init() 182 ret = mcde_display_init(drm); in mcde_modeset_init() 184 dev_err(drm->dev, "failed to init display\n"); in mcde_modeset_init() [all …]
|
/linux/drivers/gpu/drm/armada/ |
H A D | armada_drv.c | 88 struct armada_private, drm); in armada_drm_bind() 103 dev_set_drvdata(dev, &priv->drm); in armada_drm_bind() 106 drm_mode_config_init(&priv->drm); in armada_drm_bind() 107 priv->drm.mode_config.min_width = 320; in armada_drm_bind() 108 priv->drm.mode_config.min_height = 200; in armada_drm_bind() 114 priv->drm.mode_config.max_width = 1920; in armada_drm_bind() 115 priv->drm.mode_config.max_height = 2048; in armada_drm_bind() 117 priv->drm.mode_config.preferred_depth = 24; in armada_drm_bind() 118 priv->drm.mode_config.funcs = &armada_drm_mode_config_funcs; in armada_drm_bind() 122 ret = component_bind_all(dev, &priv->drm); in armada_drm_bind() [all …]
|
/linux/drivers/gpu/drm/tegra/ |
H A D | drm.c | 46 static int tegra_atomic_check(struct drm_device *drm, in tegra_atomic_check() argument 51 err = drm_atomic_helper_check(drm, state); in tegra_atomic_check() 55 return tegra_display_hub_atomic_check(drm, state); in tegra_atomic_check() 64 static void tegra_atomic_post_commit(struct drm_device *drm, in tegra_atomic_post_commit() argument 77 struct drm_device *drm = old_state->dev; in tegra_atomic_commit_tail() local 78 struct tegra_drm *tegra = drm->dev_private; in tegra_atomic_commit_tail() 83 drm_atomic_helper_commit_modeset_disables(drm, old_state); in tegra_atomic_commit_tail() 84 tegra_display_hub_atomic_commit(drm, old_state); in tegra_atomic_commit_tail() 85 drm_atomic_helper_commit_planes(drm, old_state, 0); in tegra_atomic_commit_tail() 86 drm_atomic_helper_commit_modeset_enables(drm, old_state); in tegra_atomic_commit_tail() [all …]
|
/linux/drivers/gpu/drm/tests/ |
H A D | drm_hdmi_state_helper_test.c | 30 struct drm_device drm; member 45 struct drm_device *drm = connector->dev; in find_preferred_mode() local 48 mutex_lock(&drm->mode_config.mutex); in find_preferred_mode() 53 mutex_unlock(&drm->mode_config.mutex); in find_preferred_mode() 59 struct drm_device *drm, in light_up_connector() argument 70 state = drm_kunit_helper_atomic_state_alloc(test, drm, ctx); in light_up_connector() 99 struct drm_device *drm = connector->dev; in set_connector_edid() local 105 mutex_lock(&drm->mode_config.mutex); in set_connector_edid() 107 mutex_unlock(&drm->mode_config.mutex); in set_connector_edid() 174 struct drm_device *drm; in drm_atomic_helper_connector_hdmi_init() local [all …]
|