Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm/tegra/for-4.16-rc7-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-fixes

drm/tegra: Fixes for v4.16-rc7

This contains two small fixes for the alpha blending support that was
merged into v4.16-rc1 and a fix for connector reference leaks caused by
the fact that display pipelines are no longer automatically disabled if
the framebuffer is removed.

Furthermore this contains a fix for a crash on IOMMU detach at driver
unbind time and a regulator enable/disable unbalance fix.

* tag 'drm/tegra/for-4.16-rc7-fixes' of git://anongit.freedesktop.org/tegra/linux:
drm/tegra: Shutdown on driver unbind
drm/tegra: dsi: Don't disable regulator on ->exit()
drm/tegra: dc: Detach IOMMU group from domain only once
drm/tegra: plane: Correct legacy blending
drm/tegra: plane: Fix RGB565 format on older Tegra

+20 -7
+13 -3
drivers/gpu/drm/tegra/dc.c
··· 1903 1903 if (!IS_ERR(primary)) 1904 1904 drm_plane_cleanup(primary); 1905 1905 1906 - if (group && tegra->domain) { 1907 - iommu_detach_group(tegra->domain, group); 1906 + if (group && dc->domain) { 1907 + if (group == tegra->group) { 1908 + iommu_detach_group(dc->domain, group); 1909 + tegra->group = NULL; 1910 + } 1911 + 1908 1912 dc->domain = NULL; 1909 1913 } 1910 1914 ··· 1917 1913 1918 1914 static int tegra_dc_exit(struct host1x_client *client) 1919 1915 { 1916 + struct drm_device *drm = dev_get_drvdata(client->parent); 1920 1917 struct iommu_group *group = iommu_group_get(client->dev); 1921 1918 struct tegra_dc *dc = host1x_client_to_dc(client); 1919 + struct tegra_drm *tegra = drm->dev_private; 1922 1920 int err; 1923 1921 1924 1922 devm_free_irq(dc->dev, dc->irq, dc); ··· 1932 1926 } 1933 1927 1934 1928 if (group && dc->domain) { 1935 - iommu_detach_group(dc->domain, group); 1929 + if (group == tegra->group) { 1930 + iommu_detach_group(dc->domain, group); 1931 + tegra->group = NULL; 1932 + } 1933 + 1936 1934 dc->domain = NULL; 1937 1935 } 1938 1936
+1
drivers/gpu/drm/tegra/drm.c
··· 250 250 251 251 drm_kms_helper_poll_fini(drm); 252 252 tegra_drm_fb_exit(drm); 253 + drm_atomic_helper_shutdown(drm); 253 254 drm_mode_config_cleanup(drm); 254 255 255 256 err = host1x_device_exit(device);
-1
drivers/gpu/drm/tegra/dsi.c
··· 1072 1072 struct tegra_dsi *dsi = host1x_client_to_dsi(client); 1073 1073 1074 1074 tegra_output_exit(&dsi->output); 1075 - regulator_disable(dsi->vdd); 1076 1075 1077 1076 return 0; 1078 1077 }
+6 -3
drivers/gpu/drm/tegra/plane.c
··· 297 297 case WIN_COLOR_DEPTH_B8G8R8X8: 298 298 *alpha = WIN_COLOR_DEPTH_B8G8R8A8; 299 299 return 0; 300 + 301 + case WIN_COLOR_DEPTH_B5G6R5: 302 + *alpha = opaque; 303 + return 0; 300 304 } 301 305 302 306 return -EINVAL; ··· 334 330 unsigned int zpos[2]; 335 331 unsigned int i; 336 332 337 - for (i = 0; i < 3; i++) 338 - state->dependent[i] = false; 339 - 340 333 for (i = 0; i < 2; i++) 341 334 zpos[i] = 0; 342 335 ··· 346 345 continue; 347 346 348 347 index = tegra_plane_get_overlap_index(tegra, p); 348 + 349 + state->dependent[index] = false; 349 350 350 351 /* 351 352 * If any of the other planes is on top of this plane and uses