Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3728496imm; Mon, 8 Oct 2018 08:36:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV60KPa821+xtHi6aHFEUgn0xHhW+l5Y3lU1me2xdWXchv3d9Qw8ewhk2oFHREa5unN8UInmW X-Received: by 2002:aa7:8715:: with SMTP id b21-v6mr25489490pfo.250.1539012968318; Mon, 08 Oct 2018 08:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539012968; cv=none; d=google.com; s=arc-20160816; b=lHMZaqyux+E9tvKhQnOIFCsMN2Ibfc88Vc9N6t4we3GmJ9QExT6iCnioqZetmnI3Ka ObwQxPofwCsG/A8Sx4FWUTVmdTqzyUdvSW3DD3q0tQELeCUURcQrjxuIxnmE9CYO6Jwp 0aL6jlHxNb9KEbYmhm5e2vdCcYKnxTtlNpIcBlqNKqt3pR/kX/FCjuH4PnTt6fAhiBfS Ud7l3S6nnp5m2gNipp9hPGAE8tcJ0rl0Dmq8jGdfWhraIvTMPTIGmBnb6ltcLmj6II9Y LUVDouowfG160pSjr5VxGWRGIbqxgZZ0BlvQ8Wmz6/bEKYhDO3JrbLJEFiZnzGBXRsKs S5nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=PZhMZGZ8xUItahmUtcu+H52Bn08wUbiL8huEYrEfPuk=; b=Ww/VQgLEAEb8TI/IRk3szA3BDTduIlj0qPyz/AnAu+VolbCFRX4MKyGQbtzATsvqtQ MnMSqAiidLK+I+wc92dJjJnFwg8EzuILEVSyipPYLQVXlVem3g7o3NOiJtEZBwhWgk7J w6P0KH1xrpBDoGOwgosb9U74OMn6MGe0EdhayT5UABMqKB/PQ0PBbsH1Y8js3L71MMJ9 3XO/HiMuDBYDsrXdxi0ayzzLozyOyde152Z2c7DUAsC4atTGug8nXnnT7zx7XtxZf7pr kU2QoxnGmarPEMoxfjk76jZN6ZCVTJiLIernY6qQr2rpC5Z97SLL/sRo+pKR7rDfISBv WZdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TuJ2xlMN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si17845897plz.119.2018.10.08.08.35.52; Mon, 08 Oct 2018 08:36:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=TuJ2xlMN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727786AbeJHWiV (ORCPT + 99 others); Mon, 8 Oct 2018 18:38:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:56778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727723AbeJHWiU (ORCPT ); Mon, 8 Oct 2018 18:38:20 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9725F214DA; Mon, 8 Oct 2018 15:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539012365; bh=KQ9l+H4SBNGfrcMXoX3BNG9hfD1ntMhp+jDZ19rUU94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TuJ2xlMN/gPkEeq+UhvsiDZ5HvLB66YGLEwQ0PRRop7w3zELklO2J13uWYRo3ypJK LnTg4lmxdkOykYqXZ0mMtPAV6r/q4Y7UPnHrmO2EXbgpFwaqENphu7mBUqCulLIOak c/u8kYUQykLEHhOJ6kTvJdBR2wPdMAsTz0X+aoT8= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexandru Gheorghe , Liviu Dudau , Sasha Levin Subject: [PATCH AUTOSEL 4.18 40/58] drm: mali-dp: Call drm_crtc_vblank_reset on device init Date: Mon, 8 Oct 2018 11:25:05 -0400 Message-Id: <20181008152523.70705-40-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181008152523.70705-1-sashal@kernel.org> References: <20181008152523.70705-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Gheorghe [ Upstream commit 69be1984ded00a11b1ed0888c6d8e4f35370372f ] Currently, if userspace calls drm_wait_vblank before the crtc is activated the crtc vblank_enable hook is called, which in case of malidp driver triggers some warninngs. This happens because on device init we don't inform the drm core about the vblank state by calling drm_crtc_vblank_on/off/reset which together with drm_vblank_get have some magic that prevents calling drm_vblank_enable when crtc is off. Signed-off-by: Alexandru Gheorghe Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Signed-off-by: Sasha Levin --- drivers/gpu/drm/arm/malidp_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 0a788d76ed5f..0ec4659795f1 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -615,6 +615,7 @@ static int malidp_bind(struct device *dev) drm->irq_enabled = true; ret = drm_vblank_init(drm, drm->mode_config.num_crtc); + drm_crtc_vblank_reset(&malidp->crtc); if (ret < 0) { DRM_ERROR("failed to initialise vblank\n"); goto vblank_fail; -- 2.17.1