From patchwork Tue Aug 20 23:06:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 171878 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp180484ily; Tue, 20 Aug 2019 16:07:02 -0700 (PDT) X-Received: by 2002:a62:e401:: with SMTP id r1mr33684363pfh.193.1566342422702; Tue, 20 Aug 2019 16:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566342422; cv=none; d=google.com; s=arc-20160816; b=In/IEn0IYTOXIswEkdJ4E7z9MNJvB+pr9GkVJXrZTpeYUocYXoneiUDmjZosQmzXFk G8hI9/yYjV2P2dUogpYkCXiUKpLYPNLeNU7MzEDcGbfvthjDfsNV/iWe5IrxJvnZO9Kf 9cvGzOm+vCMQ35Oejt1/Lf1zp1YRoj5aPZLgP98TGJnlqA7FwsAhF875RMpsMn1DYDrD TG4Rso7Jwu/3M5dbf1Ur1rrvivHv/xaIfTCx0L5GLX4zIsLshYEIW/TCQcyyoqyRVzBi jsBX5qLjnNKUIFji2FHLAZI2L39AwVnHa9ASsw3l2fhYQmVXIX9zO9eTpOLJCulaR68P pxOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JH6TFWi2jRebxYBXOLzwh9NRdxn767CmjdWSOdZnLUU=; b=u38L84Qz7TzK8EvHFd/01i6jVjnc3TFbSzCW5K8zxwz13l50LnROIeKrFWMFTiQJuQ mhAXcXM3ZlCfq9+3OEBf3TL7hsWwu95FgVzsWcrzUe9ilnKrSJrXgFguMSIx1qGamZQY 1QqM6AMA+gz1WpjH9YWJPUY5J6n1KXcGQVngvfPjy33dKXv5rpe2FmPgH5k1UZ8p5j3O VWSVyvOW2J99INHNVEtuHH284ESm4g5hOgU7/nMPm8prfaFii3ajsSvnGflkKC15CeR2 4243AVejeV8PPDDNBN0zIgwDkHKqWiuZZA/ninsd2b2L6/0iBeV5hPjnKohZRdZKk4uZ si6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GC2fVtAj; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id r16sor5602691pfc.73.2019.08.20.16.07.02 for (Google Transport Security); Tue, 20 Aug 2019 16:07:02 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GC2fVtAj; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JH6TFWi2jRebxYBXOLzwh9NRdxn767CmjdWSOdZnLUU=; b=GC2fVtAj+YBtwyiQU4cD88uREHFeALuT3jPKkf8NTz0iGw8Wn45nLFCbMqPGUz+2dR 0gYKQJqIdjnrUwKlDMh3JQNLyAQPfpQIJ0mbXhKdYCF34TcU4rL7NEwrJjlfkgvdxVeA JpzkBkNn2MGzGd6UFO9KJQ9vXawjOin0EzUFazRkDOP/RBzQrZx7ZVs9/WRzf/DlTV1M p+5dzeM3+dZMhN2NYANr/FFQrs2gEWumdlchLmteC2QYvcqcTG6CesD+zF+zSirYUhrK pMhrfC8OLgH1wTLcf3F6DdT9i27AVAOGptJ+gua88BWMmlylsC3d1ePlRZjH0F6viva5 N6Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JH6TFWi2jRebxYBXOLzwh9NRdxn767CmjdWSOdZnLUU=; b=peNBgp4KQ6mgqWm7r2okebaGrjJ/CAiYklh+n+E8ewhJIoG9hICphVsRqZmOsbVm/y +WauDiNv5H6tlGvnFPGv3jk9a31U35Y44tbi3+Wv5a8tAALkz0IjqVCimSMtLB+zJi5H BZX7qcBxeLrCazceYZ868A+0pDaSH231I+mDDhzdVmI2OF2Rju0y9wdgvKKvRqJ3A6BH t+ITaUmw3aaqAPYX/6Q90ZBwEA1/0ctdrTj2dSgc0ow6S5n2tWCdCAf/wHc92FjzM4n4 eVo5oVaTcFnw3aRQYDw+KdD86m4XPMmhw7dBDp/fuRy4dwL2nnI5zNGXlZp7ZpYDp53o foSA== X-Gm-Message-State: APjAAAXP/CXE574IX163ZavWwJD3Vl+0xy21Culf7sPxppvO3I6ZtevB OKWdeJ7cz9d2Yq59UGmYQ8PMa8JS X-Google-Smtp-Source: APXvYqxcb1Obks0yFE+u7vU6fyhH13cugDVkKCNHFU9sRO/6BWUGpIIRt3iT73604AGLIwuXrrmSpw== X-Received: by 2002:a62:ab0a:: with SMTP id p10mr32526186pff.144.1566342422333; Tue, 20 Aug 2019 16:07:02 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id q4sm27564747pff.183.2019.08.20.16.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 16:06:59 -0700 (PDT) From: John Stultz To: lkml Cc: Xu YiPing , Rongrong Zou , Xinliang Liu , David Airlie , Daniel Vetter , dri-devel , Sam Ravnborg , John Stultz Subject: [PATCH v5 20/25] drm: kirin: Rename plane_init and crtc_init Date: Tue, 20 Aug 2019 23:06:21 +0000 Message-Id: <20190820230626.23253-21-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820230626.23253-1-john.stultz@linaro.org> References: <20190820230626.23253-1-john.stultz@linaro.org> From: Xu YiPing As part of refactoring the kirin driver to better support different hardware revisions, this patch renames ade_crtc/plane_init kirin_plane/crtc_init, as they will later be moved to kirin drm drv and shared with the kirin960 hardware support. Cc: Rongrong Zou Cc: Xinliang Liu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel Cc: Sam Ravnborg Acked-by: Xinliang Liu Reviewed-by: Sam Ravnborg Signed-off-by: Xu YiPing [jstultz: reworded commit message] Signed-off-by: John Stultz --- v5: checkpatch --strict whitespace fixups noticed by Sam --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 89bdc0388138..e390b1b657b8 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -571,8 +571,8 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { .disable_vblank = ade_crtc_disable_vblank, }; -static int ade_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, - struct drm_plane *plane) +static int kirin_drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, + struct drm_plane *plane) { struct device_node *port; int ret; @@ -892,8 +892,9 @@ static struct drm_plane_funcs ade_plane_funcs = { .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, }; -static int ade_plane_init(struct drm_device *dev, struct kirin_plane *kplane, - enum drm_plane_type type) +static int kirin_drm_plane_init(struct drm_device *dev, + struct kirin_plane *kplane, + enum drm_plane_type type) { int ret = 0; @@ -989,6 +990,7 @@ static int ade_drm_init(struct platform_device *pdev) struct kirin_crtc *kcrtc; struct kirin_plane *kplane; enum drm_plane_type type; + int prim_plane; int ret; u32 ch; @@ -1024,14 +1026,15 @@ static int ade_drm_init(struct platform_device *pdev) else type = DRM_PLANE_TYPE_OVERLAY; - ret = ade_plane_init(dev, kplane, type); + ret = kirin_drm_plane_init(dev, kplane, type); if (ret) return ret; } /* crtc init */ - ret = ade_crtc_init(dev, &kcrtc->base, - &ade->planes[ade_driver_data.prim_plane].base); + prim_plane = ade_driver_data.prim_plane; + ret = kirin_drm_crtc_init(dev, &kcrtc->base, + &ade->planes[prim_plane].base); if (ret) return ret;