Lines Matching +full:adreno +full:- +full:630
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2013-2014 Red Hat
196 /* Adreno 509 uses the same ZAP as 512 */
378 .revn = 630,
529 if (info->machine && !of_machine_is_compatible(info->machine)) in adreno_info()
531 for (int j = 0; info->chip_ids[j]; j++) in adreno_info()
532 if (info->chip_ids[j] == chip_id) in adreno_info()
541 struct msm_drm_private *priv = dev->dev_private; in adreno_load_gpu()
542 struct platform_device *pdev = priv->gpu_pdev; in adreno_load_gpu()
548 gpu = dev_to_gpu(&pdev->dev); in adreno_load_gpu()
551 dev_err_once(dev->dev, "no GPU device was found\n"); in adreno_load_gpu()
567 if (gpu->funcs->ucode_load) { in adreno_load_gpu()
568 ret = gpu->funcs->ucode_load(gpu); in adreno_load_gpu()
577 pm_runtime_enable(&pdev->dev); in adreno_load_gpu()
579 ret = pm_runtime_get_sync(&pdev->dev); in adreno_load_gpu()
581 pm_runtime_put_noidle(&pdev->dev); in adreno_load_gpu()
582 DRM_DEV_ERROR(dev->dev, "Couldn't power up the GPU: %d\n", ret); in adreno_load_gpu()
586 mutex_lock(&gpu->lock); in adreno_load_gpu()
588 mutex_unlock(&gpu->lock); in adreno_load_gpu()
590 DRM_DEV_ERROR(dev->dev, "gpu hw init failed: %d\n", ret); in adreno_load_gpu()
594 pm_runtime_put_autosuspend(&pdev->dev); in adreno_load_gpu()
597 if (gpu->funcs->debugfs_init) { in adreno_load_gpu()
598 gpu->funcs->debugfs_init(gpu, dev->primary); in adreno_load_gpu()
599 gpu->funcs->debugfs_init(gpu, dev->render); in adreno_load_gpu()
606 pm_runtime_put_sync_suspend(&pdev->dev); in adreno_load_gpu()
608 pm_runtime_disable(&pdev->dev); in adreno_load_gpu()
615 struct device_node *node = dev->of_node; in find_chipid()
619 /* first search the compat strings for qcom,adreno-XYZ.W: */ in find_chipid()
624 if (sscanf(compat, "qcom,adreno-%u.%u", &r, &patch) == 2 || in find_chipid()
625 sscanf(compat, "amd,imageon-%u.%u", &r, &patch) == 2) { in find_chipid()
642 if (sscanf(compat, "qcom,adreno-%08x", chipid) == 1) in find_chipid()
663 struct drm_device *drm = priv->dev; in adreno_bind()
671 dev->platform_data = &config; in adreno_bind()
672 priv->gpu_pdev = to_platform_device(dev); in adreno_bind()
676 dev_warn(drm->dev, "Unknown GPU revision: %"ADRENO_CHIPID_FMT"\n", in adreno_bind()
678 return -ENXIO; in adreno_bind()
685 priv->is_a2xx = info->family < ADRENO_3XX; in adreno_bind()
686 priv->has_cached_coherent = in adreno_bind()
687 !!(info->quirks & ADRENO_QUIRK_HAS_CACHED_COHERENT); in adreno_bind()
689 gpu = info->init(drm); in adreno_bind()
691 dev_warn(drm->dev, "failed to load adreno gpu\n"); in adreno_bind()
711 gpu->funcs->destroy(gpu); in adreno_unbind()
713 priv->gpu_pdev = NULL; in adreno_unbind()
723 /* on imx5, we don't have a top-level mdp/dpu node in adreno_device_register_headless()
729 .id = -1, in adreno_device_register_headless()
744 ret = component_add(&pdev->dev, &a3xx_ops); in adreno_probe()
748 if (of_device_is_compatible(pdev->dev.of_node, "amd,imageon")) in adreno_probe()
756 component_del(&pdev->dev, &a3xx_ops); in adreno_remove()
762 WARN_ON_ONCE(adreno_system_suspend(&pdev->dev)); in adreno_shutdown()
766 { .compatible = "qcom,adreno" },
767 { .compatible = "qcom,adreno-3xx" },
771 { .compatible = "qcom,kgsl-3d0" },
779 return gpu->funcs->pm_resume(gpu); in adreno_runtime_resume()
791 WARN_ON_ONCE(gpu->active_submits); in adreno_runtime_suspend()
793 return gpu->funcs->pm_suspend(gpu); in adreno_runtime_suspend()
808 * faulting/timed-out jobs. We can't really cancel any jobs in suspend_scheduler()
811 for (i = 0; i < gpu->nr_rings; i++) { in suspend_scheduler()
812 struct drm_gpu_scheduler *sched = &gpu->rb[i]->sched; in suspend_scheduler()
813 kthread_park(sched->thread); in suspend_scheduler()
821 for (i = 0; i < gpu->nr_rings; i++) { in resume_scheduler()
822 struct drm_gpu_scheduler *sched = &gpu->rb[i]->sched; in resume_scheduler()
823 kthread_unpark(sched->thread); in resume_scheduler()
837 remaining = wait_event_timeout(gpu->retire_event, in adreno_system_suspend()
838 gpu->active_submits == 0, in adreno_system_suspend()
842 ret = -EBUSY; in adreno_system_suspend()
875 .name = "adreno",