Received: by 10.213.65.68 with SMTP id h4csp1723823imn; Mon, 19 Mar 2018 11:29:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELunMGhXHWGIIU6Xjo/fAZ1TCggsEaJFz4Ea5QGr8fWzAR/oKFagZ4EBc33nz4Lj0YHov714 X-Received: by 10.101.75.81 with SMTP id k17mr167695pgt.335.1521484146546; Mon, 19 Mar 2018 11:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521484146; cv=none; d=google.com; s=arc-20160816; b=HBKrMEVs8hDM1+tgS6W6MNW98VM6lpMCKzjJ6mzExaP2bbjXHYaz5TNkue+hsUvVcq iRvpnqm7SyPvBCyrY9Olcp4UpXw1JkBHT6FwBOC7zx1ESp70+svntmW5Occc2pifgUab oRad9kT1KNd77nm4/xqP2sjH6L4+3MDGL+w9kSRUnqY5AY7I+JIzSfR7GaLEzv3vvYRp /8qRmflCDUAUOw807sMRsxtvUy8dIBbIXEQ9uBosjRMhhUvyKJo5BkZNbeBpYWQvM3o8 f1fHPKPS+pYkpAu+ZPJi58DSuW9pN0jFgVekZWw/9sVMAGcOZ98y+cGmkEXbJ60WayXt 0/Nw== 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=KieoKMRiuYZpUA1GyeO0a9LLOxyNhm7DlCFHFNLJ8kY=; b=J4UiSpwsdpGvVGwJ6y8SHrCZiawI0EoDtyWwvliuewA5ycsRA2XxaUS+kbWclVSLLJ USpVfWANQ5/ZaR9R2hRuj8xowjUTyZMNaab6L7bX6xIgCjRDNixgptywceB2//XcSj5+ mvX4F/z7uLf+22mI16U1VXXzYzKk69k2ySFtAYWMNX9UnKYmQ7B3qgnw6b0ShhEiqO7U Piyskhe+BSPl576vEB3emTdOb5TxenZ721GYJ3e9i1aC1JLHrdmi8rFEovUAZtGZ1VNe u1vTVSAqNJyu70S8F86Ob8IbCrg1A8JbXm3/SvA2s3MQGd0OqV1SS3B9Yq37aweA0NLB cOxA== 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 i35-v6si409447plg.48.2018.03.19.11.28.51; Mon, 19 Mar 2018 11:29:06 -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 S969999AbeCSS0y (ORCPT + 99 others); Mon, 19 Mar 2018 14:26:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50960 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969937AbeCSS0r (ORCPT ); Mon, 19 Mar 2018 14:26:47 -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 5591311D5; Mon, 19 Mar 2018 18:26:46 +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.9 197/241] media: vsp1: Prevent suspending and resuming DRM pipelines Date: Mon, 19 Mar 2018 19:07:42 +0100 Message-Id: <20180319180759.347810101@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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 @@ -509,7 +509,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; @@ -520,7 +526,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; }