Lines Matching refs:gpu
5 #include "s905d2-gpu.h"
6 #include "s912-gpu.h"
21 #include <zircon/device/gpu.h>
25 zx_status_t aml_gp0_init(aml_gpu_t* gpu);
26 void aml_gp0_release(aml_gpu_t* gpu);
30 static void aml_gpu_set_clk_freq_source(aml_gpu_t* gpu, int32_t clk_source) {
36 aml_gpu_block_t* gpu_block = gpu->gpu_block;
63 static void aml_gpu_set_initial_clk_freq_source(aml_gpu_t* gpu, int32_t clk_source) {
64 aml_gpu_block_t* gpu_block = gpu->gpu_block;
70 aml_gpu_set_clk_freq_source(gpu, clk_source);
88 static void aml_gpu_init(aml_gpu_t* gpu) {
90 aml_gpu_block_t* gpu_block = gpu->gpu_block;
112 aml_gpu_set_initial_clk_freq_source(gpu, 2);
127 aml_gpu_t* gpu = ctx;
128 aml_gp0_release(gpu);
129 mmio_buffer_release(&gpu->hiu_buffer);
130 mmio_buffer_release(&gpu->preset_buffer);
131 mmio_buffer_release(&gpu->gpu_buffer);
132 zx_handle_close(gpu->bti);
133 free(gpu);
138 aml_gpu_t* gpu = ctx;
142 gpu_proto->ops = gpu->pdev.ops;
143 gpu_proto->ctx = gpu->pdev.ctx;
151 aml_gpu_t* gpu = ctx;
163 aml_gpu_set_clk_freq_source(gpu, *clk_source);
180 aml_gpu_t* gpu = calloc(1, sizeof(aml_gpu_t));
181 if (!gpu) {
185 if ((status = device_get_protocol(parent, ZX_PROTOCOL_PLATFORM_DEV, &gpu->pdev)) != ZX_OK) {
190 status = pdev_get_bti(&gpu->pdev, 0, &gpu->bti);
196 status = pdev_map_mmio_buffer2(&gpu->pdev, MMIO_GPU, ZX_CACHE_POLICY_UNCACHED_DEVICE,
197 &gpu->gpu_buffer);
203 status = pdev_map_mmio_buffer2(&gpu->pdev, MMIO_HIU, ZX_CACHE_POLICY_UNCACHED_DEVICE,
204 &gpu->hiu_buffer);
210 status = pdev_map_mmio_buffer2(&gpu->pdev, MMIO_PRESET, ZX_CACHE_POLICY_UNCACHED_DEVICE,
211 &gpu->preset_buffer);
218 status = pdev_get_device_info(&gpu->pdev, &info);
226 gpu->gpu_block = &s912_gpu_blocks;
229 gpu->gpu_block = &s905d2_gpu_blocks;
237 status = aml_gp0_init(gpu);
244 aml_gpu_init(gpu);
255 .name = "aml-gpu",
256 .ctx = gpu,
263 status = device_add(parent, &args, &gpu->zxdev);
271 aml_gpu_release(gpu);