aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r--drivers/gpu/drm/tegra/dc.c16
-rw-r--r--drivers/gpu/drm/tegra/drm.c1
-rw-r--r--drivers/gpu/drm/tegra/dsi.c1
-rw-r--r--drivers/gpu/drm/tegra/plane.c9
4 files changed, 20 insertions, 7 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index b8403ed48285..fbffe1948b3b 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1903,8 +1903,12 @@ cleanup:
1903 if (!IS_ERR(primary)) 1903 if (!IS_ERR(primary))
1904 drm_plane_cleanup(primary); 1904 drm_plane_cleanup(primary);
1905 1905
1906 if (group && tegra->domain) { 1906 if (group && dc->domain) {
1907 iommu_detach_group(tegra->domain, group); 1907 if (group == tegra->group) {
1908 iommu_detach_group(dc->domain, group);
1909 tegra->group = NULL;
1910 }
1911
1908 dc->domain = NULL; 1912 dc->domain = NULL;
1909 } 1913 }
1910 1914
@@ -1913,8 +1917,10 @@ cleanup:
1913 1917
1914static int tegra_dc_exit(struct host1x_client *client) 1918static int tegra_dc_exit(struct host1x_client *client)
1915{ 1919{
1920 struct drm_device *drm = dev_get_drvdata(client->parent);
1916 struct iommu_group *group = iommu_group_get(client->dev); 1921 struct iommu_group *group = iommu_group_get(client->dev);
1917 struct tegra_dc *dc = host1x_client_to_dc(client); 1922 struct tegra_dc *dc = host1x_client_to_dc(client);
1923 struct tegra_drm *tegra = drm->dev_private;
1918 int err; 1924 int err;
1919 1925
1920 devm_free_irq(dc->dev, dc->irq, dc); 1926 devm_free_irq(dc->dev, dc->irq, dc);
@@ -1926,7 +1932,11 @@ static int tegra_dc_exit(struct host1x_client *client)
1926 } 1932 }
1927 1933
1928 if (group && dc->domain) { 1934 if (group && dc->domain) {
1929 iommu_detach_group(dc->domain, group); 1935 if (group == tegra->group) {
1936 iommu_detach_group(dc->domain, group);
1937 tegra->group = NULL;
1938 }
1939
1930 dc->domain = NULL; 1940 dc->domain = NULL;
1931 } 1941 }
1932 1942
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index d50bddb2e447..7fcf4a242840 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -250,6 +250,7 @@ static void tegra_drm_unload(struct drm_device *drm)
250 250
251 drm_kms_helper_poll_fini(drm); 251 drm_kms_helper_poll_fini(drm);
252 tegra_drm_fb_exit(drm); 252 tegra_drm_fb_exit(drm);
253 drm_atomic_helper_shutdown(drm);
253 drm_mode_config_cleanup(drm); 254 drm_mode_config_cleanup(drm);
254 255
255 err = host1x_device_exit(device); 256 err = host1x_device_exit(device);
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 4d2ed966f9e3..87c5d89bc9ba 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -1072,7 +1072,6 @@ static int tegra_dsi_exit(struct host1x_client *client)
1072 struct tegra_dsi *dsi = host1x_client_to_dsi(client); 1072 struct tegra_dsi *dsi = host1x_client_to_dsi(client);
1073 1073
1074 tegra_output_exit(&dsi->output); 1074 tegra_output_exit(&dsi->output);
1075 regulator_disable(dsi->vdd);
1076 1075
1077 return 0; 1076 return 0;
1078} 1077}
diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c
index 36a06a993698..94dac79ac3c9 100644
--- a/drivers/gpu/drm/tegra/plane.c
+++ b/drivers/gpu/drm/tegra/plane.c
@@ -297,6 +297,10 @@ int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha)
297 case WIN_COLOR_DEPTH_B8G8R8X8: 297 case WIN_COLOR_DEPTH_B8G8R8X8:
298 *alpha = WIN_COLOR_DEPTH_B8G8R8A8; 298 *alpha = WIN_COLOR_DEPTH_B8G8R8A8;
299 return 0; 299 return 0;
300
301 case WIN_COLOR_DEPTH_B5G6R5:
302 *alpha = opaque;
303 return 0;
300 } 304 }
301 305
302 return -EINVAL; 306 return -EINVAL;
@@ -330,9 +334,6 @@ void tegra_plane_check_dependent(struct tegra_plane *tegra,
330 unsigned int zpos[2]; 334 unsigned int zpos[2];
331 unsigned int i; 335 unsigned int i;
332 336
333 for (i = 0; i < 3; i++)
334 state->dependent[i] = false;
335
336 for (i = 0; i < 2; i++) 337 for (i = 0; i < 2; i++)
337 zpos[i] = 0; 338 zpos[i] = 0;
338 339
@@ -346,6 +347,8 @@ void tegra_plane_check_dependent(struct tegra_plane *tegra,
346 347
347 index = tegra_plane_get_overlap_index(tegra, p); 348 index = tegra_plane_get_overlap_index(tegra, p);
348 349
350 state->dependent[index] = false;
351
349 /* 352 /*
350 * If any of the other planes is on top of this plane and uses 353 * If any of the other planes is on top of this plane and uses
351 * a format with an alpha component, mark this plane as being 354 * a format with an alpha component, mark this plane as being