From patchwork Mon Apr 15 08:54:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 10900335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CF1D1669 for ; Mon, 15 Apr 2019 08:54:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16805288AE for ; Mon, 15 Apr 2019 08:54:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AB5F288C4; Mon, 15 Apr 2019 08:54:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 164BC288B8 for ; Mon, 15 Apr 2019 08:54:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A881892EF; Mon, 15 Apr 2019 08:54:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTPS id E42C8892EA for ; Mon, 15 Apr 2019 08:54:03 +0000 (UTC) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190415085401epoutp03d746c2c79c648db0c6ef91e16a95ade4~VmeHpW4dj0604906049epoutp03J for ; Mon, 15 Apr 2019 08:54:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190415085401epoutp03d746c2c79c648db0c6ef91e16a95ade4~VmeHpW4dj0604906049epoutp03J Received: from epsmges1p5.samsung.com (unknown [182.195.40.153]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190415085359epcas1p23a676781c003d2e01e6a90377e8e8900~VmeFMA5On0839808398epcas1p2O; Mon, 15 Apr 2019 08:53:59 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id BD.00.04108.3A644BC5; Mon, 15 Apr 2019 17:53:55 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190415085355epcas1p12a95c4effe20e7e9ded3ea926155fe88~VmeBpdXsM1772817728epcas1p13; Mon, 15 Apr 2019 08:53:55 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190415085355epsmtrp269afd5f1e53b20e884bcdfeafafdcc41~VmeBo29sv0206302063epsmtrp2I; Mon, 15 Apr 2019 08:53:55 +0000 (GMT) X-AuditID: b6c32a39-8b7ff7000000100c-6b-5cb446a3ffd9 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 69.FA.03692.3A644BC5; Mon, 15 Apr 2019 17:53:55 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.221.211]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190415085355epsmtip2911dcb999b55aa5d9c3df31783f530aa~VmeBe0iJS0398403984epsmtip26; Mon, 15 Apr 2019 08:53:55 +0000 (GMT) From: Inki Dae To: dri-devel@lists.freedesktop.org Subject: [PATCH 7/7] drm/ipp: clean up debug messages Date: Mon, 15 Apr 2019 17:54:16 +0900 Message-Id: <1555318456-23397-8-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555318456-23397-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLKsWRmVeSWpSXmKPExsWy7bCmnu5ity0xBk9eGFhc+fqezWLS/Qks FjPO72NyYPa4332cyaNvyypGj8+b5AKYo7JtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1 DS0tzJUU8hJzU22VXHwCdN0yc4AWKSmUJeaUAoUCEouLlfTtbIryS0tSFTLyi0tslVILUnIK LAv0ihNzi0vz0vWS83OtDA0MjEyBChOyMw58u8lWMLuw4tDMOWwNjFviuhg5OSQETCS2LvzI 1MXIxSEksINRYu/rHewQzidGid6GmSwQzjdGiRfP3rPAtMz++xQqsZdR4tXTTqiWL4wSq+cv ZgWpYhNQlZi44j4biC0ioCzxd+IqRhCbWcBNYvHp5WCThAVMJc6v+g1mswDVnzxyBayeV8BF 4uba6awQ2+Qkbp7rZAaxOQVcJW41NzGCLJMQ+MgqMWfNfzaIIheJU5veQJ0nLPHq+BZ2CFtK 4vO7vVA15RLP3j0DquEAsmskvs2tgDCNJS6uSAExmQU0Jdbv0oe4kk/i3dceVogKXomONiGI GUoSxy7eYISwJSQuLJkINdtDYtLzzWA7hQRmMErcvao9gVF2FsLQBYyMqxjFUguKc9NTiw0L TJHjaBMjOOloWe5gPHbO5xCjAAejEg/vhcrNMUKsiWXFlbmHGCU4mJVEeAU6gEK8KYmVValF +fFFpTmpxYcYTYFBN5FZSjQ5H5gQ80riDU2NjI2NLUwMzUwNDZXEedc7OMcICaQnlqRmp6YW pBbB9DFxcEo1MNa7y9lFvGWZslhQ6tqtW03Z+6tDGy7+myRo6Ku05NrhtG+fjy5taOaUs4pQ bzb8VpSzVFtKwu9YY+meZ3Ln39x+XxE1Kbjq195HXbuan7xivcuZeOGzZPtt0Y2eTC4rK9dX yhW9NllWvip+69fmV3l37Uoig+fn/ex/brp4y1Iu79o6y7OsO5RYijMSDbWYi4oTAU5CpjRQ AwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphluLIzCtJLcpLzFFi42LZdlhJXnex25YYg0/vRC2ufH3PZjHp/gQW ixnn9zE5MHvc7z7O5NG3ZRWjx+dNcgHMUVw2Kak5mWWpRfp2CVwZB77dZCuYXVhxaOYctgbG LXFdjJwcEgImErP/PmXpYuTiEBLYzSix+MRapi5GDqCEhMSWrRwQprDE4cPFECWfGCWuLWln AullE1CVmLjiPhuILSKgLPF34ipGEJtZwEPi1KufzCC2sICpxPlVv1lAbBag+pNHroDV8wq4 SNxcO50V4gY5iZvnOsHqOQVcJW41N4HNEQKqWdE4kW0CI98CRoZVjJKpBcW56bnFhgWGeanl esWJucWleel6yfm5mxjBYaOluYPx8pL4Q4wCHIxKPLwV5ZtjhFgTy4orcw8xSnAwK4nwCnQA hXhTEiurUovy44tKc1KLDzFKc7AoifM+zTsWKSSQnliSmp2aWpBaBJNl4uCUamDU21NtWlnf djZtd76+4sGZF+832h+qnbx0f/jxT8ZZ+9r27D8suOPtKck0lYJD/q+7D+kI+dd/OWPfGFb5 uDfVMOQEc7zk1L8v3vZ3p5dnsOrHztLgCm8/yfs6ydN8deQDebkVMwNqVX9d5BCrd2HL2nzy 7rfDHocjVnmkTZ04Q0OG7TnbjA4lluKMREMt5qLiRACN8fFUFwIAAA== X-CMS-MailID: 20190415085355epcas1p12a95c4effe20e7e9ded3ea926155fe88 X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190415085355epcas1p12a95c4effe20e7e9ded3ea926155fe88 References: <1555318456-23397-1-git-send-email-inki.dae@samsung.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1555318441; bh=NxXxQYRU43N5fMshtj0hyLbjp1KCHWrvjweoclPkejg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vGsdDfWVRTAhfO5chqY2p1AQPQ3NyeLmry2FacVizX201trJS9r2BDJOapG1sWiEE GbzlZ5954nY2ZpSStxqgP2pu4/FJQRQIIWeNaOTxhGKrHBl8jLZ2THPVovNpifEdpv aHNJpeTI0WYqaETpJFYwH5D7uCjjeeddLRFDbtWA= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Print out debug messages with correct device name. As for this, this patch adds device pointer to exynos_drm_ipp structure, and in case of exynos_drm_ipp_task structure, replace drm_device pointer with device one. This will make each ipp driver to print out debug messages with correct device name. Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 5 ++-- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 5 ++-- drivers/gpu/drm/exynos/exynos_drm_ipp.c | 46 ++++++++++++++--------------- drivers/gpu/drm/exynos/exynos_drm_ipp.h | 9 +++--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 5 ++-- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 5 ++-- 6 files changed, 40 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index 71b0cb1..c50b0f9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c @@ -1134,9 +1134,10 @@ static int fimc_bind(struct device *dev, struct device *master, void *data) struct exynos_drm_ipp *ipp = &ctx->ipp; ctx->drm_dev = drm_dev; + ipp->drm_dev = drm_dev; exynos_drm_register_dma(drm_dev, dev); - exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, + exynos_drm_ipp_register(dev, ipp, &ipp_funcs, DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, ctx->formats, ctx->num_formats, "fimc"); @@ -1153,7 +1154,7 @@ static void fimc_unbind(struct device *dev, struct device *master, struct drm_device *drm_dev = data; struct exynos_drm_ipp *ipp = &ctx->ipp; - exynos_drm_ipp_unregister(drm_dev, ipp); + exynos_drm_ipp_unregister(dev, ipp); exynos_drm_unregister_dma(drm_dev, dev); } diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 433df3e..0bfb5e9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -1170,9 +1170,10 @@ static int gsc_bind(struct device *dev, struct device *master, void *data) struct exynos_drm_ipp *ipp = &ctx->ipp; ctx->drm_dev = drm_dev; + ctx->drm_dev = drm_dev; exynos_drm_register_dma(drm_dev, dev); - exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, + exynos_drm_ipp_register(dev, ipp, &ipp_funcs, DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, ctx->formats, ctx->num_formats, "gsc"); @@ -1189,7 +1190,7 @@ static void gsc_unbind(struct device *dev, struct device *master, struct drm_device *drm_dev = data; struct exynos_drm_ipp *ipp = &ctx->ipp; - exynos_drm_ipp_unregister(drm_dev, ipp); + exynos_drm_ipp_unregister(dev, ipp); exynos_drm_unregister_dma(drm_dev, dev); } diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index a1ee541..c862099 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -43,7 +43,7 @@ static LIST_HEAD(ipp_list); * Returns: * Zero on success, error code on failure. */ -int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, +int exynos_drm_ipp_register(struct device *dev, struct exynos_drm_ipp *ipp, const struct exynos_drm_ipp_funcs *funcs, unsigned int caps, const struct exynos_drm_ipp_formats *formats, unsigned int num_formats, const char *name) @@ -67,7 +67,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, list_add_tail(&ipp->head, &ipp_list); ipp->id = num_ipp++; - DRM_DEV_DEBUG_DRIVER(dev->dev, "Registered ipp %d\n", ipp->id); + DRM_DEV_DEBUG_DRIVER(dev, "Registered ipp %d\n", ipp->id); return 0; } @@ -77,7 +77,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, * @dev: DRM device * @ipp: ipp module */ -void exynos_drm_ipp_unregister(struct drm_device *dev, +void exynos_drm_ipp_unregister(struct device *dev, struct exynos_drm_ipp *ipp) { WARN_ON(ipp->task); @@ -268,7 +268,7 @@ static inline struct exynos_drm_ipp_task * task->src.rect.h = task->dst.rect.h = UINT_MAX; task->transform.rotation = DRM_MODE_ROTATE_0; - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Allocated task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev, "Allocated task %pK\n", task); return task; } @@ -335,7 +335,7 @@ static int exynos_drm_ipp_task_set(struct exynos_drm_ipp_task *task, size -= map[i].size; } - DRM_DEV_DEBUG_DRIVER(task->dev->dev, + DRM_DEV_DEBUG_DRIVER(task->dev, "Got task %pK configuration from userspace\n", task); return 0; @@ -391,12 +391,12 @@ static void exynos_drm_ipp_task_release_buf(struct exynos_drm_ipp_buffer *buf) static void exynos_drm_ipp_task_free(struct exynos_drm_ipp *ipp, struct exynos_drm_ipp_task *task) { - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Freeing task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev, "Freeing task %pK\n", task); exynos_drm_ipp_task_release_buf(&task->src); exynos_drm_ipp_task_release_buf(&task->dst); if (task->event) - drm_event_cancel_free(ipp->dev, &task->event->base); + drm_event_cancel_free(ipp->drm_dev, &task->event->base); kfree(task); } @@ -555,7 +555,7 @@ static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task, buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE : DRM_EXYNOS_IPP_FORMAT_DESTINATION); if (!fmt) { - DRM_DEV_DEBUG_DRIVER(task->dev->dev, + DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: %s format not supported\n", task, buf == src ? "src" : "dst"); return -EINVAL; @@ -606,7 +606,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) bool rotate = (rotation != DRM_MODE_ROTATE_0); bool scale = false; - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Checking task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev, "Checking task %pK\n", task); if (src->rect.w == UINT_MAX) src->rect.w = src->buf.width; @@ -621,7 +621,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) src->rect.y + src->rect.h > (src->buf.height) || dst->rect.x + dst->rect.w > (dst->buf.width) || dst->rect.y + dst->rect.h > (dst->buf.height)) { - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, + DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: defined area is outside provided buffers\n", task); return -EINVAL; @@ -639,7 +639,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_SCALE) && scale) || (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_CONVERT) && src->buf.fourcc != dst->buf.fourcc)) { - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: hw capabilities exceeded\n", + DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: hw capabilities exceeded\n", task); return -EINVAL; } @@ -652,7 +652,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) if (ret) return ret; - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: all checks done.\n", + DRM_DEV_DEBUG_DRIVER(ipp->dev, "Task %pK: all checks done.\n", task); return ret; @@ -664,25 +664,25 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task, struct exynos_drm_ipp_buffer *src = &task->src, *dst = &task->dst; int ret = 0; - DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Setting buffer for task %pK\n", + DRM_DEV_DEBUG_DRIVER(task->dev, "Setting buffer for task %pK\n", task); ret = exynos_drm_ipp_task_setup_buffer(src, filp); if (ret) { - DRM_DEV_DEBUG_DRIVER(task->dev->dev, + DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: src buffer setup failed\n", task); return ret; } ret = exynos_drm_ipp_task_setup_buffer(dst, filp); if (ret) { - DRM_DEV_DEBUG_DRIVER(task->dev->dev, + DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: dst buffer setup failed\n", task); return ret; } - DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Task %pK: buffers prepared.\n", + DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: buffers prepared.\n", task); return ret; @@ -703,7 +703,7 @@ static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task, e->event.base.length = sizeof(e->event); e->event.user_data = user_data; - ret = drm_event_reserve_init(task->dev, file_priv, &e->base, + ret = drm_event_reserve_init(task->ipp->drm_dev, file_priv, &e->base, &e->event.base); if (ret) goto free; @@ -724,7 +724,7 @@ static void exynos_drm_ipp_event_send(struct exynos_drm_ipp_task *task) task->event->event.tv_usec = now.tv_nsec / NSEC_PER_USEC; task->event->event.sequence = atomic_inc_return(&task->ipp->sequence); - drm_send_event(task->dev, &task->event->base); + drm_send_event(task->ipp->drm_dev, &task->event->base); } static int exynos_drm_ipp_task_cleanup(struct exynos_drm_ipp_task *task) @@ -761,7 +761,7 @@ void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret) struct exynos_drm_ipp *ipp = task->ipp; unsigned long flags; - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, task %pK done: %d\n", + DRM_DEV_DEBUG_DRIVER(task->dev, "ipp: %d, task %pK done: %d\n", ipp->id, task, ret); spin_lock_irqsave(&ipp->lock, flags); @@ -786,7 +786,7 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) unsigned long flags; int ret; - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, try to run new task\n", + DRM_DEV_DEBUG_DRIVER(ipp->dev, "ipp: %d, try to run new task\n", ipp->id); spin_lock_irqsave(&ipp->lock, flags); @@ -803,7 +803,7 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) spin_unlock_irqrestore(&ipp->lock, flags); - DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, + DRM_DEV_DEBUG_DRIVER(ipp->dev, "ipp: %d, selected task %pK to run\n", ipp->id, task); @@ -913,7 +913,7 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data, * then freed after exynos_drm_ipp_task_done() */ if (arg->flags & DRM_EXYNOS_IPP_FLAG_NONBLOCK) { - DRM_DEV_DEBUG_DRIVER(dev->dev, + DRM_DEV_DEBUG_DRIVER(ipp->dev, "ipp: %d, nonblocking processing task %pK\n", ipp->id, task); @@ -921,7 +921,7 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data, exynos_drm_ipp_schedule_task(task->ipp, task); ret = 0; } else { - DRM_DEV_DEBUG_DRIVER(dev->dev, "ipp: %d, processing task %pK\n", + DRM_DEV_DEBUG_DRIVER(ipp->dev, "ipp: %d, processing task %pK\n", ipp->id, task); exynos_drm_ipp_schedule_task(ipp, task); ret = wait_event_interruptible(ipp->done_wq, diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.h b/drivers/gpu/drm/exynos/exynos_drm_ipp.h index 0b27d4a..5524c45 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.h +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.h @@ -54,7 +54,8 @@ struct exynos_drm_ipp_funcs { * struct exynos_drm_ipp - central picture processor module structure */ struct exynos_drm_ipp { - struct drm_device *dev; + struct drm_device *drm_dev; + struct device *dev; struct list_head head; unsigned int id; @@ -85,7 +86,7 @@ struct exynos_drm_ipp_buffer { * has to be performed by the picture processor hardware module */ struct exynos_drm_ipp_task { - struct drm_device *dev; + struct device *dev; struct exynos_drm_ipp *ipp; struct list_head head; @@ -129,11 +130,11 @@ struct exynos_drm_ipp_formats { #define IPP_SCALE_LIMIT(val...) \ .type = (DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE), val -int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, +int exynos_drm_ipp_register(struct device *dev, struct exynos_drm_ipp *ipp, const struct exynos_drm_ipp_funcs *funcs, unsigned int caps, const struct exynos_drm_ipp_formats *formats, unsigned int num_formats, const char *name); -void exynos_drm_ipp_unregister(struct drm_device *dev, +void exynos_drm_ipp_unregister(struct device *dev, struct exynos_drm_ipp *ipp); void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret); diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 05abfed..4c9ac0c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c @@ -243,9 +243,10 @@ static int rotator_bind(struct device *dev, struct device *master, void *data) struct exynos_drm_ipp *ipp = &rot->ipp; rot->drm_dev = drm_dev; + ipp->drm_dev = drm_dev; exynos_drm_register_dma(drm_dev, dev); - exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, + exynos_drm_ipp_register(dev, ipp, &ipp_funcs, DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE, rot->formats, rot->num_formats, "rotator"); @@ -261,7 +262,7 @@ static void rotator_unbind(struct device *dev, struct device *master, struct drm_device *drm_dev = data; struct exynos_drm_ipp *ipp = &rot->ipp; - exynos_drm_ipp_unregister(drm_dev, ipp); + exynos_drm_ipp_unregister(dev, ipp); exynos_drm_unregister_dma(rot->drm_dev, rot->dev); } diff --git a/drivers/gpu/drm/exynos/exynos_drm_scaler.c b/drivers/gpu/drm/exynos/exynos_drm_scaler.c index ed1dd1a..c6dd753 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_scaler.c +++ b/drivers/gpu/drm/exynos/exynos_drm_scaler.c @@ -451,9 +451,10 @@ static int scaler_bind(struct device *dev, struct device *master, void *data) struct exynos_drm_ipp *ipp = &scaler->ipp; scaler->drm_dev = drm_dev; + ipp->drm_dev = drm_dev; exynos_drm_register_dma(drm_dev, dev); - exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, + exynos_drm_ipp_register(dev, ipp, &ipp_funcs, DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, scaler->scaler_data->formats, @@ -471,7 +472,7 @@ static void scaler_unbind(struct device *dev, struct device *master, struct drm_device *drm_dev = data; struct exynos_drm_ipp *ipp = &scaler->ipp; - exynos_drm_ipp_unregister(drm_dev, ipp); + exynos_drm_ipp_unregister(dev, ipp); exynos_drm_unregister_dma(scaler->drm_dev, scaler->dev); }