Lines Matching defs:ldev

39 	struct lima_device *ldev = to_lima_dev(dev);
46 switch (ldev->id) {
60 args->value = ldev->pipe[lima_pipe_pp].num_processor;
64 args->value = ldev->gp_version;
68 args->value = ldev->pp_version;
104 struct lima_device *ldev = to_lima_dev(dev);
120 pipe = ldev->pipe + args->pipe;
192 struct lima_device *ldev = to_lima_dev(dev);
197 return lima_ctx_create(ldev, &priv->ctx_mgr, &args->id);
215 struct lima_device *ldev = to_lima_dev(dev);
221 priv->vm = lima_vm_create(ldev);
320 struct lima_device *ldev = dev_get_drvdata(dev);
328 mutex_lock(&ldev->error_task_list_lock);
330 if (lima_read_block(&reader, &ldev->dump, sizeof(ldev->dump))) {
331 list_for_each_entry(et, &ldev->error_task_list, list) {
337 mutex_unlock(&ldev->error_task_list_lock);
346 struct lima_device *ldev = dev_get_drvdata(dev);
349 mutex_lock(&ldev->error_task_list_lock);
351 list_for_each_entry_safe(et, tmp, &ldev->error_task_list, list) {
356 ldev->dump.size = 0;
357 ldev->dump.num_tasks = 0;
359 mutex_unlock(&ldev->error_task_list_lock);
374 struct lima_device *ldev;
382 ldev = devm_kzalloc(&pdev->dev, sizeof(*ldev), GFP_KERNEL);
383 if (!ldev) {
388 ldev->dev = &pdev->dev;
389 ldev->id = (enum lima_gpu_id)of_device_get_match_data(&pdev->dev);
391 platform_set_drvdata(pdev, ldev);
400 ddev->dev_private = ldev;
401 ldev->ddev = ddev;
403 err = lima_device_init(ldev);
407 err = lima_devfreq_init(ldev);
413 pm_runtime_set_active(ldev->dev);
414 pm_runtime_mark_last_busy(ldev->dev);
415 pm_runtime_set_autosuspend_delay(ldev->dev, 200);
416 pm_runtime_use_autosuspend(ldev->dev);
417 pm_runtime_enable(ldev->dev);
427 if (sysfs_create_bin_file(&ldev->dev->kobj, &lima_error_state_attr))
428 dev_warn(ldev->dev, "fail to create error state sysfs\n");
433 pm_runtime_disable(ldev->dev);
434 lima_devfreq_fini(ldev);
436 lima_device_fini(ldev);
446 struct lima_device *ldev = platform_get_drvdata(pdev);
447 struct drm_device *ddev = ldev->ddev;
449 sysfs_remove_bin_file(&ldev->dev->kobj, &lima_error_state_attr);
454 pm_runtime_set_autosuspend_delay(ldev->dev, -1);
455 pm_runtime_disable(ldev->dev);
457 lima_devfreq_fini(ldev);
458 lima_device_fini(ldev);