Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1968883imm; Thu, 24 May 2018 03:46:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoEuzxVuee6mld8KXDPkcA9W4p+rrOEdtMoyiji8vzyEzR46NVm6DPXQrRoruPgbNaKe1z+ X-Received: by 2002:a62:5b02:: with SMTP id p2-v6mr6670522pfb.96.1527158788554; Thu, 24 May 2018 03:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527158788; cv=none; d=google.com; s=arc-20160816; b=Tauz9IygBKroAv4EIlihgSg5vtp8dtB/hLXOFqjQvFNc+Fe4m2eQoP6L/y0JH7nfMj X51lXRL0Ihwm3/KMQSpW09fHJZIJ4z188SwQ2h0+kLZ2Iu+kAxse+uhn/L1F/luUzhMJ j63vT7apMiiUoaXFwvc+1IpyqmYPgysYFNQzre1nFvhuSTUNcNuWOCMFbpt4uQWrzgDX MQjoTcNl8tiNpI1nWXPB9hxsfT6Kc1W8oyHq2eXqCI700via8Ve3yt5Nwh/ydKJHw1nx rYfv2GMRRLTT7QN2edMaXEI/Gwsy75fZR82XnohyUR1lOnlVgj+qlf+MaIb9DZ37wWzs 3dkQ== 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:dkim-signature :arc-authentication-results; bh=Coq6HrASfMDbFG1ZdB/bL78IV+1IcBSYHQwLg+AO2Kg=; b=agjPoGp+gIjDKhxLqPeiEH4g+aCj7HTcEeeTMYVkGoosPocS17SmKC6MKdRXlfolB1 0RZkvUr7lpmWKL1KaTooJyqlvRKYBqjs+a/5MC34PxdFNY93U6YmG7d8K9ftTgDcVujw BHTVhATrxb8TNKlvArKXwgMx96SbAo9VQ4oiNXNoT4AYxN4H5GjYvtbhQHYOwixWed0m HYQrDDMV3yO1Q47qFA9TJJSETZ98MnR7z69UQiKpAuPNqjLkS7O6KbUdvp5dTUMw1CMK jsywdDjrYDfKv+RjkqCUuf0auG31zXWqewsY35MgZwClOSlIvVA7WzxEf/v+ufZ45/Iq Sbvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nktLfzvn; 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 190-v6si13870846pgi.333.2018.05.24.03.46.13; Thu, 24 May 2018 03:46:28 -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=nktLfzvn; 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 S1030536AbeEXJ5z (ORCPT + 99 others); Thu, 24 May 2018 05:57:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:37594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030526AbeEXJ5t (ORCPT ); Thu, 24 May 2018 05:57:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C06820893; Thu, 24 May 2018 09:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155868; bh=bMcAxoot9WXJp2KugC9zLUtXIBfnfJXnmjH8vjeqokI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nktLfzvnm7pxD3YLxuW2o4wWGKI9Cs4yoFe2C0HmQsaWjJUGQushUy1bl5jxleMfb Fl6Iu3JGtjV1KiON8Djztp9uRn/359lzQxXxB+R65IiUfzCKKRQeNz+ejBnKisraPQ kGt83JjEELAaDK1J2oNWdAAifHnclKrbw61d+JwE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Pinchart , Kieran Bingham , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.14 145/165] media: v4l: vsp1: Fix display stalls when requesting too many inputs Date: Thu, 24 May 2018 11:39:11 +0200 Message-Id: <20180524093627.941751796@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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: Laurent Pinchart [ Upstream commit 5e3e4cb5e24b92773b194aa90066170b12133bc6 ] Make sure we don't accept more inputs than the hardware can handle. This is a temporary fix to avoid display stall, we need to instead allocate the BRU or BRS to display pipelines dynamically based on the number of planes they each use. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vsp1/vsp1_drm.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -504,6 +504,15 @@ void vsp1_du_atomic_flush(struct device struct vsp1_rwpf *rpf = vsp1->rpf[i]; unsigned int j; + /* + * Make sure we don't accept more inputs than the hardware can + * handle. This is a temporary fix to avoid display stall, we + * need to instead allocate the BRU or BRS to display pipelines + * dynamically based on the number of planes they each use. + */ + if (pipe->num_inputs >= pipe->bru->source_pad) + pipe->inputs[i] = NULL; + if (!pipe->inputs[i]) continue;