Loading drivers/char/adsprpc.c +28 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ #define SDSP_DOMAIN_ID (2) #define CDSP_DOMAIN_ID (3) #define UNSIGNED_PD_SUPPORT 1 /* * ctxid of every message is OR-ed with fl->pd (0/1/2) before * it is sent to DSP. So mask 2 LSBs to retrieve actual context Loading Loading @@ -6149,6 +6150,28 @@ static inline int fastrpc_mmap_device_ioctl(struct fastrpc_file *fl, return err; } static int fastrpc_update_cdsp_support(struct fastrpc_file *fl) { struct fastrpc_ioctl_capability *dsp_query; struct fastrpc_apps *me = &gfa; int err = 0; VERIFY(err, NULL != (dsp_query = kzalloc(sizeof(*dsp_query), GFP_KERNEL))); if (err) goto bail; dsp_query->domain = CDSP_DOMAIN_ID; dsp_query->attribute_ID = UNSIGNED_PD_SUPPORT; err = fastrpc_get_info_from_kernel(dsp_query, fl); if (err) goto bail; if (!dsp_query->capability) me->channel[CDSP_DOMAIN_ID].unsigned_support = false; bail: kfree(dsp_query); return err; } static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param) { Loading @@ -6157,6 +6180,7 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, struct fastrpc_file *fl = (struct fastrpc_file *)file->private_data; int size = 0, err = 0; uint32_t info; static bool isquerydone; p.inv.fds = NULL; p.inv.attrs = NULL; Loading Loading @@ -6255,6 +6279,10 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, VERIFY(err, 0 == (err = fastrpc_init_process(fl, &p.init))); if (err) goto bail; if ((fl->cid == CDSP_DOMAIN_ID) && !isquerydone) { if (!fastrpc_update_cdsp_support(fl)) isquerydone = true; } break; case FASTRPC_IOCTL_GET_DSP_INFO: err = fastrpc_get_dsp_info(&p.cap, param, fl); Loading Loading
drivers/char/adsprpc.c +28 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,7 @@ #define SDSP_DOMAIN_ID (2) #define CDSP_DOMAIN_ID (3) #define UNSIGNED_PD_SUPPORT 1 /* * ctxid of every message is OR-ed with fl->pd (0/1/2) before * it is sent to DSP. So mask 2 LSBs to retrieve actual context Loading Loading @@ -6149,6 +6150,28 @@ static inline int fastrpc_mmap_device_ioctl(struct fastrpc_file *fl, return err; } static int fastrpc_update_cdsp_support(struct fastrpc_file *fl) { struct fastrpc_ioctl_capability *dsp_query; struct fastrpc_apps *me = &gfa; int err = 0; VERIFY(err, NULL != (dsp_query = kzalloc(sizeof(*dsp_query), GFP_KERNEL))); if (err) goto bail; dsp_query->domain = CDSP_DOMAIN_ID; dsp_query->attribute_ID = UNSIGNED_PD_SUPPORT; err = fastrpc_get_info_from_kernel(dsp_query, fl); if (err) goto bail; if (!dsp_query->capability) me->channel[CDSP_DOMAIN_ID].unsigned_support = false; bail: kfree(dsp_query); return err; } static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param) { Loading @@ -6157,6 +6180,7 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, struct fastrpc_file *fl = (struct fastrpc_file *)file->private_data; int size = 0, err = 0; uint32_t info; static bool isquerydone; p.inv.fds = NULL; p.inv.attrs = NULL; Loading Loading @@ -6255,6 +6279,10 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, VERIFY(err, 0 == (err = fastrpc_init_process(fl, &p.init))); if (err) goto bail; if ((fl->cid == CDSP_DOMAIN_ID) && !isquerydone) { if (!fastrpc_update_cdsp_support(fl)) isquerydone = true; } break; case FASTRPC_IOCTL_GET_DSP_INFO: err = fastrpc_get_dsp_info(&p.cap, param, fl); Loading