From patchwork Tue Dec 10 08:48:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11281711 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 E8E8E14B7 for ; Tue, 10 Dec 2019 08:49:10 +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 D15DC20726 for ; Tue, 10 Dec 2019 08:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D15DC20726 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 E2B416E863; Tue, 10 Dec 2019 08:49:09 +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 9777A6E860 for ; Tue, 10 Dec 2019 08:49:08 +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 1D52FAE5E; Tue, 10 Dec 2019 08:49:07 +0000 (UTC) From: Thomas Zimmermann To: airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org, kraxel@redhat.com, emil.velikov@collabora.com, noralf@tronnes.org, zboszor@pr.hu Subject: [PATCH v3 0/9] drm/udl: Convert to simple-pipe helpers and clean up Date: Tue, 10 Dec 2019 09:48:56 +0100 Message-Id: <20191210084905.5570-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 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: Thomas Zimmermann , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With only a single display pipeline and primary plane, udl is perfect for simple-pipe helpers. Patches 1 to 4 do the convertion. This enables atomic modesetting for udl devices. Patches 5 to 8 clean up handling of color depth and framebuffers. With universal planes that come with simple pipe, display updates can be implemented with DRM's damage handlers. The primary plane's formats array allows to export the correct preferred color depth. The original value was choosen for maximum compatibility, but did not represent the device's capability. Patch 9 removes udl's remaining, unused fb code. The patchset has been tested by running the fb console, X11 and Weston on a DisplayLink adapter. Posting v3 for (hopefully) final comments. v3: * use symbolic names for blanking ops * cosmetic changes v2: * rebased on the recent udl damage-handler patchset * moved atomic suspend/resume conversion into separate patch * don't call drm_connector_{register,unregister}() Thomas Zimmermann (9): drm/udl: Init connector before encoder and CRTC drm/udl: Convert to struct drm_simple_display_pipe drm/udl: Switch to atomic suspend/resume helpers drm/udl: Inline DPMS code into CRTC enable and disable functions drm/udl: Set preferred color depth to 16 bpp drm/udl: Convert to drm_atomic_helper_dirtyfb() drm/udl: Remove struct udl_device.active_fb_16 drm/udl: Move udl_handle_damage() into udl_modeset.c drm/udl: Remove udl_fb.c drivers/gpu/drm/udl/Makefile | 2 +- drivers/gpu/drm/udl/udl_connector.c | 21 +- drivers/gpu/drm/udl/udl_drv.c | 11 +- drivers/gpu/drm/udl/udl_drv.h | 29 +-- drivers/gpu/drm/udl/udl_encoder.c | 70 ------ drivers/gpu/drm/udl/udl_fb.c | 222 ----------------- drivers/gpu/drm/udl/udl_main.c | 3 - drivers/gpu/drm/udl/udl_modeset.c | 369 ++++++++++++++++------------ 8 files changed, 238 insertions(+), 489 deletions(-) delete mode 100644 drivers/gpu/drm/udl/udl_encoder.c delete mode 100644 drivers/gpu/drm/udl/udl_fb.c --- 2.24.0