Lines Matching refs:gr3d

25 struct gr3d {  struct
38 static inline struct gr3d *to_gr3d(struct tegra_drm_client *client) in to_gr3d() argument
40 return container_of(client, struct gr3d, client); in to_gr3d()
48 struct gr3d *gr3d = to_gr3d(drm); in gr3d_init() local
51 gr3d->channel = host1x_channel_request(client); in gr3d_init()
52 if (!gr3d->channel) in gr3d_init()
81 host1x_channel_put(gr3d->channel); in gr3d_init()
89 struct gr3d *gr3d = to_gr3d(drm); in gr3d_exit() local
98 host1x_channel_put(gr3d->channel); in gr3d_exit()
111 struct gr3d *gr3d = to_gr3d(client); in gr3d_open_channel() local
113 context->channel = host1x_channel_get(gr3d->channel); in gr3d_open_channel()
127 struct gr3d *gr3d = dev_get_drvdata(dev); in gr3d_is_addr_reg() local
140 if (test_bit(offset, gr3d->addr_regs)) in gr3d_is_addr_reg()
285 struct gr3d *gr3d; in gr3d_probe() local
289 gr3d = devm_kzalloc(&pdev->dev, sizeof(*gr3d), GFP_KERNEL); in gr3d_probe()
290 if (!gr3d) in gr3d_probe()
293 gr3d->soc = of_device_get_match_data(&pdev->dev); in gr3d_probe()
299 gr3d->clk = devm_clk_get(&pdev->dev, NULL); in gr3d_probe()
300 if (IS_ERR(gr3d->clk)) { in gr3d_probe()
302 return PTR_ERR(gr3d->clk); in gr3d_probe()
305 gr3d->rst = devm_reset_control_get(&pdev->dev, "3d"); in gr3d_probe()
306 if (IS_ERR(gr3d->rst)) { in gr3d_probe()
308 return PTR_ERR(gr3d->rst); in gr3d_probe()
312 gr3d->clk_secondary = devm_clk_get(&pdev->dev, "3d2"); in gr3d_probe()
313 if (IS_ERR(gr3d->clk_secondary)) { in gr3d_probe()
315 return PTR_ERR(gr3d->clk_secondary); in gr3d_probe()
318 gr3d->rst_secondary = devm_reset_control_get(&pdev->dev, in gr3d_probe()
320 if (IS_ERR(gr3d->rst_secondary)) { in gr3d_probe()
322 return PTR_ERR(gr3d->rst_secondary); in gr3d_probe()
326 err = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_3D, gr3d->clk, in gr3d_probe()
327 gr3d->rst); in gr3d_probe()
333 if (gr3d->clk_secondary) { in gr3d_probe()
335 gr3d->clk_secondary, in gr3d_probe()
336 gr3d->rst_secondary); in gr3d_probe()
344 INIT_LIST_HEAD(&gr3d->client.base.list); in gr3d_probe()
345 gr3d->client.base.ops = &gr3d_client_ops; in gr3d_probe()
346 gr3d->client.base.dev = &pdev->dev; in gr3d_probe()
347 gr3d->client.base.class = HOST1X_CLASS_GR3D; in gr3d_probe()
348 gr3d->client.base.syncpts = syncpts; in gr3d_probe()
349 gr3d->client.base.num_syncpts = 1; in gr3d_probe()
351 INIT_LIST_HEAD(&gr3d->client.list); in gr3d_probe()
352 gr3d->client.version = gr3d->soc->version; in gr3d_probe()
353 gr3d->client.ops = &gr3d_ops; in gr3d_probe()
355 err = host1x_client_register(&gr3d->client.base); in gr3d_probe()
364 set_bit(gr3d_addr_regs[i], gr3d->addr_regs); in gr3d_probe()
366 platform_set_drvdata(pdev, gr3d); in gr3d_probe()
373 struct gr3d *gr3d = platform_get_drvdata(pdev); in gr3d_remove() local
376 err = host1x_client_unregister(&gr3d->client.base); in gr3d_remove()
383 if (gr3d->clk_secondary) { in gr3d_remove()
384 reset_control_assert(gr3d->rst_secondary); in gr3d_remove()
386 clk_disable_unprepare(gr3d->clk_secondary); in gr3d_remove()
389 reset_control_assert(gr3d->rst); in gr3d_remove()
391 clk_disable_unprepare(gr3d->clk); in gr3d_remove()