Received: by 10.213.65.68 with SMTP id h4csp499426imn; Fri, 16 Mar 2018 09:36:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELsRXSxEnAP8Gj9UsT3PSe8U8Re4U7XxrDUXfH42dXXyfWsPv9B+8NXZdCgp6TFpHeZRVPck X-Received: by 10.98.207.135 with SMTP id b129mr2093489pfg.84.1521218175366; Fri, 16 Mar 2018 09:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218175; cv=none; d=google.com; s=arc-20160816; b=0kyVzfW7t8KhW8cI1W2KXxUGLsi9JxgA+ZzwzDho/vI4ctO8HwHDRWqPC8D5xa1n3u LaWEXFQQHyewWg3JmEFesXaoWiNI8fJBmhLrr11DoOV1k9YuWucz6yU1G4T9AoRxm59J fP1xwdCbTXNL2kSHDCuMg4gPIIDFJ7ttlxS4iVNLk9y/Nk8Wx7QQD2cvNgRRj4KcYIu1 o/l7/c72lRUaR4n2PjYsWRMQMiDQbyNnrOuru+xR18UrlpOQw6yz9YFZE49t2VLH2yUr 7dpoVTAryqS5e22HNGERZLswyKZge+lKUKvwvBXCs5peL8eV/ldzFe0WHqXkDa79yLjv LkYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rVCbdaT7mJwc4D6klXp95MFaCtuw3BsZgzlbbYGC6eo=; b=mtG87+AVnP3h6LyiPu4gnaqX1FK1a0+rL45dDxhy/Pt68VieP4FjCq5CvcdHKkRyal 0XR7dKT2yu1sGXGjpVDUArr+K/T5hVcKPJ0zsWPNnmZ/eD993QxjjrGEonHCcmJucydi IC1nhombf3L07KZQBIkTI1Uc6auNpFuOm0wbn6nGY2fsudPIu8ChCDb3Jv0x8DzUrrhp LfWMPKlKMv97iyNvoLSFD82a5A4/3zN3s1JM6Oo/Kl2eZKiNfVNO+5ZaxQJMamVBEAqM +blxofkPN32gb3+0KikpEY/HzmTs0/M785IeMEbFStRBokkv3YrVdVfriawjR5XMbTSu 0q2g== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a100-v6si6497171pli.483.2018.03.16.09.36.01; Fri, 16 Mar 2018 09:36:15 -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 S934464AbeCPPh6 (ORCPT + 99 others); Fri, 16 Mar 2018 11:37:58 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41910 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbeCPPh4 (ORCPT ); Fri, 16 Mar 2018 11:37:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 14EB7125F; Fri, 16 Mar 2018 15:37:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kieran Bingham , Laurent Pinchart , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 085/109] media: vsp1: Prevent suspending and resuming DRM pipelines Date: Fri, 16 Mar 2018 16:23:54 +0100 Message-Id: <20180316152334.555684549@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kieran Bingham [ Upstream commit a17d2d6cd9985ca09a9e384f1bc71d710f7e5203 ] When used as part of a display pipeline, the VSP is stopped and restarted explicitly by the DU from its suspend and resume handlers. There is thus no need to stop or restart pipelines in the VSP suspend and resume handlers, and doing so would cause the hardware to be left in a misconfigured state. Ensure that the VSP suspend and resume handlers do not affect DRM-based pipelines. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vsp1/vsp1_drv.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -571,7 +571,13 @@ static int __maybe_unused vsp1_pm_suspen { struct vsp1_device *vsp1 = dev_get_drvdata(dev); - vsp1_pipelines_suspend(vsp1); + /* + * When used as part of a display pipeline, the VSP is stopped and + * restarted explicitly by the DU. + */ + if (!vsp1->drm) + vsp1_pipelines_suspend(vsp1); + pm_runtime_force_suspend(vsp1->dev); return 0; @@ -582,7 +588,13 @@ static int __maybe_unused vsp1_pm_resume struct vsp1_device *vsp1 = dev_get_drvdata(dev); pm_runtime_force_resume(vsp1->dev); - vsp1_pipelines_resume(vsp1); + + /* + * When used as part of a display pipeline, the VSP is stopped and + * restarted explicitly by the DU. + */ + if (!vsp1->drm) + vsp1_pipelines_resume(vsp1); return 0; }