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

Merge tag 'drm/tegra/for-5.19-rc1' of https://gitlab.freedesktop.org/drm/tegra into drm-next

drm/tegra: Changes for v5.19-rc1

Only a few fixes this time, and some debuggability improvements.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220506164004.3922226-1-thierry.reding@gmail.com

+18 -9
+1
drivers/gpu/drm/tegra/gem.c
··· 88 88 if (IS_ERR(map->sgt)) { 89 89 dma_buf_detach(buf, map->attach); 90 90 err = PTR_ERR(map->sgt); 91 + map->sgt = NULL; 91 92 goto free; 92 93 } 93 94
+2 -3
drivers/gpu/drm/tegra/vic.c
··· 513 513 } 514 514 515 515 static const struct dev_pm_ops vic_pm_ops = { 516 - SET_RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) 517 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 518 - pm_runtime_force_resume) 516 + RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) 517 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 519 518 }; 520 519 521 520 struct platform_driver tegra_vic_driver = {
+7 -4
drivers/gpu/host1x/debug.c
··· 75 75 return 0; 76 76 } 77 77 78 - static void show_syncpts(struct host1x *m, struct output *o) 78 + static void show_syncpts(struct host1x *m, struct output *o, bool show_all) 79 79 { 80 80 struct list_head *pos; 81 81 unsigned int i; ··· 97 97 waiters++; 98 98 spin_unlock(&m->syncpt[i].intr.lock); 99 99 100 - if (!min && !max && !waiters) 100 + if (!kref_read(&m->syncpt[i].ref)) 101 + continue; 102 + 103 + if (!show_all && !min && !max && !waiters) 101 104 continue; 102 105 103 106 host1x_debug_output(o, ··· 127 124 unsigned int i; 128 125 129 126 host1x_hw_show_mlocks(m, o); 130 - show_syncpts(m, o); 127 + show_syncpts(m, o, true); 131 128 host1x_debug_output(o, "---- channels ----\n"); 132 129 133 130 for (i = 0; i < m->info->nb_channels; ++i) { ··· 244 241 .fn = write_to_printk 245 242 }; 246 243 247 - show_syncpts(host1x, &o); 244 + show_syncpts(host1x, &o, false); 248 245 }
+2 -2
drivers/gpu/host1x/job.c
··· 175 175 goto unpin; 176 176 } 177 177 178 - map = host1x_bo_pin(dev, bo, direction, &client->cache); 178 + map = host1x_bo_pin(dev, bo, direction, NULL); 179 179 if (IS_ERR(map)) { 180 180 err = PTR_ERR(map); 181 181 goto unpin; ··· 222 222 goto unpin; 223 223 } 224 224 225 - map = host1x_bo_pin(host->dev, g->bo, DMA_TO_DEVICE, &host->cache); 225 + map = host1x_bo_pin(host->dev, g->bo, DMA_TO_DEVICE, NULL); 226 226 if (IS_ERR(map)) { 227 227 err = PTR_ERR(map); 228 228 goto unpin;
+6
include/linux/host1x.h
··· 31 31 * struct host1x_bo_cache - host1x buffer object cache 32 32 * @mappings: list of mappings 33 33 * @lock: synchronizes accesses to the list of mappings 34 + * 35 + * Note that entries are not periodically evicted from this cache and instead need to be 36 + * explicitly released. This is used primarily for DRM/KMS where the cache's reference is 37 + * released when the last reference to a buffer object represented by a mapping in this 38 + * cache is dropped. 34 39 */ 35 40 struct host1x_bo_cache { 36 41 struct list_head mappings; ··· 86 81 * @parent: pointer to parent structure 87 82 * @usecount: reference count for this structure 88 83 * @lock: mutex for mutually exclusive concurrency 84 + * @cache: host1x buffer object cache 89 85 */ 90 86 struct host1x_client { 91 87 struct list_head list;