dc.c (47b15779b03bf70ca5a315775d2b171c7913ebc3) | dc.c (aacdf19849734d1be5e407932228ae101ba5b92f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2012 Avionic Design GmbH 4 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. 5 */ 6 7#include <linux/clk.h> 8#include <linux/debugfs.h> --- 2000 unchanged lines hidden (view full) --- 2009 */ 2010 if (!tegra_dc_has_window_groups(dc)) 2011 return 0; 2012 2013 dc->syncpt = host1x_syncpt_request(client, flags); 2014 if (!dc->syncpt) 2015 dev_warn(dc->dev, "failed to allocate syncpoint\n"); 2016 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2012 Avionic Design GmbH 4 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. 5 */ 6 7#include <linux/clk.h> 8#include <linux/debugfs.h> --- 2000 unchanged lines hidden (view full) --- 2009 */ 2010 if (!tegra_dc_has_window_groups(dc)) 2011 return 0; 2012 2013 dc->syncpt = host1x_syncpt_request(client, flags); 2014 if (!dc->syncpt) 2015 dev_warn(dc->dev, "failed to allocate syncpoint\n"); 2016 |
2017 dc->group = host1x_client_iommu_attach(client, true); 2018 if (IS_ERR(dc->group)) { 2019 err = PTR_ERR(dc->group); | 2017 err = host1x_client_iommu_attach(client, true); 2018 if (err < 0) { |
2020 dev_err(client->dev, "failed to attach to domain: %d\n", err); 2021 return err; 2022 } 2023 2024 if (dc->soc->wgrps) 2025 primary = tegra_dc_add_shared_planes(drm, dc); 2026 else 2027 primary = tegra_dc_add_planes(drm, dc); --- 56 unchanged lines hidden (view full) --- 2084 2085cleanup: 2086 if (!IS_ERR_OR_NULL(cursor)) 2087 drm_plane_cleanup(cursor); 2088 2089 if (!IS_ERR(primary)) 2090 drm_plane_cleanup(primary); 2091 | 2019 dev_err(client->dev, "failed to attach to domain: %d\n", err); 2020 return err; 2021 } 2022 2023 if (dc->soc->wgrps) 2024 primary = tegra_dc_add_shared_planes(drm, dc); 2025 else 2026 primary = tegra_dc_add_planes(drm, dc); --- 56 unchanged lines hidden (view full) --- 2083 2084cleanup: 2085 if (!IS_ERR_OR_NULL(cursor)) 2086 drm_plane_cleanup(cursor); 2087 2088 if (!IS_ERR(primary)) 2089 drm_plane_cleanup(primary); 2090 |
2092 host1x_client_iommu_detach(client, dc->group); | 2091 host1x_client_iommu_detach(client); |
2093 host1x_syncpt_free(dc->syncpt); 2094 2095 return err; 2096} 2097 2098static int tegra_dc_exit(struct host1x_client *client) 2099{ 2100 struct tegra_dc *dc = host1x_client_to_dc(client); --- 8 unchanged lines hidden (view full) --- 2109 devm_free_irq(dc->dev, dc->irq, dc); 2110 2111 err = tegra_dc_rgb_exit(dc); 2112 if (err) { 2113 dev_err(dc->dev, "failed to shutdown RGB output: %d\n", err); 2114 return err; 2115 } 2116 | 2092 host1x_syncpt_free(dc->syncpt); 2093 2094 return err; 2095} 2096 2097static int tegra_dc_exit(struct host1x_client *client) 2098{ 2099 struct tegra_dc *dc = host1x_client_to_dc(client); --- 8 unchanged lines hidden (view full) --- 2108 devm_free_irq(dc->dev, dc->irq, dc); 2109 2110 err = tegra_dc_rgb_exit(dc); 2111 if (err) { 2112 dev_err(dc->dev, "failed to shutdown RGB output: %d\n", err); 2113 return err; 2114 } 2115 |
2117 host1x_client_iommu_detach(client, dc->group); | 2116 host1x_client_iommu_detach(client); |
2118 host1x_syncpt_free(dc->syncpt); 2119 2120 return 0; 2121} 2122 2123static const struct host1x_client_ops dc_client_ops = { 2124 .init = tegra_dc_init, 2125 .exit = tegra_dc_exit, --- 474 unchanged lines hidden --- | 2117 host1x_syncpt_free(dc->syncpt); 2118 2119 return 0; 2120} 2121 2122static const struct host1x_client_ops dc_client_ops = { 2123 .init = tegra_dc_init, 2124 .exit = tegra_dc_exit, --- 474 unchanged lines hidden --- |