Lines Matching defs:ldev

40 	struct lima_device *ldev = to_lima_dev(dev);
47 switch (ldev->id) {
61 args->value = ldev->pipe[lima_pipe_pp].num_processor;
65 args->value = ldev->gp_version;
69 args->value = ldev->pp_version;
105 struct lima_device *ldev = to_lima_dev(dev);
121 pipe = ldev->pipe + args->pipe;
193 struct lima_device *ldev = to_lima_dev(dev);
198 return lima_ctx_create(ldev, &priv->ctx_mgr, &args->id);
216 struct lima_device *ldev = to_lima_dev(dev);
222 priv->vm = lima_vm_create(ldev);
318 struct lima_device *ldev = dev_get_drvdata(dev);
326 mutex_lock(&ldev->error_task_list_lock);
328 if (lima_read_block(&reader, &ldev->dump, sizeof(ldev->dump))) {
329 list_for_each_entry(et, &ldev->error_task_list, list) {
335 mutex_unlock(&ldev->error_task_list_lock);
344 struct lima_device *ldev = dev_get_drvdata(dev);
347 mutex_lock(&ldev->error_task_list_lock);
349 list_for_each_entry_safe(et, tmp, &ldev->error_task_list, list) {
354 ldev->dump.size = 0;
355 ldev->dump.num_tasks = 0;
357 mutex_unlock(&ldev->error_task_list_lock);
372 struct lima_device *ldev;
380 ldev = devm_kzalloc(&pdev->dev, sizeof(*ldev), GFP_KERNEL);
381 if (!ldev) {
386 ldev->dev = &pdev->dev;
387 ldev->id = (enum lima_gpu_id)of_device_get_match_data(&pdev->dev);
389 platform_set_drvdata(pdev, ldev);
398 ddev->dev_private = ldev;
399 ldev->ddev = ddev;
401 err = lima_device_init(ldev);
405 err = lima_devfreq_init(ldev);
411 pm_runtime_set_active(ldev->dev);
412 pm_runtime_mark_last_busy(ldev->dev);
413 pm_runtime_set_autosuspend_delay(ldev->dev, 200);
414 pm_runtime_use_autosuspend(ldev->dev);
415 pm_runtime_enable(ldev->dev);
425 if (sysfs_create_bin_file(&ldev->dev->kobj, &lima_error_state_attr))
426 dev_warn(ldev->dev, "fail to create error state sysfs\n");
431 pm_runtime_disable(ldev->dev);
432 lima_devfreq_fini(ldev);
434 lima_device_fini(ldev);
444 struct lima_device *ldev = platform_get_drvdata(pdev);
445 struct drm_device *ddev = ldev->ddev;
447 sysfs_remove_bin_file(&ldev->dev->kobj, &lima_error_state_attr);
452 pm_runtime_set_autosuspend_delay(ldev->dev, -1);
453 pm_runtime_disable(ldev->dev);
455 lima_devfreq_fini(ldev);
456 lima_device_fini(ldev);