Skip to content

Commit a1cd348

Browse files
committed
Merge tag 'drm/tegra/for-5.8-rc3' of git://anongit.freedesktop.org/tegra/linux into drm-fixes
drm/tegra: Fixes for v5.8-rc3 This contains a fairly random assortment of fixes for various minor issues. Signed-off-by: Dave Airlie <[email protected]> From: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 5107683 + fce3a51 commit a1cd348

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

drivers/gpu/drm/tegra/dc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
957957
}
958958

959959
drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
960+
drm_plane_create_zpos_immutable_property(&plane->base, 255);
960961

961962
return &plane->base;
962963
}

drivers/gpu/drm/tegra/hub.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ int tegra_display_hub_prepare(struct tegra_display_hub *hub)
149149
for (i = 0; i < hub->soc->num_wgrps; i++) {
150150
struct tegra_windowgroup *wgrp = &hub->wgrps[i];
151151

152-
tegra_windowgroup_enable(wgrp);
152+
/* Skip orphaned window group whose parent DC is disabled */
153+
if (wgrp->parent)
154+
tegra_windowgroup_enable(wgrp);
153155
}
154156

155157
return 0;
@@ -166,7 +168,9 @@ void tegra_display_hub_cleanup(struct tegra_display_hub *hub)
166168
for (i = 0; i < hub->soc->num_wgrps; i++) {
167169
struct tegra_windowgroup *wgrp = &hub->wgrps[i];
168170

169-
tegra_windowgroup_disable(wgrp);
171+
/* Skip orphaned window group whose parent DC is disabled */
172+
if (wgrp->parent)
173+
tegra_windowgroup_disable(wgrp);
170174
}
171175
}
172176

@@ -944,6 +948,15 @@ static int tegra_display_hub_probe(struct platform_device *pdev)
944948
dev_err(&pdev->dev, "failed to register host1x client: %d\n",
945949
err);
946950

951+
err = devm_of_platform_populate(&pdev->dev);
952+
if (err < 0)
953+
goto unregister;
954+
955+
return err;
956+
957+
unregister:
958+
host1x_client_unregister(&hub->client);
959+
pm_runtime_disable(&pdev->dev);
947960
return err;
948961
}
949962

drivers/gpu/host1x/bus.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,17 @@ EXPORT_SYMBOL(host1x_driver_register_full);
686686
*/
687687
void host1x_driver_unregister(struct host1x_driver *driver)
688688
{
689+
struct host1x *host1x;
690+
689691
driver_unregister(&driver->driver);
690692

693+
mutex_lock(&devices_lock);
694+
695+
list_for_each_entry(host1x, &devices, list)
696+
host1x_detach_driver(host1x, driver);
697+
698+
mutex_unlock(&devices_lock);
699+
691700
mutex_lock(&drivers_lock);
692701
list_del_init(&driver->list);
693702
mutex_unlock(&drivers_lock);

drivers/gpu/host1x/dev.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,18 @@ static int host1x_probe(struct platform_device *pdev)
468468

469469
err = host1x_register(host);
470470
if (err < 0)
471-
goto deinit_intr;
471+
goto deinit_debugfs;
472+
473+
err = devm_of_platform_populate(&pdev->dev);
474+
if (err < 0)
475+
goto unregister;
472476

473477
return 0;
474478

475-
deinit_intr:
479+
unregister:
480+
host1x_unregister(host);
481+
deinit_debugfs:
482+
host1x_debug_deinit(host);
476483
host1x_intr_deinit(host);
477484
deinit_syncpt:
478485
host1x_syncpt_deinit(host);

include/linux/host1x.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ struct host1x_client_ops {
4848
* @channel: host1x channel associated with this client
4949
* @syncpts: array of syncpoints requested for this client
5050
* @num_syncpts: number of syncpoints requested for this client
51+
* @parent: pointer to parent structure
52+
* @usecount: reference count for this structure
53+
* @lock: mutex for mutually exclusive concurrency
5154
*/
5255
struct host1x_client {
5356
struct list_head list;

0 commit comments

Comments
 (0)