From owner-freebsd-x11@freebsd.org Thu Feb 4 08:14:37 2016 Return-Path: Delivered-To: freebsd-x11@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 BA030A9B623 for ; Thu, 4 Feb 2016 08:14:37 +0000 (UTC) (envelope-from alexander.m.mishurov@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (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 2E5381D2C for ; Thu, 4 Feb 2016 08:14:37 +0000 (UTC) (envelope-from alexander.m.mishurov@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id l143so30818222lfe.2 for ; Thu, 04 Feb 2016 00:14:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type; bh=rX0lJhW5gY253YpsCiHPELMU/n+GEXOl6f+GuOJSaTo=; b=YYa+Iv8Ply2la4rmr3otyk1BJUba9a7k76GQLit3jgeZvsl6cHqYHYGizcg/n9aZlV sKMt4MPeUVtLeNXFLf8IvLXSJ5R51WrSu52/e8TAlR8l/BCmskhVXX8Vm3qvfroFadRb TrUkIVhtdqwB3RTtAkMNdbtBRkp25UNPEmT5rDI2Nepv0W5bn1wWJhfppMkyfc4qlSY1 u3fv0IPGuFNk08Rs85SUbdSq/P3dlcvWz6tk8xa3I2W0J4hm5anLtd5R6mMTrexSTHaH k2Mfn52ATgNCBCvcd1tK0djH7S9ZbD/SgtitdvZWaIbe48Dbv/VCHq6g+1V3V2iPjliH pnzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-type; bh=rX0lJhW5gY253YpsCiHPELMU/n+GEXOl6f+GuOJSaTo=; b=dEM1/rjd2TgTbOygYdinYtsrZCBreY7avOQMnqKz5lvQxr1sGx1gbkDnrBp7goxwbN uZEVWsVcgCpdJESi5t+KNNzh5nHdtt1TfaEOZGLneS4nB9IC00ruNwWK9lxGsfSknNQE j4fU3wooRLdtvo7PNsIZK32FmRtW2iAVlTUHs6FUypYf8nj+UYpJrySHaTDSsJ6QQW8R NiK5CONpNKAZjdm5UAwGShzB7miEkazjQVbdizN/ctTmp6EFDkA2H/MnvgZfcPYik0s2 pD0WhrU96l+3V/6N8uaNoNCch6fi8a9TqmWRneIy3QyQTlVTIZRpS1YzVcUwW/xr8j8K bDYA== X-Gm-Message-State: AG10YORDMKxSnZh8DyfUNsQNvT50iRBJML8DATjSUsxZ6e8oicwTUQPY5SsQQ5/qegm78Q== X-Received: by 10.25.167.208 with SMTP id q199mr2421220lfe.140.1454573675179; Thu, 04 Feb 2016 00:14:35 -0800 (PST) Received: from [192.168.0.27] ([176.194.172.197]) by smtp.gmail.com with ESMTPSA id k3sm1394418lbp.9.2016.02.04.00.14.34 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 00:14:34 -0800 (PST) To: freebsd-x11@freebsd.org From: Alexander Mishurov Subject: ValleyView Message-ID: <56B30869.6000109@gmail.com> Date: Thu, 4 Feb 2016 11:14:33 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 08:14:37 -0000 Hi! I started enabling ValleyView in drm2 and faced some problems. Target device: Acer E3-112 laptop. Celeron N2840. VGA: pci0:0:2:0, 0x0f318086 HOST-PCI: pci0:0:0:0, 0x0f008086 I use these docs as reference: https://01.org/linuxgraphics/documentation/hardware-specification-prms Particularly these two documents: 1. This one for ValleyView PCI configurations space registers https://01.org/sites/default/files/documentation/intel_os_gfx_prm_vol11_-_gfx_interface.pdf 2. And this one for Haswell PCI configurations space registers to compare because Haswell already exist https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-hsw-pcie-config-registers.pdf I enabled my device id in dev/drm2/drm_pciids.h dev/drm2/i915/i915_drv.c And turned on "i915_enable_unsupported" variable. And faced kernel crash with following problem: Fatal trap 12: page fault while in kernel mode device_get_softc() at device_get_softc+0x4/frame 0xfffffe023131c3c0 intel_gtt_get_bridge_device() at intel_gtt_get_bridge_device+0x11/frame 0xfffffe023131c3d0 i915_driver_load() at i915_driver_load+0x3ac/frame 0xfffffe023131c550 drm_get_pci_dev() at drm_get_pci_dev+0x436/frame 0xfffffe023131c5b0 drm_attach_helper() at drm_attach_helper+0x13f/frame 0xfffffe023131c600 i915_attach() at i915_attach+0x53/frame 0xfffffe023131c610 device_attach() at device_attach+0x41d/frame 0xfffffe023131c670 So I figured out I need to get agp working. I added device id to dev/agp/agp_i810.c Nothing happens, some debugging revealed that all functions: agp_sb_check_active() agp_sb_get_stolen_size() agp_sb_get_gtt_total_entries() and others that in order call pci_read_config() and read pci registers from bridge device, always return zeros. I checked constants in dev/agp/agpreg.h All Sandy Bridge constants for config registers match those in documents for HSW and VLV mentioned above. So I don't know what's causing the problem. I'm running dev kernel on EFI booted machine with xorg and xf86-video-scfb.