Received: by 10.213.65.68 with SMTP id h4csp238306imn; Fri, 23 Mar 2018 03:38:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELs+TgecRt6tCAOROi4STu7kHbhFpiLLoWHsJzEu/b1zzyIOPz24iIcL52CLtxJ9VtqjMfwG X-Received: by 10.99.142.201 with SMTP id k192mr20553502pge.278.1521801493284; Fri, 23 Mar 2018 03:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801493; cv=none; d=google.com; s=arc-20160816; b=BLGzodapj5SD/mko1IVTZ30dMc/+7KGeDyrTH+mW9Aezqz1/7kCy0VXYJhAiCEJNlH 2hQjfIOQTYu3x0pI807DLrFYuo/9ha7yuT/+FYN4XYirneULuuqwxtPL+WckDd0b+06l ssAr9Qbd92/P9kt+AOfgE1G4//0ndLmYZRDeauDFmF/GvXA5hVqDPb9Y+gzP8XerQG5f hJD3ATDTq+91o1sir9vEMQIxcWL50kEGnCWSNe+Au2ivO/miOMG+j2ulD9MPoX3WMuqV 3nZYVNVV21kSRV8dhWPFTfj7gk3gtS9IpOGBELPLUcJRtJfRZyfYJKeO7MXcmdbUps6l AjPw== 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=TX9GS+2oqC+OH9jONtZOG6UM44qmy6B9Ec+phwj16YE=; b=ATFCYhpRd9rW5uFYK7Ykkp6VE5gX5zQDtE2JOOdA2D0EVQMmZkChsUNfvhqmFMORJD Lc7I5jGYGVbQlyoG2YZNnmJRX2ssycA04HTUT1SkMrX6TfOmKy01dFYKJVDNdLqn8tQ/ gFp6nw6Je1e8SoLKYm0x62y3vuHLO2R3zLtIpEZ7OQ8IBktO/V8OAvlpsixST6XFYZly x1gsSyJ98OvCHGovYmqOcZeWoOMJ8CztyYdpQdTCl5F512xpfB0Lo75cOLADkJwl0BAt 3qg4v1qPyydp0E6eX9x0N32vn56hZE3mxkuVqOr2bLtPV6SLhmmWesjTueV7ToJEfyTd v7FQ== 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 t9si5842166pgq.271.2018.03.23.03.37.58; Fri, 23 Mar 2018 03:38:13 -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 S1756221AbeCWKhE (ORCPT + 99 others); Fri, 23 Mar 2018 06:37:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47242 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933819AbeCWKRb (ORCPT ); Fri, 23 Mar 2018 06:17:31 -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 E0723EE9; Fri, 23 Mar 2018 10:17:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Tomi Valkeinen , Sasha Levin Subject: [PATCH 4.4 87/97] drm/omap: DMM: Check for DMM readiness after successful transaction commit Date: Fri, 23 Mar 2018 10:55:14 +0100 Message-Id: <20180323094202.361754447@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Ujfalusi [ Upstream commit b7ea6b286c4051e043f691781785e3c4672f014a ] Check the status of the DMM engine after it is reported that the transaction was completed as in rare cases the engine might not reached a working state. The wait_status() will print information in case the DMM is not reached the expected state and the dmm_txn_commit() will return with an error code to make sure that we are not continuing with a broken setup. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -288,7 +288,12 @@ static int dmm_txn_commit(struct dmm_txn msecs_to_jiffies(100))) { dev_err(dmm->dev, "timed out waiting for done\n"); ret = -ETIMEDOUT; + goto cleanup; } + + /* Check the engine status before continue */ + ret = wait_status(engine, DMM_PATSTATUS_READY | + DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE); } cleanup: