From patchwork Fri Oct 24 18:00:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5149161 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6AAC9C11AC for ; Fri, 24 Oct 2014 18:00:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2D9720155 for ; Fri, 24 Oct 2014 18:00:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 302D820270 for ; Fri, 24 Oct 2014 18:00:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 10EBB6E5FE; Fri, 24 Oct 2014 11:00:22 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 88C9E6E5F9; Fri, 24 Oct 2014 11:00:20 -0700 (PDT) Received: by mail-wi0-f182.google.com with SMTP id bs8so1918290wib.9 for ; Fri, 24 Oct 2014 11:00:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=8L7Z+QdhsDzUHUn7AoB2CqAjgqO9aAg9kurhQCv5tqI=; b=EvIUB03TbwnJKZK20BKHFbJG7eiYUSuei5CQQQQYWh/6NyykOXHnUPNvmHPRAAjV3+ m/d8cZ8Xq6I9XsGFeKP1+cbM8mPzkbWWDoeeVKuskET2Pfwn3xiES9af7qnWhC2Xcz6I Euvl+mb1OQITYfXzrPyl/gH4lF/y7fFmJzmzgd9C5yLJ9Jt8IXQneEVmbxIP3/l25w1H ZSWFKIlx4lS1pfvRQ3z2VgHiinadXCY7HuuMAhUVh6Q/c/eTW1Eac7ykZoeTNudkt0HT pPXTv1sE6j8VYTlJa73GbUDHOwwoRC/i++qi3lHABpql+kjivg+YC1iRy5z+HaQVIJeZ lbGQ== X-Received: by 10.180.86.198 with SMTP id r6mr5641988wiz.29.1414173619341; Fri, 24 Oct 2014 11:00:19 -0700 (PDT) Received: from jasmin.cbg.collabora.co.uk (pakora.collabora.co.uk. [93.93.133.71]) by mx.google.com with ESMTPSA id j20sm6417190wjn.0.2014.10.24.11.00.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Oct 2014 11:00:18 -0700 (PDT) From: Gustavo Padovan To: intel-gfx@lists.freedesktop.org Date: Fri, 24 Oct 2014 19:00:17 +0100 Message-Id: <1414173618-20940-1-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 1/2] drm: make sure visible is set to false if fb is null X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Gustavo Padovan We can't let visible set true while the fb is null, some places of the code only check for visible to base its decisions. Signed-off-by: Gustavo Padovan Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_plane_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 827ec1a..fe4d1fb 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c @@ -127,6 +127,11 @@ int drm_plane_helper_check_update(struct drm_plane *plane, return -ERANGE; } + if (!fb) { + *visible = false; + return 0; + } + *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale); if (!*visible) /*