Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1048623ybm; Wed, 27 May 2020 14:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGUYFtT9Gqmsln7rHUaUujHCxdwTPm2X+4NOE22GLqrgnaPMybQ4CADZMvLaalv81R8kNO X-Received: by 2002:a50:eb0c:: with SMTP id y12mr170150edp.165.1590616410038; Wed, 27 May 2020 14:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616410; cv=none; d=google.com; s=arc-20160816; b=H8Mwiv7OSqSJg5EdaTNfl0HhArLvmMqZkuoPcwEjZY2OJxYXgmYWGJuWULcJDDT8iG /jCbhLEeyhqqqo/2wH/rD4qurBnDWLrO6WcUIgRnAq+nuhyCSoKyddkfW7xWO9bZWBT1 9LqVhynLXLbf331pEUoN+EZ848E6OMnyoYntVSB9kGcvzNk1s8bpZjMNcuynpyPUEjjC Ysetx9rvsDr6JKDdy/u2BfbFjgzQAhSzk3t2qhiKZstodAevP58O6NNyU+bpQfHSDPJO BEDQW8Q1IhDkNkVlPyxN2t1DYM6fV7z9DgucWWZ4X3HBSPva92wUtuPIsyZBieiJ1G5d 09wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Z1BN/HoQLkbcjo0BxZGMcqOkT9HeGniShqJTIFpowsA=; b=DXvDe6ZM/OEDqSBJTicGxOQ4ATQ0XuL0e6jOuuOoLqvR3x/hhe+XezID1q8TzhQIU5 /4hBcfnlgfnWpV/oy7SHduPwn4aqqn+dXgLFIAIdewIvJxmceJJOIHYLNeXJRz8GKpT7 dr2bGQDzMlnAxmvH5tQciYCCy0Whg2K4I1Az2Vyx4kmKJFdBHvenMADAuXN7zhZ9QUZh GclnJSpt2hgtxDSSV44qUohJU24qBWpXwbWeW1RD5xEHQSC9Ysz9bBumEWtXQKGVMFfE U97k0yL5yJMU7I2N1/baFPvRs+Sy5bBv1qxTnIjQFu5Smdyr8HsLw0KIH46lG/vYO9lF 5dzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=Vn6gVAYO; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=GzTjeg0z; 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=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t2si2476015eds.9.2020.05.27.14.53.03; Wed, 27 May 2020 14:53:30 -0700 (PDT) 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; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=Vn6gVAYO; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=GzTjeg0z; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388642AbgE0Pzv (ORCPT + 98 others); Wed, 27 May 2020 11:55:51 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:51295 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390245AbgE0PvE (ORCPT ); Wed, 27 May 2020 11:51:04 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id ADCFB5820D5; Wed, 27 May 2020 11:51:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 27 May 2020 11:51:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=Z1BN/HoQLkbcj o0BxZGMcqOkT9HeGniShqJTIFpowsA=; b=Vn6gVAYOPjBo0geluN+1b9VLByO+a 21tmUdrJNaRaoBo+tJD58dq9PAC/OcL2mb+fXEW5W2g74gRV/LOz3kubifhEeK3j N2+7jc4sI6KNyaN7Ha/wCrTWmRg90JQIiCwADJGErbFl53Mx6cfqIh3R9Vp0ovod LYyjQwJZAugaD9Jg3axUVt6TE0V3iowStrhKpukpcizyEzerfVMOsVP93MMFHlYu +mwD2XPZrrtGhJBCK11pyCvELB1YCw9QRdLvIVVXhd+oTZQaDmaAPUc69CaW7bDb jtc0cAkL903h50z36fFPhvCAbfc+L6jfPZiGMntIlcj0SQIDHkEE7KJ5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=Z1BN/HoQLkbcjo0BxZGMcqOkT9HeGniShqJTIFpowsA=; b=GzTjeg0z lcKdrimUmYAEOH3DSMKu5ryZqj7EhIG21cPKjtir4MJzfGvdE3fV+6mbLSkvjS/b 5LopJAVRMPOQhdrwq1XncwHtF6BEqRhU61nlQfzR1bV3cLHrrRx1j+Hcrx97/FZn 3fV376YbFXRvLrXsIWmpkZEIxv1xQTP7RATw+Nr5aOlOig3/4+plTse+vBEgrDrh xPauE1W5L6HljXih7yt7nHmCgCrMvkQQsP9X8uj7TAxb2Ckt7IDM12RXvd4pI4Q+ J3bit0fIWcUJdW08oTuc8ndWd9OQcqLsNd+/FjPzwzzTL8JBJVvzXVb1PiFeLs6T Z78fZFQJDWsd9Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepgeekne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C79A30618B7; Wed, 27 May 2020 11:51:03 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell , Maxime Ripard Subject: [PATCH v3 067/105] drm/vc4: crtc: Remove the feed_txp tests Date: Wed, 27 May 2020 17:48:37 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the code in vc4_crtc accessing registers is only meant for the pixelvalve, it doesn't make sense anymore to test whether we're accessing the TXP or not and we can safely remove those checks. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index d6eca130644d..e15dc1553df9 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -405,19 +405,16 @@ static void require_hvs_enabled(struct drm_device *dev) static int vc4_crtc_disable(struct drm_crtc *crtc, unsigned int channel) { - struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc); struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder); struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); struct drm_device *dev = crtc->dev; int ret; - if (!vc4_state->feed_txp) { - CRTC_WRITE(PV_V_CONTROL, - CRTC_READ(PV_V_CONTROL) & ~PV_VCONTROL_VIDEN); - ret = wait_for(!(CRTC_READ(PV_V_CONTROL) & PV_VCONTROL_VIDEN), 1); - WARN_ONCE(ret, "Timeout waiting for !PV_VCONTROL_VIDEN\n"); - } + CRTC_WRITE(PV_V_CONTROL, + CRTC_READ(PV_V_CONTROL) & ~PV_VCONTROL_VIDEN); + ret = wait_for(!(CRTC_READ(PV_V_CONTROL) & PV_VCONTROL_VIDEN), 1); + WARN_ONCE(ret, "Timeout waiting for !PV_VCONTROL_VIDEN\n"); mdelay(20); @@ -488,7 +485,6 @@ static void vc4_crtc_atomic_enable(struct drm_crtc *crtc, { struct drm_device *dev = crtc->dev; struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); - struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc); struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder); @@ -504,10 +500,8 @@ static void vc4_crtc_atomic_enable(struct drm_crtc *crtc, if (vc4_encoder->pre_crtc_configure) vc4_encoder->pre_crtc_configure(encoder); - if (!vc4_state->feed_txp) { - vc4_crtc_config_pv(crtc); - CRTC_WRITE(PV_CONTROL, CRTC_READ(PV_CONTROL) | PV_CONTROL_EN); - } + vc4_crtc_config_pv(crtc); + CRTC_WRITE(PV_CONTROL, CRTC_READ(PV_CONTROL) | PV_CONTROL_EN); if (vc4_encoder->pre_crtc_enable) vc4_encoder->pre_crtc_enable(encoder); @@ -515,9 +509,8 @@ static void vc4_crtc_atomic_enable(struct drm_crtc *crtc, /* When feeding the transposer block the pixelvalve is unneeded and * should not be enabled. */ - if (!vc4_state->feed_txp) - CRTC_WRITE(PV_V_CONTROL, - CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN); + CRTC_WRITE(PV_V_CONTROL, + CRTC_READ(PV_V_CONTROL) | PV_VCONTROL_VIDEN); if (vc4_encoder->post_crtc_enable) vc4_encoder->post_crtc_enable(encoder); @@ -596,10 +589,6 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc, static int vc4_enable_vblank(struct drm_crtc *crtc) { struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); - struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); - - if (vc4_state->feed_txp) - return 0; CRTC_WRITE(PV_INTEN, PV_INT_VFP_START); @@ -609,10 +598,6 @@ static int vc4_enable_vblank(struct drm_crtc *crtc) static void vc4_disable_vblank(struct drm_crtc *crtc) { struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); - struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc->state); - - if (vc4_state->feed_txp) - return; CRTC_WRITE(PV_INTEN, 0); } -- git-series 0.9.1