Loading drivers/media/platform/msm/vidc/venus_hfi.c +9 −1 Original line number Diff line number Diff line Loading @@ -932,7 +932,7 @@ static int __alloc_imem(struct venus_hfi_device *device, unsigned long size) struct imem *imem = NULL; int rc = 0; if (!device || !size) if (!device) return -EINVAL; imem = &device->resources.imem; Loading Loading @@ -963,6 +963,10 @@ static int __alloc_imem(struct venus_hfi_device *device, unsigned long size) imem->vmem = vmem_buffer; break; } case IMEM_NONE: rc = 0; break; default: rc = -ENOTSUPP; goto imem_alloc_failed; Loading Loading @@ -1026,6 +1030,10 @@ static int __set_imem(struct venus_hfi_device *device, struct imem *imem) rhdr.resource_id = VIDC_RESOURCE_VMEM; addr = imem->vmem; break; case IMEM_NONE: dprintk(VIDC_DBG, "%s Target does not support IMEM", __func__); rc = 0; goto imem_set_failed; default: dprintk(VIDC_ERR, "IMEM of type %d unsupported\n", imem->type); rc = -ENOTSUPP; Loading drivers/media/platform/msm/vidc/vmem/vmem.c +5 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,11 @@ int vmem_allocate(size_t size, phys_addr_t *addr) rc = -ENOTSUPP; goto exit; } if (!size) { pr_err("%s Invalid size %ld\n", __func__, size); rc = -EINVAL; goto exit; } max_size = resource_size(vmem->mem.resource); Loading Loading
drivers/media/platform/msm/vidc/venus_hfi.c +9 −1 Original line number Diff line number Diff line Loading @@ -932,7 +932,7 @@ static int __alloc_imem(struct venus_hfi_device *device, unsigned long size) struct imem *imem = NULL; int rc = 0; if (!device || !size) if (!device) return -EINVAL; imem = &device->resources.imem; Loading Loading @@ -963,6 +963,10 @@ static int __alloc_imem(struct venus_hfi_device *device, unsigned long size) imem->vmem = vmem_buffer; break; } case IMEM_NONE: rc = 0; break; default: rc = -ENOTSUPP; goto imem_alloc_failed; Loading Loading @@ -1026,6 +1030,10 @@ static int __set_imem(struct venus_hfi_device *device, struct imem *imem) rhdr.resource_id = VIDC_RESOURCE_VMEM; addr = imem->vmem; break; case IMEM_NONE: dprintk(VIDC_DBG, "%s Target does not support IMEM", __func__); rc = 0; goto imem_set_failed; default: dprintk(VIDC_ERR, "IMEM of type %d unsupported\n", imem->type); rc = -ENOTSUPP; Loading
drivers/media/platform/msm/vidc/vmem/vmem.c +5 −0 Original line number Diff line number Diff line Loading @@ -310,6 +310,11 @@ int vmem_allocate(size_t size, phys_addr_t *addr) rc = -ENOTSUPP; goto exit; } if (!size) { pr_err("%s Invalid size %ld\n", __func__, size); rc = -EINVAL; goto exit; } max_size = resource_size(vmem->mem.resource); Loading