From patchwork Sat Dec 21 00:57:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 11307871 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9766813B6 for ; Mon, 23 Dec 2019 08:12:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 802CA2073A for ; Mon, 23 Dec 2019 08:12:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 802CA2073A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E73B6E21A; Mon, 23 Dec 2019 08:10:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 1268E6E15C for ; Sat, 21 Dec 2019 00:57:17 +0000 (UTC) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id F05FD80EA; Sat, 21 Dec 2019 00:57:54 +0000 (UTC) From: Tony Lindgren To: Tomi Valkeinen Subject: [PATCH] drm/omap: gem: Fix tearing with BO_TILED Date: Fri, 20 Dec 2019 16:57:11 -0800 Message-Id: <20191221005711.47314-1-tony@atomide.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 23 Dec 2019 08:10:46 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthijs van Duin , "H . Nikolaus Schaller" , Merlijn Wajer , Sebastian Reichel , dri-devel@lists.freedesktop.org, Laurent Pinchart , linux-omap@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On my droid4 I noticed bad constant tearing on the LCD with stellarium in landscape mode with xorg-video-omap rotated with xrandr --rotate right. Every second or so update gets squeezed down in size to only the top half of the LCD panel. This issue does not happen with xrandr --rotate normal, or when HDMI display is also connected. Looks like xorg-video-omap switches to tiled mode in the the rotated case. Looking around what might affect BO_TILED, I noticed Matthijs had this change in his earlier pyra tiler patches. The earlier patch "XXX omapdrm: force tiled buffers to be pinned and page-aligned" has no commit log though, so I'm not sure what other issues this might fix. This is with the old pvr-omap4 driver, but presumably the same issue exists in all cases. Cc: H. Nikolaus Schaller Cc: Laurent Pinchart Cc: Matthijs van Duin Cc: Merlijn Wajer Cc: Sebastian Reichel Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren --- Matthijs, do you have some more info to add to the description? drivers/gpu/drm/omapdrm/omap_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -789,7 +789,7 @@ int omap_gem_pin(struct drm_gem_object *obj, dma_addr_t *dma_addr) if (omap_obj->flags & OMAP_BO_TILED_MASK) { block = tiler_reserve_2d(fmt, omap_obj->width, - omap_obj->height, 0); + omap_obj->height, PAGE_SIZE); } else { block = tiler_reserve_1d(obj->size); }