From patchwork Mon Oct 28 08:45:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11214987 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 4A5B61747 for ; Mon, 28 Oct 2019 08:46:00 +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 31B9B20862 for ; Mon, 28 Oct 2019 08:46:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31B9B20862 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de 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 F12F6899C7; Mon, 28 Oct 2019 08:45:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id A653E89973 for ; Mon, 28 Oct 2019 08:45:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 13F89B21C; Mon, 28 Oct 2019 08:45:52 +0000 (UTC) From: Thomas Zimmermann To: airlied@redhat.com, sean@poorly.run, daniel@ffwll.ch, noralf@tronnes.org, sam@ravnborg.org, emil.velikov@collabora.com Subject: [PATCH 0/3] drm/udl: Convert to SHMEM Date: Mon, 28 Oct 2019 09:45:46 +0100 Message-Id: <20191028084549.30243-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Udl's GEM implementation is mostly SHMEM and we should attempt to replace it with the latter. Patches #1 and #2 update udl to simplify the conversion. In patch #3 the udl code is being replaced by SHMEM. The GEM object's mmap() and free_object() functions are wrappers around their SHMEM counterparts. For mmap() we fix-up the page-caching flags to distinguish between write-combined and cached access. For free(), we have to unmap the buffer's mapping that has been established by udl's fbdev code. The patchset has been tested by running the fbdev console, X11 and Weston on a DisplayLink adapter. Thomas Zimmermann (3): drm/udl: Remove flags field from struct udl_gem_object drm/udl: Allocate GEM object via struct drm_driver.gem_create_object drm/udl: Switch to SHMEM drivers/gpu/drm/udl/Kconfig | 1 + drivers/gpu/drm/udl/Makefile | 2 +- drivers/gpu/drm/udl/udl_dmabuf.c | 255 ------------------------------- drivers/gpu/drm/udl/udl_drv.c | 30 +--- drivers/gpu/drm/udl/udl_drv.h | 36 +---- drivers/gpu/drm/udl/udl_fb.c | 65 ++++---- drivers/gpu/drm/udl/udl_gem.c | 245 ++++++----------------------- 7 files changed, 93 insertions(+), 541 deletions(-) delete mode 100644 drivers/gpu/drm/udl/udl_dmabuf.c --- 2.23.0