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=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 B784FC47089 for ; Thu, 27 May 2021 09:17:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 28193613D8 for ; Thu, 27 May 2021 09:17:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28193613D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CMsVIvYjRb8NwC0/IA/a57iPxUzOGdH8XKuSNXIf6ac=; b=lk0VpOM2C0V4eX 2x9eg9vnzhSJQFFpuEvtEKsJNu0+ZofUDy6EKBvY5t89rOXi3tMT1IAyD2JYeSf/FHmgvwcaa4CAn hG4sIboH3TGZiTPmhjInkE21aK6VJYbuATbZuJ10LMzxWC49DFQSi66OSpxWcR5lj2PnuCXkwfbDM G2gfZ+VeEi7drClW1g3n1kuPs0npsEDDi446w/5HU86Wu9XA5gP4FW7Aj3hjyqQuLS3e9N3q8kO06 lEfEkQ5/5h1NM3/fLqeP34NsyTPHheIxOpwqT/zD85rGGt73eGjoTjnUUGq8/gQIKxrz+brFIkrVT pmytkk486W1qiLbHcK7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmC6n-004DrX-W6; Thu, 27 May 2021 09:15:18 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lmC6h-004DoZ-7B; Thu, 27 May 2021 09:15:12 +0000 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmC6Y-0006zN-RK; Thu, 27 May 2021 11:15:02 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: linux-kernel@vger.kernel.org, Javier Martinez Canillas Cc: Peter Robinson , Thomas Zimmermann , Javier Martinez Canillas , Daniel Vetter , David Airlie , Sandy Huang , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v2] drm/rockchip: remove existing generic drivers to take over the device Date: Thu, 27 May 2021 11:15:02 +0200 Message-ID: <4006303.q0ZmV6gNhb@diego> In-Reply-To: <20210516074833.451643-1-javierm@redhat.com> References: <20210516074833.451643-1-javierm@redhat.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210527_021511_320451_533A1EA8 X-CRM114-Status: GOOD ( 23.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Sonntag, 16. Mai 2021, 09:48:33 CEST schrieb Javier Martinez Canillas: > There are drivers that register framebuffer devices very early in the boot > process and make use of the existing framebuffer as setup by the firmware. > > If one of those drivers has registered a fbdev, then the fallback fbdev of > the DRM driver won't be bound to the framebuffer console. To avoid that, > remove any existing generic driver and take over the graphics device. > > By doing that, the fb mapped to the console is switched correctly from the > early fbdev to the one registered by the rockchip DRM driver: > > [ 40.752420] fb0: switching to rockchip-drm-fb from EFI VGA > > Signed-off-by: Javier Martinez Canillas fwiw, this looks like the right thing to do. I haven't found time to test though yet. So anyway Acked-by: Heiko Stuebner Heiko > --- > > Changes in v2: > - Move drm_aperture_remove_framebuffers() call to .bind callback (tzimmermann). > - Adapt subject line, commit message, etc accordingly. > > drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > index 212bd87c0c4..b730b8d5d94 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c > @@ -16,6 +16,7 @@ > #include > #include > > +#include > #include > #include > #include > @@ -114,6 +115,15 @@ static int rockchip_drm_bind(struct device *dev) > struct rockchip_drm_private *private; > int ret; > > + /* Remove existing drivers that may own the framebuffer memory. */ > + ret = drm_aperture_remove_framebuffers(false, "rockchip-drm-fb"); > + if (ret) { > + DRM_DEV_ERROR(dev, > + "Failed to remove existing framebuffers - %d.\n", > + ret); > + return ret; > + } > + > drm_dev = drm_dev_alloc(&rockchip_drm_driver, dev); > if (IS_ERR(drm_dev)) > return PTR_ERR(drm_dev); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel