Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp463413imp; Thu, 21 Feb 2019 05:07:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IYf+3fgCyunBI7bMJKfEUj5Esz9OO2EeFJGhNWdPS9ZNaOUmkZJyIyzbaf1aGe75XjBJY2+ X-Received: by 2002:a65:6105:: with SMTP id z5mr35109321pgu.26.1550754449326; Thu, 21 Feb 2019 05:07:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550754449; cv=none; d=google.com; s=arc-20160816; b=YVRCUJ/8r9c2MRF5K0A7Vuk30n9ZbvEZokjwSdiRh1Cp7tudbKYtqqTqPPtwUFnt8V MUdaD2Q34hg2itF474aU29gYuP4ZE2GDFJvikNQVlTpH0hgh9J2GWsEsSoGN1auJ30Kh 6d5WjqQP5VgFgD4VPq65y005xPViCdknyOLqCgWRbxRIio91aTSPbrz38Pj3SvzLBy9y XlDs5nmvSRKLU9rsj3xp55tSlZzpdky3slKs/ERB+0SKAof45vXAX2nb2Z639oGQDFke k860mMK56Nbw3zLGJk/3Mg0yIGyLH2cwPBRXWIDcxMK1cV0WV6TKG0HKgfkoD+mVCi48 wkRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=YrqMI0FKTz+kQjfh74QDK3duKbsfnzi8fCuuD7veLGg=; b=awPB+3qf/EyWbW2y9ZZ6csxxa0STsJKrj5cSca4+9lTJxLVhtZ4m7c2O6I4lSAlrd/ h5lexRvNXDAwPdJBMQA2BP4OKE5h6a/UvzARND+w+gH21ESJ8zgnbasvtv01LyLFSu/h WH22HgnG+a2Hq6jP+GSdgGx83CMcW9oOJBGQ02F/k9pQhK2BW+3EM/MxMMluxfO0Td5t 45GqRfe7Mdq6wLnOOt6iAfVgiwo1AA/QB4ceaRMo3gzepTxJ8YcXPo/TwhbgsEWw4mjN 2jjCMYhULiBjKE9aszw5TUk8z2s+nfJ7WyIcWXSOmphUw120MnKIXZRmhQxievuo8Iu+ zDRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t191si281122pgd.270.2019.02.21.05.07.13; Thu, 21 Feb 2019 05:07:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbfBUNG0 (ORCPT + 99 others); Thu, 21 Feb 2019 08:06:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48332 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbfBUNGZ (ORCPT ); Thu, 21 Feb 2019 08:06:25 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A73F300561F; Thu, 21 Feb 2019 13:06:25 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-228.ams2.redhat.com [10.36.116.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 788581001DD2; Thu, 21 Feb 2019 13:06:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A2C3E11A9A; Thu, 21 Feb 2019 14:06:23 +0100 (CET) Date: Thu, 21 Feb 2019 14:06:23 +0100 From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org, Dave Airlie , David Airlie , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , open list Subject: Re: [PATCH v2 2/2] drm/qxl: kick out vgacon Message-ID: <20190221130623.rjtmtoe2qf7dgy2t@sirius.home.kraxel.org> References: <20190221113534.20764-1-kraxel@redhat.com> <20190221113534.20764-3-kraxel@redhat.com> <20190221122011.GP2665@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190221122011.GP2665@phenom.ffwll.local> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 21 Feb 2019 13:06:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 21, 2019 at 01:20:11PM +0100, Daniel Vetter wrote: > On Thu, Feb 21, 2019 at 12:35:34PM +0100, Gerd Hoffmann wrote: > > Problem: qxl switches from native mode back into vga compatibility mode > > when it notices someone is accessing vga registers. And vgacon does > > exactly that before fbcon takes over. So make sure we kick out vgacon > > early enough that it wouldn't disturb us. > > > > Signed-off-by: Gerd Hoffmann > > --- > > drivers/gpu/drm/qxl/qxl_drv.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c > > index bb81e310eb..08446561aa 100644 > > --- a/drivers/gpu/drm/qxl/qxl_drv.c > > +++ b/drivers/gpu/drm/qxl/qxl_drv.c > > @@ -95,6 +95,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > > goto modeset_cleanup; > > > > drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, 0, "qxl"); > > + drm_fb_helper_kick_out_vgacon(); > > I was thinking of checking whether pdev is a VGA class device and whether > it decodes vga access, and in that case automatically calling > kick_out_vgacon from remove_conflicting_pci_framebuffer. Since that's what > drivers want anyway, and those who don't can open code it. > > Or is there an issue with that? It'll need more careful testing to make sure we don't have unwanted side effects when just doing it for everyone. And I guess most drivers don't care much because their hardware ignores vga port writes once they are switched out of vga text mode. Dunno why i915 needs this. In case of qxl it is more a historical leftover. The very first qxl device revision had no explicit qxl command to switch from qxl native mode back to vga compatibility mode, vga port access was used for that instead. It's long fixed, but the qxl device still has that quirk for compatibility with very old guest drivers. cheers, Gerd