From owner-svn-src-head@freebsd.org Wed May 30 04:15:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 765A2EFB152; Wed, 30 May 2018 04:15:34 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 154F26E308; Wed, 30 May 2018 04:15:34 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E511325A9D; Wed, 30 May 2018 04:15:33 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4U4FXpp081211; Wed, 30 May 2018 04:15:33 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4U4FX1r081210; Wed, 30 May 2018 04:15:33 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201805300415.w4U4FX1r081210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 30 May 2018 04:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334372 - head/sys/dev/vt/hw/ofwfb X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/dev/vt/hw/ofwfb X-SVN-Commit-Revision: 334372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2018 04:15:34 -0000 Author: nwhitehorn Date: Wed May 30 04:15:33 2018 New Revision: 334372 URL: https://svnweb.freebsd.org/changeset/base/334372 Log: If linebytes property is missing from the graphics device, assume no overscan and synthesize it from the display depth and screen width. This may not be right, but it sometimes right and is better than returning CN_DEAD. Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c Modified: head/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- head/sys/dev/vt/hw/ofwfb/ofwfb.c Wed May 30 04:12:51 2018 (r334371) +++ head/sys/dev/vt/hw/ofwfb/ofwfb.c Wed May 30 04:15:33 2018 (r334372) @@ -394,8 +394,7 @@ ofwfb_init(struct vt_device *vd) /* Make sure we have needed properties */ if (OF_getproplen(node, "height") != sizeof(height) || OF_getproplen(node, "width") != sizeof(width) || - OF_getproplen(node, "depth") != sizeof(depth) || - OF_getproplen(node, "linebytes") != sizeof(sc->fb.fb_stride)) + OF_getproplen(node, "depth") != sizeof(depth)) return (CN_DEAD); /* Only support 8 and 32-bit framebuffers */ @@ -406,7 +405,9 @@ ofwfb_init(struct vt_device *vd) OF_getprop(node, "height", &height, sizeof(height)); OF_getprop(node, "width", &width, sizeof(width)); - OF_getprop(node, "linebytes", &stride, sizeof(stride)); + if (OF_getprop(node, "linebytes", &stride, sizeof(stride)) != + sizeof(stride)) + stride = width*depth/8; sc->fb.fb_height = height; sc->fb.fb_width = width;