From patchwork Mon Sep 19 18:27:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: poma X-Patchwork-Id: 9340313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0907E607D0 for ; Mon, 19 Sep 2016 18:28:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3B6D294B5 for ; Mon, 19 Sep 2016 18:28:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E780529619; Mon, 19 Sep 2016 18:28:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 856D9294B5 for ; Mon, 19 Sep 2016 18:28:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BDC96E571; Mon, 19 Sep 2016 18:27:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D6F66E571 for ; Mon, 19 Sep 2016 18:27:56 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id 133so16357931wmq.2 for ; Mon, 19 Sep 2016 11:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=uyCU7DoL5FIAPu7WSo7ABs9IKXoOTyK1ocyf7TGIOSo=; b=OOLDMp7VGTbLpuqzUzGmIkLVPtJb2BjXgzrmADA9ZRAuY89GZJt2lvghxUGviiJlgR IfJzNVqlND5oNNixM6IQ00bn8P8/uNRBz5z4B2zWpFbevlBfpRNZBAfdbe6czYMy7btQ t4gh/moTnqjD+XqIXi8tJapdhF3Zcn9RsiLAQoGpkwWjzfxHggqorBORldfcestbt+Ra L+jsjQKhI5c7cCvMTbnQfOeyoRIh4Q+XzL+z7R602+qIJYcWMv9DAz8Nv3K5RuAr+exI sTsIrf9y6xwuetXekigQk0ph8YeCtnEPyRk/OX+3MTEGTiTclYu8KDBAJ/F8b4QjolfN y7Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uyCU7DoL5FIAPu7WSo7ABs9IKXoOTyK1ocyf7TGIOSo=; b=LE8lox4lIEbBbWHYwwGlwAkw6nc9ksjEiXSvlrMSDLL/n/NEO0oRSKyrUZ3cydd2eQ +wW+vR9SUf7P2xPgI+aQbofg0/hYRtjYjS0epvuJXhmzzOHK1JseQu+AGbWbvtuq6aKg SPYMBOp3sbH/Cf3kuh4c6fmexAzuTfzD1euGpI1DTBA5e6Oo4nTpU0NoWfGhEyru5wND 7rZM9k8Mzpvq5BgbWMOxqFguMIcEOyThmSTGZ4a7JJY6pW9AsaikFVN1Y69MMcAmZECb 2GzX/okPlFScCz2rZhAQg4+QPvtoQb+iCa9DtVfWy0kkbAFo0scZriL+36bAkHFqcUiq pnkg== X-Gm-Message-State: AE9vXwNQNl0JsMzFFNNi6o4t1zR3XHcR3WS4iZHHmWi5JjYw4G9QYCxtzCfeKVgAsez9+Q== X-Received: by 10.194.20.167 with SMTP id o7mr24781826wje.70.1474309674093; Mon, 19 Sep 2016 11:27:54 -0700 (PDT) Received: from localhost (iskon6323.duo.carnet.hr. [31.147.120.179]) by smtp.gmail.com with ESMTPSA id 190sm23305700wmk.13.2016.09.19.11.27.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2016 11:27:51 -0700 (PDT) Subject: Re: [PATCH] drm/udl: Fix for the X server screen update v2 To: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= , DRI Development References: <750b2697-456e-bb82-b287-f594450f092e@tronnes.org> <4e8e06da-717f-a4ca-0e87-ce3f5113e9b2@gmail.com> <34ff0a5d-b1ea-b5f9-f49e-4a2d24e8be7f@gmail.com> From: poma Message-ID: <88ba6722-c757-7685-5e89-6abe177aef44@gmail.com> Date: Mon, 19 Sep 2016 20:27:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <34ff0a5d-b1ea-b5f9-f49e-4a2d24e8be7f@gmail.com> Cc: Daniel Vetter , Gerd Hoffmann , Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fix for DisplayLink GPU USB2.0 device X server screen update Within X server on top of DisplayLink GPU USB2.0 device, screen content is not refreshed i.e. updated, which is the most basic functionality of the screen. This partially (udl_handle_damage()) reverts commit: - e375882406d0cc24030746638592004755ed4ae0 "drm/udl: Use drm_fb_helper deferred_io support" Thanks Noralf for the comments. Reported and Tested-by: poma --- drivers/gpu/drm/udl/udl_fb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index d5df555..05ab114 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c @@ -90,6 +90,7 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, struct urb *urb; int aligned_x; int bpp = (fb->base.bits_per_pixel / 8); + int x2, y2; if (!fb->active_16) return 0; @@ -115,6 +116,9 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, (y + height > fb->base.height)) return -EINVAL; + x2 = x + width - 1; + y2 = y + height - 1; + start_cycles = get_cycles(); urb = udl_get_urb(dev); @@ -122,14 +126,14 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, return 0; cmd = urb->transfer_buffer; - for (i = y; i < height ; i++) { + for (i = y; i <= y2 ; i++) { const int line_offset = fb->base.pitches[0] * i; const int byte_offset = line_offset + (x * bpp); const int dev_byte_offset = (fb->base.width * bpp * i) + (x * bpp); if (udl_render_hline(dev, bpp, &urb, (char *) fb->obj->vmapping, &cmd, byte_offset, dev_byte_offset, - width * bpp, + (x2 - x + 1) * bpp, &bytes_identical, &bytes_sent)) goto error; }