Loading drivers/gpu/msm/kgsl.c +22 −0 Original line number Diff line number Diff line Loading @@ -1362,6 +1362,28 @@ long kgsl_ioctl_device_getproperty(struct kgsl_device_private *dev_priv, kgsl_context_put(context); break; } case KGSL_PROP_SECURE_BUFFER_ALIGNMENT: { unsigned int align; if (param->sizebytes != sizeof(unsigned int)) { result = -EINVAL; break; } /* * XPUv2 impose the constraint of 1MB memory alignment, * on the other hand Hypervisor does not have such * constraints. So driver should fulfill such * requirements when allocating secure memory. */ align = MMU_FEATURE(&dev_priv->device->mmu, KGSL_MMU_HYP_SECURE_ALLOC) ? PAGE_SIZE : SZ_1M; if (copy_to_user(param->value, &align, sizeof(align))) result = -EFAULT; break; } default: if (is_compat_task()) result = dev_priv->device->ftbl->getproperty_compat( Loading include/uapi/linux/msm_kgsl.h +1 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ enum kgsl_timestamp_type { #define KGSL_PROP_HIGHEST_BANK_BIT 0x17 #define KGSL_PROP_DEVICE_BITNESS 0x18 #define KGSL_PROP_DEVICE_QDSS_STM 0x19 #define KGSL_PROP_SECURE_BUFFER_ALIGNMENT 0x23 struct kgsl_shadowprop { unsigned long gpuaddr; Loading Loading
drivers/gpu/msm/kgsl.c +22 −0 Original line number Diff line number Diff line Loading @@ -1362,6 +1362,28 @@ long kgsl_ioctl_device_getproperty(struct kgsl_device_private *dev_priv, kgsl_context_put(context); break; } case KGSL_PROP_SECURE_BUFFER_ALIGNMENT: { unsigned int align; if (param->sizebytes != sizeof(unsigned int)) { result = -EINVAL; break; } /* * XPUv2 impose the constraint of 1MB memory alignment, * on the other hand Hypervisor does not have such * constraints. So driver should fulfill such * requirements when allocating secure memory. */ align = MMU_FEATURE(&dev_priv->device->mmu, KGSL_MMU_HYP_SECURE_ALLOC) ? PAGE_SIZE : SZ_1M; if (copy_to_user(param->value, &align, sizeof(align))) result = -EFAULT; break; } default: if (is_compat_task()) result = dev_priv->device->ftbl->getproperty_compat( Loading
include/uapi/linux/msm_kgsl.h +1 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ enum kgsl_timestamp_type { #define KGSL_PROP_HIGHEST_BANK_BIT 0x17 #define KGSL_PROP_DEVICE_BITNESS 0x18 #define KGSL_PROP_DEVICE_QDSS_STM 0x19 #define KGSL_PROP_SECURE_BUFFER_ALIGNMENT 0x23 struct kgsl_shadowprop { unsigned long gpuaddr; Loading