From patchwork Mon Jul 6 13:31:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1323617 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B0mh03GSyz9sQt; Mon, 6 Jul 2020 23:31:59 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jsRDv-0001LE-Hu; Mon, 06 Jul 2020 13:31:55 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jsRDs-0001L2-Pm for kernel-team@lists.ubuntu.com; Mon, 06 Jul 2020 13:31:52 +0000 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jsRDs-0000Ll-3U for kernel-team@lists.ubuntu.com; Mon, 06 Jul 2020 13:31:52 +0000 From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [SRU] [Unstable] [5.8] [PATCH 00/15] Fix mgag200 under Wayland Date: Mon, 6 Jul 2020 21:31:34 +0800 Message-Id: <20200706133149.20076-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1886140 [Impact] mgag200 doesn't work under Wayland. Hence GDM doesn't work unless Wayland is disabled. [Fix] Convert the mgag200 driver to use atomic modesetting. [Test] User reported positive result with this backport. [Regression Potential] Medium. There's already a performance regression [1] introduced by the patch set. However, the mgag200 devices are mainly used for server, so the glx regression is acceptable. Or the desktop just doesn't work under wayland at all. The patch is currently in -next, so it will land to v5.9. Tried to backport the series to v5.4 but the DRM change between v5.4 and -next is massive, so I tried to backport to v5.6 OEM kernel instead. There are some DRM change are still missing from v5.6, one of them mgag200 facilitates is managed DRM helpers (like devm_*()). I tried to modified the driver to use non-managed DRM helpers, but it's still not enough to make it work. So target Groovy here so we can have some nice early testings. [1] https://lore.kernel.org/dri-devel/20200603090929.GG12456@shao2-debian/ Thomas Zimmermann (15): drm/mgag200: Remove HW cursor drm/mgag200: Clean up mga_set_start_address() drm/mgag200: Clean up mga_crtc_do_set_base() drm/mgag200: Move mode-setting code into separate helper function drm/mgag200: Split MISC register update into PLL selection, SYNC and I/O drm/mgag200: Update mode registers after plane registers drm/mgag200: Set pitch in a separate helper function drm/mgag200: Set primary plane's format in separate helper function drm/mgag200: Move TAGFIFO reset into separate function drm/mgag200: Move hiprilvl setting into separate functions drm/mgag200: Move register initialization into separate function drm/mgag200: Remove out-commented suspend/resume helpers drm/mgag200: Use simple-display data structures drm/mgag200: Convert to simple KMS helper drm/mgag200: Replace VRAM helpers with SHMEM helpers drivers/gpu/drm/mgag200/Kconfig | 4 +- drivers/gpu/drm/mgag200/Makefile | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 51 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 45 +- drivers/gpu/drm/mgag200/mgag200_main.c | 5 - drivers/gpu/drm/mgag200/mgag200_mode.c | 871 ++++++++++++++----------- drivers/gpu/drm/mgag200/mgag200_reg.h | 11 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 28 +- 8 files changed, 528 insertions(+), 489 deletions(-)