From patchwork Wed Jul 12 09:46:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13309948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 048C0C001B0 for ; Wed, 12 Jul 2023 09:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1hiwXqpbID7A2ZQ+UEh7B4+kgVQh2QikqCsvgp3ggNM=; b=k2DyoA8aRlmggb y1Q7I8cyzHUqy9FY3l0mU7JcyKJE9NhQskOP5an6DasRet7jeLXYb50R1lK9wY+vP2PHLdJt5BLrp qeWT0PWfFC4vgumolLvjUQU4+sbzpUrVTJJW+09Gf+heA5aqah2cszfbSxWkUVz+7JLU4QHbQITNL SoAkBesM9MNhzV9YEuLLseaHSOUA45TCBfKBU1GftR41epFsOh99sOHzwDukCCpKWizSrp/yVgNGf juXNS7RkG/xSbKhSM0IUTfZxiGS7vmBV9kN8RK6943MAJu18BLacuGNQJAFlbo7iNBnESAM47M9dm QLbiSSdH++LAVFIU4PBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJWRX-00H5Nr-1O; Wed, 12 Jul 2023 09:47:31 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJWRO-00H5Dy-2J for linux-rockchip@lists.infradead.org; Wed, 12 Jul 2023 09:47:25 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJWRH-0001V6-I3; Wed, 12 Jul 2023 11:47:15 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qJWRE-00Dr5f-F2; Wed, 12 Jul 2023 11:47:12 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qJWRD-004GU0-CV; Wed, 12 Jul 2023 11:47:11 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH RFC v1 33/52] drm/rockchip: Use struct drm_crtc::drm_dev instead of struct drm_crtc::dev Date: Wed, 12 Jul 2023 11:46:43 +0200 Message-Id: <20230712094702.1770121-34-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230712094702.1770121-1-u.kleine-koenig@pengutronix.de> References: <20230712094702.1770121-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4041; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=fzTkzJ2crxvB0YLT3xbxIaqmdKh8jjxij3HqLKEm5PY=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkrnZ8rkrJTPSo7Q7VWyz6pZBFJotWpQXtY4bLU lY8/Ee2UpmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZK52fAAKCRCPgPtYfRL+ TubhB/9pOJGXkc/cyv7BNxmrRzypJDTk3FSpHNvbRozIfGcXy53Tu/yD21H+UiyEryA7fGyHZRI PJrBDh4JeY5AxFL7g+JOBchnonP408coRmx0FP82u+aysOUTgfEBk9Ap7m1BmM1z2uwjM6mEsca Y8MZI20ZWiTTo4acJbP1djyOAfZTRN1ZC2kfVS3JIkVtxjtFMmDeKkT2TsFw7SY2Rs7ye9Hg3gJ 187shJh4768S3OFzXeEjMX1LZ7cKEHKf/fpihqrl1RjyjZkCKiYuUcffD6Het+qn8v+N2S/Qo3W 6VvkRBk9XatONJ2eNyRUgcIob7MWVREYVP4LkOJe2tUIEPc6 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230712_024722_766941_8275FA61 X-CRM114-Status: GOOD ( 14.08 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Prepare dropping the alias "dev" for struct drm_crtc::drm_dev. "drm_dev" is the better name as "dev" is usually a struct device pointer. No semantic changes. Signed-off-by: Uwe Kleine-König --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 8 ++++---- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 15 ++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index a530ecc4d207..811ddfd06d3e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -758,9 +758,9 @@ static void vop_crtc_atomic_disable(struct drm_crtc *crtc, out: if (crtc->state->event && !crtc->state->active) { - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); drm_crtc_send_vblank_event(crtc, crtc->state->event); - spin_unlock_irq(&crtc->dev->event_lock); + spin_unlock_irq(&crtc->drm_dev->event_lock); crtc->state->event = NULL; } @@ -1567,7 +1567,7 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc, */ vop_wait_for_irq_handler(vop); - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); if (crtc->state->event) { WARN_ON(drm_crtc_vblank_get(crtc) != 0); WARN_ON(vop->event); @@ -1575,7 +1575,7 @@ static void vop_crtc_atomic_flush(struct drm_crtc *crtc, vop->event = crtc->state->event; crtc->state->event = NULL; } - spin_unlock_irq(&crtc->dev->event_lock); + spin_unlock_irq(&crtc->drm_dev->event_lock); for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) { diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index ca73b8ccc29f..6cbdef324d82 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -924,9 +924,9 @@ static void vop2_crtc_atomic_disable(struct drm_crtc *crtc, vop2_unlock(vop2); if (crtc->state->event && !crtc->state->active) { - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); drm_crtc_send_vblank_event(crtc, crtc->state->event); - spin_unlock_irq(&crtc->dev->event_lock); + spin_unlock_irq(&crtc->drm_dev->event_lock); crtc->state->event = NULL; } @@ -1564,7 +1564,8 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc, if (mode->flags & DRM_MODE_FLAG_PVSYNC) polflags |= BIT(VSYNC_POSITIVE); - drm_for_each_encoder_mask(encoder, crtc->dev, crtc_state->encoder_mask) { + drm_for_each_encoder_mask(encoder, crtc->drm_dev, + crtc_state->encoder_mask) { struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder); rk3568_set_intf_mux(vp, rkencoder->crtc_endpoint_id, polflags); @@ -2060,7 +2061,7 @@ static void vop2_crtc_atomic_flush(struct drm_crtc *crtc, vop2_cfg_done(vp); - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); if (crtc->state->event) { WARN_ON(drm_crtc_vblank_get(crtc)); @@ -2068,7 +2069,7 @@ static void vop2_crtc_atomic_flush(struct drm_crtc *crtc, crtc->state->event = NULL; } - spin_unlock_irq(&crtc->dev->event_lock); + spin_unlock_irq(&crtc->drm_dev->event_lock); } static const struct drm_crtc_helper_funcs vop2_crtc_helper_funcs = { @@ -2162,7 +2163,7 @@ static irqreturn_t vop2_isr(int irq, void *data) if (irqs & VP_INT_FS_FIELD) { drm_crtc_handle_vblank(crtc); - spin_lock(&crtc->dev->event_lock); + spin_lock(&crtc->drm_dev->event_lock); if (vp->event) { u32 val = vop2_readl(vop2, RK3568_REG_CFG_DONE); @@ -2172,7 +2173,7 @@ static irqreturn_t vop2_isr(int irq, void *data) drm_crtc_vblank_put(crtc); } } - spin_unlock(&crtc->dev->event_lock); + spin_unlock(&crtc->drm_dev->event_lock); ret = IRQ_HANDLED; }