From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63157CA90AF for ; Tue, 12 May 2020 18:56:42 +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 3FC8B207BC for ; Tue, 12 May 2020 18:56:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FC8B207BC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org 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 B26846E195; Tue, 12 May 2020 18:56:41 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 182526E195 for ; Tue, 12 May 2020 18:56:40 +0000 (UTC) Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id F256280444; Tue, 12 May 2020 20:56:37 +0200 (CEST) Date: Tue, 12 May 2020 20:56:36 +0200 From: Sam Ravnborg To: Thomas Zimmermann Subject: Re: [PATCH v2 00/15] drm/mgag200: Convert to atomic modesetting Message-ID: <20200512185636.GB13949@ravnborg.org> References: <20200512084258.12673-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200512084258.12673-1-tzimmermann@suse.de> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=MOBOZvRl c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=7gkXJVJtAAAA:8 a=fqz69h0-l20B31rmRzQA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=E9Po1WZjFZOl8hwRPBS3:22 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: john.p.donnelly@oracle.com, dri-devel@lists.freedesktop.org, kraxel@redhat.com, airlied@redhat.com, emil.velikov@collabora.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Thomas. On Tue, May 12, 2020 at 10:42:43AM +0200, Thomas Zimmermann wrote: > This patchset converts mgag200 to atomic modesetting. It uses simple > KMS helpers and SHMEM. > > Patch 1 removes cursor support. The HW cursor is not usable with the > way universal planes work. > > Patches 2 to 11 untangle the existing modesetting code into smaller > functions. Specifically, mode setting and plane updates are being > separated from each other. > > Patch 12 to 14 convert mgag200 to simple KMS helpers and enables atomic > mode setting. > > Atomically switching plane framebuffers, requires either source or target > buffer to be located at a non-0 offet. As some HW revisions seem to require > a framebuffer offset of 0 within the video memory, they do not work with > atomic modesetting. To resolve this problem, patch 15 converts mgag200 > from VRAM helpers to SHMEM helpers. During plane updates, the content of > the SHMEM BO is memcpy'd to VRAM. From my observation, performance is not > nuch different from the original code. > > The patchset has been tested on MGA G200EH hardware. > > v2: > * rebase patchset > * replace uint{8,32}_t with u{8,32} through-out patchset > * define additional register constants > * use helper functions around bpp-shift computations > * split conversion patch > * cleanups With the one comment addressed patch 1-14 are now all: Acked-by: Sam Ravnborg I did not look at the last patch - all the memory stuff is still beyond me. Nice to see this driver gettting so much love and care. The end result is a much nicer driver implmentation. Sam > > 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 | 41 +- > 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(+), 485 deletions(-) > > -- > 2.26.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel