From patchwork Mon Apr 15 23:44:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 10901721 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 00BA117EF for ; Mon, 15 Apr 2019 23:44:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF5E027F60 for ; Mon, 15 Apr 2019 23:43:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3B97286C4; Mon, 15 Apr 2019 23:43:59 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D0BC286B9 for ; Mon, 15 Apr 2019 23:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727456AbfDOXn6 (ORCPT ); Mon, 15 Apr 2019 19:43:58 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:24215 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727379AbfDOXn6 (ORCPT ); Mon, 15 Apr 2019 19:43:58 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190415234352epoutp04d198ad1e6e6e801a1afe5529e4ee3657~VynDxzp9z0712807128epoutp04J for ; Mon, 15 Apr 2019 23:43:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190415234352epoutp04d198ad1e6e6e801a1afe5529e4ee3657~VynDxzp9z0712807128epoutp04J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1555371832; bh=NxXxQYRU43N5fMshtj0hyLbjp1KCHWrvjweoclPkejg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PLGGLEwoILv1Oh187Bs7Vjll5libFDbQ9IRbvbAd4sRtnWeRPKvhFQu69nNfHW2mR V2nmoHuBIcseuIOo8YPBllIkyEN8XriF6hshIZ4HAN8tjkDmEXqHgiXuCN3Yw2AhMk bcnsyVwZeiTSbytRXMl3622+JfNmUTE7VU1pJxF4= Received: from epsmges1p2.samsung.com (unknown [182.195.40.153]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20190415234349epcas1p467c5ff323db216ce7031922e3693b863~VynAd5XHt3218532185epcas1p4V; Mon, 15 Apr 2019 23:43:49 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id FC.0F.04142.13715BC5; Tue, 16 Apr 2019 08:43:45 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190415234344epcas1p15ad9eb2de574a82420fd32e88fa6714b~Vym8LqTlN3229332293epcas1p1E; Mon, 15 Apr 2019 23:43:44 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190415234344epsmtrp14ff61d3a7b989c255a8128e33a2647d4~Vym8G5JQ41949319493epsmtrp1U; Mon, 15 Apr 2019 23:43:44 +0000 (GMT) X-AuditID: b6c32a36-ce1ff7000000102e-66-5cb5173179c2 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 38.A6.03662.03715BC5; Tue, 16 Apr 2019 08:43:44 +0900 (KST) Received: from localhost.localdomain (unknown [10.113.221.211]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190415234344epsmtip184c435cc7f06c8f77a16660d0d594b67~Vym78P_Vi2260522605epsmtip1S; Mon, 15 Apr 2019 23:43:44 +0000 (GMT) From: Inki Dae To: dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, Inki Dae Subject: [PATCH 6/6] drm/exynos: ipp: clean up debug messages Date: Tue, 16 Apr 2019 08:44:07 +0900 Message-Id: <1555371847-25253-7-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555371847-25253-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHKsWRmVeSWpSXmKPExsWy7bCmga6h+NYYg9b/4hZXvr5ns5h0fwKL xYzz+5gcmD3udx9n8ujbsorR4/MmuQDmqGybjNTElNQihdS85PyUzLx0WyXv4HjneFMzA0Nd Q0sLcyWFvMTcVFslF58AXbfMHKBFSgpliTmlQKGAxOJiJX07m6L80pJUhYz84hJbpdSClJwC ywK94sTc4tK8dL3k/FwrQwMDI1OgwoTsjAPfbrIVzC6sODRzDlsD45a4LkZODgkBE4k1C7+x dDFycQgJ7GCUmN37kxXC+cQosWfyI3YI5xujxLm/3SwwLX/+XWeGSOwFavm1A6rlC6PErZln mEGq2ARUJSauuM8GYosIKEv8nbiKEcRmFnCTWHx6OdgkYQFbiX17L4LZLED1jZO+sIPYvAIu Eov/fmGF2CYncfNcJ9hMTgFXiZ4Ls9hAlkkIfGSVeNX9gA2iyEXi19x/zBC2sMSr41vYIWwp iZf9bVB2ucSzd8+AlnEA2TUS3+ZWQJjGEhdXpICYzAKaEut36UNcySfx7msPK0QFr0RHmxDE DCWJYxdvMELYEhIXlkyE2u8h8fnzWyZIKMxglJjW9pd9AqPsLISpCxgZVzGKpRYU56anFhsW GCFH0iZGcNrRMtvBuOiczyFGAQ5GJR5ejp4tMUKsiWXFlbmHGCU4mJVEeB1TgEK8KYmVValF +fFFpTmpxYcYTYFhN5FZSjQ5H5gS80riDU2NjI2NLUwMzUwNDZXEedc7OMcICaQnlqRmp6YW pBbB9DFxcEo1MLJd27L3xETph8f2KKz/2TvhVfq71c+lrsXvd8738vBT+6d1jOGpsP/+hl/p bIfVN/lzv9qasfXQzK3zZKZN++30yWXeRPe1fGkK8klHo22WzJ3xbKLTCXNVtdLkH9Ufy2ys HwRq7XB4WiK6mzFTv8J+e5wE8wvzny1KFcfXBchtPbjvzFr/5b+VWIozEg21mIuKEwGvVC4Q UQMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42LZdlhJTtdAfGuMwf5HUhZXvr5ns5h0fwKL xYzz+5gcmD3udx9n8ujbsorR4/MmuQDmKC6blNSczLLUIn27BK6MA99ushXMLqw4NHMOWwPj lrguRk4OCQETiT//rjN3MXJxCAnsZpRoebOXpYuRAyghIbFlKweEKSxx+HAxRMknRom9F6cy gvSyCahKTFxxnw3EFhFQlvg7cRVYnFnAQ+LUq5/MILawgK3Evr0XWUBsFqD6xklf2EFsXgEX icV/v7BC3CAncfNcJ1g9p4CrRM+FWWwge4WAaiZPV5zAyLeAkWEVo2RqQXFuem6xYYFRXmq5 XnFibnFpXrpecn7uJkZw0Ghp7WA8cSL+EKMAB6MSD29C35YYIdbEsuLK3EOMEhzMSiK8jilA Id6UxMqq1KL8+KLSnNTiQ4zSHCxK4rzy+ccihQTSE0tSs1NTC1KLYLJMHJxSDYx+/3ddmeom cHDWWltpAcU6+01STJoccZPzp7Au+6QR926aqv8rm2p70/Zr3/oeWV7192jdttrI5nT+klv6 bu5xV3j4Aj3WOTrXmU2s5t7NM/3+1wcRGRWemSpBpReXPNFmvC25RmZpvYpa2um5n0SbX/X8 V7mXdvz9CofHt71bWHa6njlqIKvEUpyRaKjFXFScCABXiYpDFgIAAA== X-CMS-MailID: 20190415234344epcas1p15ad9eb2de574a82420fd32e88fa6714b X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190415234344epcas1p15ad9eb2de574a82420fd32e88fa6714b References: <1555371847-25253-1-git-send-email-inki.dae@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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); }