From patchwork Fri Nov 27 06:57:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 7711201 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 33DD4BF90C for ; Fri, 27 Nov 2015 06:58:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FED62063F for ; Fri, 27 Nov 2015 06:58:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FDD22062E for ; Fri, 27 Nov 2015 06:58:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751025AbbK0G6o (ORCPT ); Fri, 27 Nov 2015 01:58:44 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:29348 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbbK0G6n (ORCPT ); Fri, 27 Nov 2015 01:58:43 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NYG00072OPTIA10@mailout2.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 27 Nov 2015 06:58:41 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-18-5657ff205798 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 1C.B1.21385.02FF7565; Fri, 27 Nov 2015 06:58:40 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NYG00815OPMV430@eusync2.samsung.com>; Fri, 27 Nov 2015 06:58:40 +0000 (GMT) From: Andrzej Hajda To: Javier Martinez Canillas Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , gustavo@padovan.org, Inki Dae , Kyungmin Park , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] drm/exynos: atomic check only enabled crtc states Date: Fri, 27 Nov 2015 07:57:31 +0100 Message-id: <1448607451-13784-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: References: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPLMWRmVeSWpSXmKPExsVy+t/xK7oK/8PDDK5ss7a4te4cq8XGGetZ La58fc9msfPBLnaLSfcnsFhc+z2DzeL1C0OLs01v2C1mnN/HZLH2yF12By6Pv7NbmT3udx9n 8tg5aS+TR9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGX8XvWbpWAZe8XhU1eYGhinsHUxcnJI CJhIrOo6yQ5hi0lcuLceLC4ksJRRYuumKgi7iUliyUFjEJtNQFPi7+abYDUiAkYSnbuusoDY zAIvmCQ6mnJBbGEBJ4n3y1oYuxg5OFgEVCWu7CkHCfMKOEvM6TgOtUpO4uSxyawgNqdAsMTH Ay2sEKsCJD6dnsAygZF3ASPDKkbR1NLkguKk9FwjveLE3OLSvHS95PzcTYyQYPu6g3HpMatD jAIcjEo8vBLp4WFCrIllxZW5hxglOJiVRHg53wKFeFMSK6tSi/Lji0pzUosPMUpzsCiJ887c 9T5ESCA9sSQ1OzW1ILUIJsvEwSnVwCiYMGfybfG199g0ZsvKrVI8YZzjLFXwRWlHb3umYon+ t4nsVc3ccT1dQvcXbN76e2eUw38Z5wqbx1ECOQ/q1qRn73oxYcGm2xW3H5bu/Dn/2KNfFxcr JutasB7UFuSPv6fLkK5Z+ciSW05p9aW4/YxHjsX73Kv/z+Q1w+vYBBmrQJU6FTXBe0osxRmJ hlrMRcWJAPWybdoyAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since atomic check is called also for disabled crtcs it should skip mode checking as it can be uninitialized. The patch fixes it. Signed-off-by: Andrzej Hajda Suggested-by: Daniel Vetter Tested-by: Javier Martinez Canillas --- Hi Javier, Could you check with this patch. Regards Andrzej drivers/gpu/drm/exynos/exynos_drm_crtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index b3ba27f..e693571 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -55,6 +55,9 @@ static int exynos_crtc_atomic_check(struct drm_crtc *crtc, { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); + if (!state->enable) + return 0; + if (exynos_crtc->ops->atomic_check) return exynos_crtc->ops->atomic_check(exynos_crtc, state);