From owner-freebsd-current@freebsd.org Tue Jan 24 20:56:11 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DBDBCC0ED4 for ; Tue, 24 Jan 2017 20:56:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wj0-x22e.google.com (mail-wj0-x22e.google.com [IPv6:2a00:1450:400c:c01::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F772A6C for ; Tue, 24 Jan 2017 20:56:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wj0-x22e.google.com with SMTP id uo9so1002154wjc.1 for ; Tue, 24 Jan 2017 12:56:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=og2Qshx6xoTTZeu3a0OnUTYbdwlbkqBR34muMntc4m4=; b=kCS+0kRKUSgHNPlj9T8TT2SxqEBMRj02aeoihkXMkuePJ8NzPxyBrGbuE7QjdWllP3 xAhYo459MSOgWcnsbSH+NzujMXybBOQnoEzIHypnk2LQJuwwk8nLzdxFNyXwxB3KmV+k y8mr9g06kAmF0bOkj9zxp0S2xu2eJLdjqUhpV1MMgkzkcbhjvc2JAZHYJio79Lc8t3FP BxNaAdmDt+I0pr/0jHBlKZa02maWrp+hnHdj0dC/kNf0WiGBNrn5CoYKMGIVvggxtH2N 9ps7LA0mi7mb0ivn3GWiMHD/WdR5kqw/lSbaloCmmbDo14wZ38Rec7EfR3Frz7pIdZt2 07XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=og2Qshx6xoTTZeu3a0OnUTYbdwlbkqBR34muMntc4m4=; b=ru8JnA5x2RCB0w6jDmFUXMlUsDzY2j+sjY+JajLiRiWpVAYjEsA1WmGad088uEh+HM zipK3iYgBx1XrSjfXu9W/AKWqYHish739MiEzda2zl/jQY1paIOnHwdH+gq5jjeZcvIJ ewgwu4LbPHXRuNiWtSEAb8fC9dBUPlkc1tyxkISrjDr4H2MxRo8aAqkVhuHJYijwhVcX jJRxK7PouNFuT1wbNO73ILDh/z91YcOr7k2TW3z0NejQgVuX8ECY9nYaJSyGWxLrKppN WGKoneOiNr7c+Kg2Ph7poeDmUKauPsnXEZg/1oIUVAOZJs6Es7nT5WSZjFoPdbydHqi6 7a8g== X-Gm-Message-State: AIkVDXJuWNOQjbulXaO0kYpx9UmSk82H4S7wlBJjKDlKQ5tD+EW08d827WgWK3zBCFSwvkopTVU9hY500Hvm0Q== X-Received: by 10.28.100.132 with SMTP id y126mr19314838wmb.116.1485291359700; Tue, 24 Jan 2017 12:55:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.82.162 with HTTP; Tue, 24 Jan 2017 12:55:58 -0800 (PST) In-Reply-To: References: From: Adrian Chadd Date: Tue, 24 Jan 2017 12:55:58 -0800 Message-ID: Subject: Re: vt(4) chops off the leftmost three columns To: Anindya Mukherjee Cc: "freebsd-current@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2017 20:56:11 -0000 hi! Well, give it a go. I can only be supportive. :) -a On 24 January 2017 at 10:31, Anindya Mukherjee wrot= e: > Hi again, > > I have been switching back and forth between exploring the code and readi= ng J. Kong's Device Drivers book. As you explained, the first thing to tack= le is the coupling between vesa and sc. Right now I can't even load vesa un= less the kern.vty=3Dsc, and then I cannot unload it. > > vesa depends on vesa.c and pulls in scvesactl.c for two functions: vesa_l= oad_ioctl() and vesa_unload_ioctl(). Although these are used only in vesa.c= , they depend on several structures (for example the virtual screen structu= re scr_stat, and others) defined in syscons.h, which makes these two system= s coupled. > > I was wondering what would be a good way to decouple these dependencies. = I want to do the right thing even if it takes longer. Really appreciate you= taking the time to respond, thanks! > > Anindya > ________________________________________ > From: Adrian Chadd [adrian.chadd@gmail.com] > Sent: January 20, 2017 3:11 PM > To: Anindya Mukherjee > Cc: freebsd-current@freebsd.org > Subject: Re: vt(4) chops off the leftmost three columns > > hiya, > > Mechanically it doesn't look /that/ hard: > > * vesa.ko pulls in the vesa.c bits and the syscons vesa control bits. > Ideally we'd have them as two separate modules, so you could load > "vesa" without needing the syscons bits. > * Maybe then write a vt 'fb' interface to talk to the old-school > framebuffer interface > * Then (if we're lucky) we can have vt use the same VGA, VESA, (mach, > creator, etc!) through the fb interface, rather than reimplementing > its own. > > I looked at it and it doesn't look /that/ hard. If you only cared > about vesa, then you could do something like what 'creator' and > 'creator_vt' did in sys/dev/fb/ . It's just sad that the vt interface > to the screen buffer isn't as complete as the older school framebuffer > interface is. > > > -adrian > > > On 19 January 2017 at 12:35, Anindya Mukherjee wr= ote: >> Hi Adrian, >> >> I was looking at the source for the vt driver. Wondering how much work i= t is to add VESA support to the VGA backend? As you say ATM it's hardcoded = to use 640x480. Pardon my ignorance, but can we reuse any VESA code from sy= scons? >> >> Also, how dependent is splash/screensaver support on the VESA implementa= tion? >> >> Thanks, >> Anindya