From patchwork Fri Jul 29 14:44:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 73042 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1427203qga; Fri, 29 Jul 2016 07:44:57 -0700 (PDT) X-Received: by 10.98.20.201 with SMTP id 192mr70203935pfu.144.1469803497553; Fri, 29 Jul 2016 07:44:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i29si18760642pfa.172.2016.07.29.07.44.57; Fri, 29 Jul 2016 07:44:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753206AbcG2Ooi (ORCPT + 29 others); Fri, 29 Jul 2016 10:44:38 -0400 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:58070 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753029AbcG2Oob (ORCPT ); Fri, 29 Jul 2016 10:44:31 -0400 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.2.131.153]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id u6TEiM75008331; Fri, 29 Jul 2016 15:44:23 +0100 From: Liviu Dudau To: David Airlie , Mali DP Maintainers , Daniel Vetter Cc: DRI devel , LKML , Brian Starkey Subject: [PATCH 1/2] drm: mali-dp: Clear the config_valid flag before using it in wait_event. Date: Fri, 29 Jul 2016 15:44:15 +0100 Message-Id: <20160729144416.2860-2-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160729144416.2860-1-Liviu.Dudau@arm.com> References: <20160729144416.2860-1-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org config_valid variable is used to signal the activation of the CVAL request when the vsync interrupt has fired. malidp_set_and_wait_config_valid() uses the variable in wait_event_interruptible_timeout without clearing it first, so the wait is skipped. Cc: Brian Starkey Signed-off-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_drv.c | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 82171d2..87c9249 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -42,6 +42,7 @@ static int malidp_set_and_wait_config_valid(struct drm_device *drm) struct malidp_hw_device *hwdev = malidp->dev; int ret; + atomic_set(&malidp->config_valid, 0); hwdev->set_config_valid(hwdev); /* don't wait for config_valid flag if we are in config mode */ if (hwdev->in_config_mode(hwdev))