From patchwork Mon Feb 12 09:44:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 127965 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3040626ljc; Mon, 12 Feb 2018 01:46:20 -0800 (PST) X-Google-Smtp-Source: AH8x226cqPVHYfIVLV/4Uazol9reDJz/umf2+sbdKlyXxE2xwmhl0v4fqqVuoyx3NM1Az1xyfICV X-Received: by 2002:a17:902:424:: with SMTP id 33-v6mr10069453ple.57.1518428780734; Mon, 12 Feb 2018 01:46:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518428780; cv=none; d=google.com; s=arc-20160816; b=fmi7iVJ21t0fRFIDXHsyzAAN2xnUf0KXFq0hlbEUD1DDZeD4NUUVoh2fuambR5/GTz tpb/uMiLfO7uPs4VG+dAZ1HzQD6uWJjWpFLUCVYDFHwgTGFrG4g3rUnbbUwOXxRQEriH EBASbX645SBVisejPeZ+bcDKQiiEs1uBu1mUGipRAIhpJ9ngFbkcdPOIY/dkH9A35Jlx QueEnNf4ySUtfgsg0Ko8/jC62HFNbK9vtPbAz0VtczB5uddmF+Tpi2jC8R2Fd15OraQj p9ppqotGm3c46wxLdTgwsld9t67iRU508YMzYuZoiAVvVCDZdOrgG2dKKeGpoDJKURwF DMyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=v9Mdp9OgCO6ZnrsYdFV0lzb/cdPNgBjRcx3JFZW1qMo=; b=WZ0/U0sOWaa9Bxktx8zL1GqNm7SJgq+WMHZxWPYbmQ3rCNETjWW3GKvfw2jZlhC1xh Pj5h5cG9oL9OBHYcRddNhpNs2RV0l1rtg9oZvGsGlt1goc41w3aT6qA+mGRYrBNXCH7/ niYOkCnQVmWng4xbCFdVtl0pHZx4xpPsq6W203kmnYBSVtODYCxgpvQKr+ySiuY/tCm7 8uTmQNoWcHVp8Y7LQ7NAzRaXzk1kzUkjRGkGw4W/GB57RgmMfPXOzgi+n6ZAv8/qRZyL af6feA+ggiyu5jPZeXFx66cvj/akbh7CMnywtZ575l7A3x+Dl01PLFGJ9u65SdnFCfk4 M7Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QdEHxSlo; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id l14si1950666pff.308.2018.02.12.01.46.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 01:46:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=QdEHxSlo; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 329486E1CA; Mon, 12 Feb 2018 09:45:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49A496E1C8 for ; Mon, 12 Feb 2018 09:45:31 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1C9jSJD007863; Mon, 12 Feb 2018 03:45:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518428729; bh=BxT6nz6vXLLIBQcwWPzwf80H4ovmLucWDLUMu32MUt8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QdEHxSlo3zM2Tzhf2C5EZY1H7CIgnSKcp7GXQ3L4fT8QLQCeOf9F3tR8QsxeKCeyU 50pS8jMnomBGUHHfYhVjR0fCAntdPOXFhsw+2S4I0D9wOga/1Ndd7qJC1E1knKU7d8 SI/DsaqaCZF30/8SaLe6kcl70M0wRlPlvg9CvJ7c= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9jSeQ020079; Mon, 12 Feb 2018 03:45:28 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 12 Feb 2018 03:45:28 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 12 Feb 2018 03:45:28 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9j0NB003439; Mon, 12 Feb 2018 03:45:27 -0600 From: Tomi Valkeinen To: , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot Subject: [PATCH 14/24] drm/omap: dispc: disp_wb_setup to check return code Date: Mon, 12 Feb 2018 11:44:44 +0200 Message-ID: <1518428694-18018-15-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> References: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Benoit Parrot When dispc_wb_setup() calls dispc_ovl_setup_common() it does not check for failure but instead keeps on partially setting up WB. This causes the WB H/W to be partially initialized and yield unexpected behavior. Make sure return code is successful before proceeding. Signed-off-by: Benoit Parrot Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dispc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 679931e108f9..30bcee6580f5 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2678,6 +2678,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, wi->height, wi->fourcc, wi->rotation, zorder, wi->pre_mult_alpha, global_alpha, wi->rotation_type, replication, vm, mem_to_mem); + if (r) + return r; switch (wi->fourcc) { case DRM_FORMAT_RGB565: @@ -2718,7 +2720,7 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0); } - return r; + return 0; } static int dispc_ovl_enable(enum omap_plane_id plane, bool enable)