From patchwork Tue Apr 7 13:42:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 185237 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp4879011ilr; Tue, 7 Apr 2020 06:43:28 -0700 (PDT) X-Google-Smtp-Source: APiQypKqV1znLAtwjEOy6pwgv+HrmPh2wgdqvzP1ARKz4TxQYt8esPkQtkXvbCcD3eDcK8VF39WB X-Received: by 2002:a17:90a:e398:: with SMTP id b24mr2834837pjz.113.1586267008060; Tue, 07 Apr 2020 06:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586267008; cv=none; d=google.com; s=arc-20160816; b=pIdXFvwXTk+Ts3PqSMoERijhHvnL8EULCC9dhYh7VoWw1YfW6X/kU57bOnckHsv5Zh KCiyZa3j0fxEUsLEmiSMOxOelfmHKAmtJR4aI9uQqoZ5+Ry6edvGHNXB+jPNgusWgCv6 xmHp100TZ7RtTKU8tMGjdC/Jy1XuFajK+h81edOHen0eHcztfBH1ROB4CEe+G+065UdU 7hxHfKltbB7eA+QOEJ/gNxRilijg7Y7AYcYGaPvm975tOEXWTrrLo8glSE5xN1lRiRap JvvtnijeRc1FvRJ3ADXODRwqv0VuZotdEfru5L0IR/Lb3UlPJut4RsZj+tm+s71IQiA8 qgVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:cms-type:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-filter:delivered-to; bh=vj57medCRnj/CI+Xpoupov5HSzJeWn02TPQC6MaFDMA=; b=GNumfldpyyFIZxzrYTd4PInFNn1y3/r5hf2v/v5uzoESiLQ22h9m+6mk21/3mcrYWQ TcNwyulrPdo8mb32tM3AXaSwuyn6yXQa+7/3VNBCCx57NkUaP2IIh5rUVkdGDEvQ8eua Bov8/ZSzRoNTh9xrIGfQNeI9674fbiXDWlTXC+s4qT0+1YuFTcbg3/4DVuqq99DBL5y6 /Eq0G+gKAeVa/v5ntXo1izwviBlQ5yFkLDOZKQ00qCzwGB5v5c/kh3BBapfvn/hD1Mzu Mm7EazSz3GV0HslCgFbtkes/1Ix2vHnfQe92aMeF2pilgVdkWbcVw1MdRS/CY4YalbW9 f5Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=YUjJ2ic0; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id w12si1455475pjb.48.2020.04.07.06.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 06:43:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=YUjJ2ic0; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AC196E87C; Tue, 7 Apr 2020 13:43:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C3936E87C for ; Tue, 7 Apr 2020 13:43:16 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200407134314euoutp0218ab7499b1615660c575b35e00921155~DjW1X04nW1158911589euoutp02z for ; Tue, 7 Apr 2020 13:43:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200407134314euoutp0218ab7499b1615660c575b35e00921155~DjW1X04nW1158911589euoutp02z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586266994; bh=bcEbGrmufxbXH+41WsayCMBUWxXhEu+MfRalXv8WG9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YUjJ2ic0bZU1MqCL2a0PGU7PL986fg3QUL0lRh+05aU1cAbGAWlosHCycidSosNXz YBJ94RnBhUf+3yi/NHBRY1LndFblDbkHAQZb3pstITVrxIzMmIk0gQb+DOtWvj6pef 7Y/pSrmN/3I7HojKIMdQ/sb0gtYl3LOFbay/5F80= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200407134314eucas1p2097b0503072026f981cc4edef732b529~DjW1AnC5T1024810248eucas1p2C; Tue, 7 Apr 2020 13:43:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 1B.7D.61286.2738C8E5; Tue, 7 Apr 2020 14:43:14 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200407134313eucas1p1a86ed9bd35c8f1eb88a09c32fb949335~DjW0sw4oB1682116821eucas1p1M; Tue, 7 Apr 2020 13:43:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200407134313eusmtrp216bead281ec23c828a449a1f5d9fc2ec~DjW0sJiI83117631176eusmtrp2u; Tue, 7 Apr 2020 13:43:13 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-3b-5e8c8372ce52 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 71.9D.07950.1738C8E5; Tue, 7 Apr 2020 14:43:13 +0100 (BST) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200407134313eusmtip1701220988246e3badca2340d232866ed~DjW0VPHiN0417004170eusmtip1x; Tue, 7 Apr 2020 13:43:13 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/3] drm/exynos: gem: Remove dead-code Date: Tue, 7 Apr 2020 15:42:54 +0200 Message-Id: <20200407134256.9129-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200407134256.9129-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djPc7pFzT1xBve+sVncWneO1WLjjPWs Fle+vmezmHR/AovFjPP7mCzWHrnLbjFj8ks2B3aP+93HmTz6tqxi9Pi8SS6AOYrLJiU1J7Ms tUjfLoErY8bkioLpohUX7nA0MPYJdTFycEgImEg8OG3RxcjFISSwglHi8ZWHzBDOF0aJJ/0n 2SCcz4wSXb9mMsF0zJpSDRFfzijRvGozK1zHph9dQO2cHGwChhJdb7vYQGwRATeJpsMzwYqY Ba4zSnz7sYgdJCEsYCbRdvM2mM0ioCrx5fg/sAZeARuJjy9fgNkSAvISqzccABvKKWArcWHH LrBBEgKP2STWTlrBCHGSi8Svy7wQ9cISr45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JK4g1NDc0tLA3Njc2NzSyUxHk7BA7G CAmkJ5akZqemFqQWwfQxcXBKNTCmHn9gcG6bQv6mBUeNJTtWpL8Ouu3FYaJ++8WkSV8MHzCX fRNhT/E+fXLlqWfCz3x9TjHeCzZdrnrv7/Mj/68feRNz5V9vl+3MGPZ3J9Ter3qTeUDFxOW+ jZOshOCEhwranxfpay843XTuDesxgSBdS9m0Fc3nv11/dHZZzf+IzZdmuB4ScNd7qMRSnJFo qMVcVJwIAOtiOtlkAgAA X-CMS-MailID: 20200407134313eucas1p1a86ed9bd35c8f1eb88a09c32fb949335 X-Msg-Generator: CA X-RootMTR: 20200407134313eucas1p1a86ed9bd35c8f1eb88a09c32fb949335 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200407134313eucas1p1a86ed9bd35c8f1eb88a09c32fb949335 References: <20200407134256.9129-1-m.szyprowski@samsung.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Seung-Woo Kim , Marek Szyprowski MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The ExynosDRM page fault handler is never used, drm_gem_mmap() always calls exynos_drm_gem_mmap() function, which perform complete mapping for the given virtual address-space area. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 - drivers/gpu/drm/exynos/exynos_drm_gem.c | 20 -------------------- drivers/gpu/drm/exynos/exynos_drm_gem.h | 3 --- 3 files changed, 24 deletions(-) -- 2.17.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 57defeb44522..dbd80f1e4c78 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -76,7 +76,6 @@ static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) } static const struct vm_operations_struct exynos_drm_gem_vm_ops = { - .fault = exynos_drm_gem_fault, .open = drm_gem_vm_open, .close = drm_gem_vm_close, }; diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index d734d9d51762..40514d3dcf60 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -381,26 +381,6 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, return 0; } -vm_fault_t exynos_drm_gem_fault(struct vm_fault *vmf) -{ - struct vm_area_struct *vma = vmf->vma; - struct drm_gem_object *obj = vma->vm_private_data; - struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); - unsigned long pfn; - pgoff_t page_offset; - - page_offset = (vmf->address - vma->vm_start) >> PAGE_SHIFT; - - if (page_offset >= (exynos_gem->size >> PAGE_SHIFT)) { - DRM_ERROR("invalid page offset\n"); - return VM_FAULT_SIGBUS; - } - - pfn = page_to_pfn(exynos_gem->pages[page_offset]); - return vmf_insert_mixed(vma, vmf->address, - __pfn_to_pfn_t(pfn, PFN_DEV)); -} - static int exynos_drm_gem_mmap_obj(struct drm_gem_object *obj, struct vm_area_struct *vma) { diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h index 42ec67bc262d..f00044c0b688 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.h +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h @@ -101,9 +101,6 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv, struct drm_device *dev, struct drm_mode_create_dumb *args); -/* page fault handler and mmap fault address(virtual) to physical memory. */ -vm_fault_t exynos_drm_gem_fault(struct vm_fault *vmf); - /* set vm_flags and we can change the vm attribute to other one at here. */ int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);