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: 5149151 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E4E5F9F349 for ; Fri, 24 Oct 2014 18:00:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3168A2027D 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 3E6F020155 for ; Fri, 24 Oct 2014 18:00:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D7A76E5F9; Fri, 24 Oct 2014 11:00:21 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@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 Subject: [PATCH 1/2] drm: make sure visible is set to false if fb is null 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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) /*