From patchwork Tue Jun 11 16:08:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10987689 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 1D99876 for ; Tue, 11 Jun 2019 16:10:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F08F2863B for ; Tue, 11 Jun 2019 16:10:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02FE227FA1; Tue, 11 Jun 2019 16:10:14 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9D9DE2863B for ; Tue, 11 Jun 2019 16:10:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDA8289249; Tue, 11 Jun 2019 16:10:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28D789249 for ; Tue, 11 Jun 2019 16:10:12 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id z24so1981221qtj.10 for ; Tue, 11 Jun 2019 09:10:12 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=Y0ji3mKIAYcSnIWYhM5qOS31Zm4Q2kAhyujo/uy/6OQ=; b=mbf6h1Jsc9G3xtN35oFyzgvr5PyyVDauUprEO+uWfODv4ffgZIx78V6mDuJUZ0jbz2 CPIrhMdyMWB1mkzApnByCJ3cOU/UIntJ02T6JCdrnrwhYm6YKQlXGSbsuoS4DIzTuqS4 mH3Kmf5dg/plOZ26EWDYhHgoIbfA1vnoH5RYhpG/mAdjEAxmqWgitwMjh189Evdz24Fp p8C8x+EbZKmYM9gId+LwRT8I6C0Fkw+WLK3olBvpQUnjo3ePxFI7uo5xLHzesNQP7AYJ eFzXWH62Bum7yWjo430TaV86l1Dviw9i7/73ct1otl5VcaS6SdedP4QrovNjnm0DHqtn acMg== X-Gm-Message-State: APjAAAXqnhUVJiLhEwgGMzAd0ZPBkbg3toDUsa1TDe3aMnfatXcLpbwY ATo/P4TuoZf/ntxOYzMIxgNI15y6Ae4= X-Google-Smtp-Source: APXvYqyHMF+ZJxzYd8cMw/QOp3PUxz7ml6n+jLON30GeWk/Yh7Dvy6bfD8J91b1quglXDDS+ZAXpZQ== X-Received: by 2002:ac8:6895:: with SMTP id m21mr50345039qtq.295.1560269411808; Tue, 11 Jun 2019 09:10:11 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id d188sm6755094qkf.40.2019.06.11.09.10.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 09:10:11 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v5 09/11] drm/rockchip: Use vop_win in vop_win_disable instead of vop_win_data Date: Tue, 11 Jun 2019 12:08:23 -0400 Message-Id: <20190611160844.257498-10-sean@poorly.run> X-Mailer: git-send-email 2.22.0.rc2.383.gf4fbbf30c2-goog In-Reply-To: <20190611160844.257498-1-sean@poorly.run> References: <20190611160844.257498-1-sean@poorly.run> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y0ji3mKIAYcSnIWYhM5qOS31Zm4Q2kAhyujo/uy/6OQ=; b=fM3KZbrpaFihyjRRXhQ0f28oOq0IjYkGF+uxYZU4Q5nzMuDevEJzTpIBsTCpetx0JG KIwuDEXjPUETg16u13Fi1o/o2tSRmY08FEa4NVp/CfvYB128jFlhMFh/eTCGNqf1+tuI LePTBxK5gJRFZo06jtNR+HfmtBszYL3cy7fdmxIERnMhDov4Z4iv4fnqQq554U50tqx2 ZvepiqoolL3BNq3DoJwiCERsH7XYFjoqbzLFwTNL+UvXXqYOEAHgiiJRVYoCcaaoXR+u tdxXWVyq+155asFBinX7tbF4zSJB5FHJl2B7A1rWEG72LWu6O4/59I5lPxDyr1UryyEr Rn6A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-rockchip@lists.infradead.org, Sean Paul , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Change the argument to vop_win_disable to vop_win to accomodate future changes to the function. Changes in v4: - Added to the patchset Changes in v5: - None Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-10-sean@poorly.run Tested-by: Heiko Stuebner Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 1ff79b2f9afa8..83c6884f558d5 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -538,8 +538,10 @@ static void vop_core_clks_disable(struct vop *vop) clk_disable(vop->hclk); } -static void vop_win_disable(struct vop *vop, const struct vop_win_data *win) +static void vop_win_disable(struct vop *vop, const struct vop_win *vop_win) { + const struct vop_win_data *win = vop_win->data; + if (win->phy->scl && win->phy->scl->ext) { VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE); VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE); @@ -598,9 +600,8 @@ static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) if (!old_state || !old_state->self_refresh_active) { for (i = 0; i < vop->data->win_size; i++) { struct vop_win *vop_win = &vop->win[i]; - const struct vop_win_data *win = vop_win->data; - vop_win_disable(vop, win); + vop_win_disable(vop, vop_win); } } spin_unlock(&vop->reg_lock); @@ -748,7 +749,6 @@ static void vop_plane_atomic_disable(struct drm_plane *plane, struct drm_plane_state *old_state) { struct vop_win *vop_win = to_vop_win(plane); - const struct vop_win_data *win = vop_win->data; struct vop *vop = to_vop(old_state->crtc); if (!old_state->crtc) @@ -756,7 +756,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane, spin_lock(&vop->reg_lock); - vop_win_disable(vop, win); + vop_win_disable(vop, vop_win); spin_unlock(&vop->reg_lock); } @@ -1587,7 +1587,6 @@ static void vop_destroy_crtc(struct vop *vop) static int vop_initial(struct vop *vop) { - const struct vop_data *vop_data = vop->data; struct reset_control *ahb_rst; int i, ret; @@ -1654,12 +1653,13 @@ static int vop_initial(struct vop *vop) VOP_REG_SET(vop, misc, global_regdone_en, 1); VOP_REG_SET(vop, common, dsp_blank, 0); - for (i = 0; i < vop_data->win_size; i++) { - const struct vop_win_data *win = &vop_data->win[i]; + for (i = 0; i < vop->data->win_size; i++) { + struct vop_win *vop_win = &vop->win[i]; + const struct vop_win_data *win = vop_win->data; int channel = i * 2 + 1; VOP_WIN_SET(vop, win, channel, (channel + 1) << 4 | channel); - vop_win_disable(vop, win); + vop_win_disable(vop, vop_win); VOP_WIN_SET(vop, win, gate, 1); }