From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Tomi Valkeinen Cc: Matthijs van Duin , "H . Nikolaus Schaller" , Merlijn Wajer , Sebastian Reichel , dri-devel@lists.freedesktop.org, Laurent Pinchart , linux-omap@vger.kernel.org List-Id: linux-omap@vger.kernel.org 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); } -- 2.24.1