Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3255367pxu; Sat, 19 Dec 2020 18:41:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrenFKhzmbYdirIfeQW4I2SMd+/ns8hHK8rqo+Z9H/WAj2YWtGyILnkl2KSs24afgemc63 X-Received: by 2002:a05:6402:46:: with SMTP id f6mr11005478edu.163.1608432110381; Sat, 19 Dec 2020 18:41:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608432110; cv=none; d=google.com; s=arc-20160816; b=xBvyc2YixtYLQv/7cb3o3V81cHxzPrXWt4a1rJ2OLMjETJX6o4l83un0hjirhZmGUO jlu806UKHqylFHyMjSszrcdli8qGeinVs+c2J5l2fwa2rZod8MfGerQt5vLnO5CaL/ua ukQNwb2PAezIl93OwbFnWOXZIycfmKtHXEovTRGat3Z1jUn7oCPZ6htowrg4/kWvE9zC ++P+zZ+A6Mc+knnco1CPM5V4CBkIYxlLOFIYgeHwzRX64RVa5+VSGLhOH9ZuzZMZfHv2 I1N7cDCJ8urfJE0oiave6YhaGkskkPvdLxAv5j2FYGMio+JQn8rX9FSFcZ9cqhz9yTrJ 8qJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=ZvelwdI6R9KDNXjUVcFTBXz0WSGFiHSFLXQUTrPjUCo=; b=xuRx2zo/NGFWqkE2ZK2dbvSANW+ljd2FuopD6XGQ3E1+dkkTtaWdyeHN5dtch6C4+d INCUCRYgfSJKRF2Uk08Q5x00zzIwrcAAW4G0N0WxqIdJfELviwBlcLpqvd6S8jWLiXef Jhhv/NSUi4DPHoeJ25jFhaHYQUtDDKXHRg1JBc0FURrZOK5kJnYY+o4hOJJIpNxKzyxf Q/K+AJFFMrXgwo97iZ8TzIX9ddc4ANk/fYkfiZ4iYSpYg0zPVaAR8y+me6tu2kHfeMCE XWNPsPn9Rhr0Dqvyt8I3LpFnieVYkQaSrDePIgI7eTFCnWv2JuIb0ypj2hGv9Gb4py/M nz6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt4si7044621ejc.439.2020.12.19.18.41.28; Sat, 19 Dec 2020 18:41:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727270AbgLTCic (ORCPT + 99 others); Sat, 19 Dec 2020 21:38:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:49330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727105AbgLTCic (ORCPT ); Sat, 19 Dec 2020 21:38:32 -0500 From: Chun-Kuang Hu Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Matthias Brugger , Philipp Zabel , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, CK Hu , Chun-Kuang Hu Subject: [PATCH 5/5] soc / drm: mediatek: Move mtk mutex driver to soc folder Date: Sun, 20 Dec 2020 10:36:55 +0800 Message-Id: <20201220023655.30795-6-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201220023655.30795-1-chunkuang.hu@kernel.org> References: <20201220023655.30795-1-chunkuang.hu@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: CK Hu mtk mutex is used by DRM and MDP driver, and its function is SoC-specific, so move it to soc folder. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Makefile | 3 +-- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 - drivers/soc/mediatek/Makefile | 1 + .../{gpu/drm/mediatek/mtk_mutex.c => soc/mediatek/mtk-mutex.c} | 2 ++ .../mtk_mutex.h => include/linux/soc/mediatek/mtk-mutex.h | 0 7 files changed, 5 insertions(+), 5 deletions(-) rename drivers/{gpu/drm/mediatek/mtk_mutex.c => soc/mediatek/mtk-mutex.c} (99%) rename drivers/gpu/drm/mediatek/mtk_mutex.h => include/linux/soc/mediatek/mtk-mutex.h (100%) diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index 09979c4c340a..01d06332f767 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -9,8 +9,7 @@ mediatek-drm-y := mtk_disp_color.o \ mtk_drm_gem.o \ mtk_drm_plane.o \ mtk_dsi.o \ - mtk_dpi.o \ - mtk_mutex.o + mtk_dpi.o obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index 23d9abc4f46c..d7bd07916d74 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -22,7 +23,6 @@ #include "mtk_drm_ddp_comp.h" #include "mtk_drm_gem.h" #include "mtk_drm_plane.h" -#include "mtk_mutex.h" /* * struct mtk_drm_crtc - MediaTek specific crtc structure. diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 907a69eb6d51..d1232124b650 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -602,7 +602,6 @@ static struct platform_driver mtk_drm_platform_driver = { }; static struct platform_driver * const mtk_drm_drivers[] = { - &mtk_mutex_driver, &mtk_disp_color_driver, &mtk_disp_ovl_driver, &mtk_disp_rdma_driver, diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h index c7220f267a62..f7cd95903a4e 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -46,7 +46,6 @@ struct mtk_drm_private { struct drm_atomic_state *suspend_state; }; -extern struct platform_driver mtk_mutex_driver; extern struct platform_driver mtk_disp_color_driver; extern struct platform_driver mtk_disp_ovl_driver; extern struct platform_driver mtk_disp_rdma_driver; diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile index b6908db534c2..90270f8114ed 100644 --- a/drivers/soc/mediatek/Makefile +++ b/drivers/soc/mediatek/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o obj-$(CONFIG_MTK_SCPSYS_PM_DOMAINS) += mtk-pm-domains.o obj-$(CONFIG_MTK_MMSYS) += mtk-mmsys.o +obj-$(CONFIG_MTK_MMSYS) += mtk-mutex.o diff --git a/drivers/gpu/drm/mediatek/mtk_mutex.c b/drivers/soc/mediatek/mtk-mutex.c similarity index 99% rename from drivers/gpu/drm/mediatek/mtk_mutex.c rename to drivers/soc/mediatek/mtk-mutex.c index e16b1772317c..f2597ebf52db 100644 --- a/drivers/gpu/drm/mediatek/mtk_mutex.c +++ b/drivers/soc/mediatek/mtk-mutex.c @@ -459,3 +459,5 @@ struct platform_driver mtk_mutex_driver = { .of_match_table = mutex_driver_dt_match, }, }; + +builtin_platform_driver(mtk_mutex_driver); diff --git a/drivers/gpu/drm/mediatek/mtk_mutex.h b/include/linux/soc/mediatek/mtk-mutex.h similarity index 100% rename from drivers/gpu/drm/mediatek/mtk_mutex.h rename to include/linux/soc/mediatek/mtk-mutex.h -- 2.17.1