• Home
  • Raw
  • Download

Lines Matching refs:pipe

31 static int query_param(struct fd_pipe *pipe, uint32_t param,  in query_param()  argument
34 struct msm_pipe *msm_pipe = to_msm_pipe(pipe); in query_param()
36 .pipe = msm_pipe->pipe, in query_param()
41 ret = drmCommandWriteRead(pipe->dev->fd, DRM_MSM_GET_PARAM, in query_param()
51 static int query_queue_param(struct fd_pipe *pipe, uint32_t param, in query_queue_param() argument
54 struct msm_pipe *msm_pipe = to_msm_pipe(pipe); in query_queue_param()
63 ret = drmCommandWriteRead(pipe->dev->fd, DRM_MSM_SUBMITQUEUE_QUERY, in query_queue_param()
71 static int msm_pipe_get_param(struct fd_pipe *pipe, in msm_pipe_get_param() argument
74 struct msm_pipe *msm_pipe = to_msm_pipe(pipe); in msm_pipe_get_param()
90 return query_param(pipe, MSM_PARAM_MAX_FREQ, value); in msm_pipe_get_param()
92 return query_param(pipe, MSM_PARAM_TIMESTAMP, value); in msm_pipe_get_param()
94 return query_param(pipe, MSM_PARAM_NR_RINGS, value); in msm_pipe_get_param()
96 return query_param(pipe, MSM_PARAM_PP_PGTABLE, value); in msm_pipe_get_param()
98 return query_queue_param(pipe, MSM_SUBMITQUEUE_PARAM_FAULTS, value); in msm_pipe_get_param()
100 return query_param(pipe, MSM_PARAM_FAULTS, value); in msm_pipe_get_param()
107 static int msm_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp, in msm_pipe_wait() argument
110 struct fd_device *dev = pipe->dev; in msm_pipe_wait()
113 .queueid = to_msm_pipe(pipe)->queue_id, in msm_pipe_wait()
128 static int open_submitqueue(struct fd_pipe *pipe, uint32_t prio) in open_submitqueue() argument
137 if (fd_device_version(pipe->dev) < FD_VERSION_SUBMIT_QUEUES) { in open_submitqueue()
138 to_msm_pipe(pipe)->queue_id = 0; in open_submitqueue()
142 msm_pipe_get_param(pipe, FD_NR_RINGS, &nr_rings); in open_submitqueue()
146 ret = drmCommandWriteRead(pipe->dev->fd, DRM_MSM_SUBMITQUEUE_NEW, in open_submitqueue()
153 to_msm_pipe(pipe)->queue_id = req.id; in open_submitqueue()
157 static void close_submitqueue(struct fd_pipe *pipe, uint32_t queue_id) in close_submitqueue() argument
159 if (fd_device_version(pipe->dev) < FD_VERSION_SUBMIT_QUEUES) in close_submitqueue()
162 drmCommandWrite(pipe->dev->fd, DRM_MSM_SUBMITQUEUE_CLOSE, in close_submitqueue()
166 static void msm_pipe_destroy(struct fd_pipe *pipe) in msm_pipe_destroy() argument
168 struct msm_pipe *msm_pipe = to_msm_pipe(pipe); in msm_pipe_destroy()
169 close_submitqueue(pipe, msm_pipe->queue_id); in msm_pipe_destroy()
190 static uint64_t get_param(struct fd_pipe *pipe, uint32_t param) in get_param() argument
193 int ret = query_param(pipe, param, &value); in get_param()
209 struct fd_pipe *pipe = NULL; in msm_pipe_new() local
217 pipe = &msm_pipe->base; in msm_pipe_new()
220 pipe->funcs = &sp_funcs; in msm_pipe_new()
222 pipe->funcs = &legacy_funcs; in msm_pipe_new()
226 pipe->dev = dev; in msm_pipe_new()
227 msm_pipe->pipe = pipe_id[id]; in msm_pipe_new()
230 msm_pipe->gpu_id = get_param(pipe, MSM_PARAM_GPU_ID); in msm_pipe_new()
231 msm_pipe->gmem = get_param(pipe, MSM_PARAM_GMEM_SIZE); in msm_pipe_new()
232 msm_pipe->chip_id = get_param(pipe, MSM_PARAM_CHIP_ID); in msm_pipe_new()
234 if (fd_device_version(pipe->dev) >= FD_VERSION_GMEM_BASE) in msm_pipe_new()
235 msm_pipe->gmem_base = get_param(pipe, MSM_PARAM_GMEM_BASE); in msm_pipe_new()
245 if (open_submitqueue(pipe, prio)) in msm_pipe_new()
250 return pipe; in msm_pipe_new()
252 if (pipe) in msm_pipe_new()
253 fd_pipe_del(pipe); in msm_pipe_new()