static int fimg2d_open(struct inode *inode, struct file *file) { struct fimg2d_context *ctx; unsigned long flags, qflags, count; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) { fimg2d_err("not enough memory for ctx\n"); return -ENOMEM; } file->private_data = (void *)ctx; g2d_spin_lock(&ctrl->bltlock, flags); fimg2d_add_context(ctrl, ctx); count = atomic_read(&ctrl->nctx); g2d_spin_unlock(&ctrl->bltlock, flags); if (count == 1) { g2d_spin_lock(&ctrl->qoslock, qflags); ctrl->pre_qos_lv = G2D_LV3; ctrl->qos_lv = G2D_LV2; g2d_spin_unlock(&ctrl->qoslock, qflags); fimg2d_pm_qos_update(ctrl, FIMG2D_QOS_ON); } else { fimg2d_debug("count:%ld, fimg2d_pm_pos_update is " "already called\n", count); } return 0; }
static int fimg2d_open(struct inode *inode, struct file *file) { struct fimg2d_context *ctx; unsigned long flags, count; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) { fimg2d_err("not enough memory for ctx\n"); return -ENOMEM; } file->private_data = (void *)ctx; g2d_spin_lock(&ctrl->bltlock, flags); fimg2d_add_context(ctrl, ctx); count = atomic_read(&ctrl->nctx); g2d_spin_unlock(&ctrl->bltlock, flags); #ifdef CONFIG_ARM_EXYNOS_IKS_CPUFREQ if (count == 1) { /* mif lock : 800MHz */ pm_qos_update_request(&exynos5_g2d_mif_qos, 800000); pm_qos_update_request(&exynos5_g2d_cpu_qos, 400000); } else fimg2d_debug("count:%ld, pm_qos_update_request() is already called\n", count); #endif return 0; }
static int fimg2d_open(struct inode *inode, struct file *file) { struct fimg2d_context *ctx; unsigned long flags, count; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) { fimg2d_err("not enough memory for ctx\n"); return -ENOMEM; } file->private_data = (void *)ctx; g2d_spin_lock(&ctrl->bltlock, flags); fimg2d_add_context(ctrl, ctx); count = atomic_read(&ctrl->nctx); g2d_spin_unlock(&ctrl->bltlock, flags); if (count == 1) fimg2d_pm_qos_update(ctrl, FIMG2D_QOS_ON); else { #ifdef CONFIG_FIMG2D_USE_BUS_DEVFREQ fimg2d_debug("count:%ld, fimg2d_pm_qos_update(ON,mif,int) is already called\n", count); #endif #ifdef CONFIG_ARM_EXYNOS_IKS_CPUFREQ fimg2d_debug("count:%ld, fimg2d_pm_qos_update(ON,cpu) is already called\n", count); #endif } return 0; }
static int fimg2d_open(struct inode *inode, struct file *file) { struct fimg2d_context *ctx; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) { printk(KERN_ERR "[%s] not enough memory for ctx\n", __func__); return -ENOMEM; } file->private_data = (void *)ctx; ctx->mm = current->mm; fimg2d_debug("ctx %p current pgd %p init_mm pgd %p\n", ctx, (unsigned long *)ctx->mm->pgd, (unsigned long *)init_mm.pgd); fimg2d_add_context(info, ctx); return 0; }