From owner-freebsd-x11@freebsd.org Thu Feb 4 18:33:35 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 ED97AA9B395 for ; Thu, 4 Feb 2016 18:33:35 +0000 (UTC) (envelope-from alexander.m.mishurov@gmail.com) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (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 6210F1A2D for ; Thu, 4 Feb 2016 18:33:35 +0000 (UTC) (envelope-from alexander.m.mishurov@gmail.com) Received: by mail-lb0-x234.google.com with SMTP id bc4so36419059lbc.2 for ; Thu, 04 Feb 2016 10:33:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=SLW7hcVlxqyeE0cmrTMRFnZRqUKhRYzGeEFGCKtaOgk=; b=D0CxORPdbRrMJpDtn/7/qwSehBzHc8CF+r/5pdy8cj7/25xJgs3rZVVDEwjiDb943/ lIvE44Wp+W56PUdBpWwyjL6/0Q5lfqCeDCpyIF77dC0GaOjNqv6lxtWq00rQV0Q5oGJM g7X4NrJt0JYpxB6S6VrG9bKe5ToG59eTKlzTunQC/ujWBdbKP81hynsmAv/XpyU3iado w4Frcz+E9M1ylktoaKKu0AaCDoiovHFammPNIRztmBlsUTmw6oIwGNEgtP9t/VhRg9qI M3HHiu5SG5YC+07SLRtHa1eSl+IjwC8kGGy75LIBnYDO30oSIofTDYktJcgvrippXhdU 4xuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=SLW7hcVlxqyeE0cmrTMRFnZRqUKhRYzGeEFGCKtaOgk=; b=abZ79fIF0HNygH4g8pcgAT/PLRFkJRwc4bGI6S17VwY/f78QG/a+YjFk5tXGz3wI7t tN3QVCI9Vh+REYHJyBGynl9/2er45AoG2eW7SjDX1xPI7EmbcrgS/RJysALtkP/AuOQr YaS9ZoEjalSxG1ehituFONn7yZWT3sliN1OD75qvUhUs1veq7qQNfq6Da3MmpqeUmCzU bF7AGO8f72EtFuZMRoCyZ5m/GxsScmPSJdaXMJq2p8YoVpgkLYA0CBBtyj0IhxJk7HFW LBq7zrd2uD8bTSPzkPGfmxHWlffIyMpsCsK+nhCEdzlcc6oHaLM8pwuXA6MYDSbwlTDi xztA== X-Gm-Message-State: AG10YOSSrz4Aij6tY+QeAfKmvQwaYfBKq9ekZQEM9ATrmpFU3mdOgJUNhoUMQmJV87dQjQ== X-Received: by 10.112.210.105 with SMTP id mt9mr4136366lbc.108.1454610812966; Thu, 04 Feb 2016 10:33:32 -0800 (PST) Received: from [192.168.0.27] ([176.194.172.197]) by smtp.gmail.com with ESMTPSA id ja4sm1661700lbc.8.2016.02.04.10.33.32 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 10:33:32 -0800 (PST) Subject: Re: ValleyView To: freebsd-x11@freebsd.org References: <56B30869.6000109@gmail.com> From: Alexander Mishurov Message-ID: <56B3997B.70703@gmail.com> Date: Thu, 4 Feb 2016 21:33:31 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56B30869.6000109@gmail.com> 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 18:33:36 -0000 This is kinda weird, but it works. When I started using device itself instead of parent bus: return device from "agp_i810_find_bridge" instead of pci_find_dbsf(0, 0, 0, 0), all devices attached: agp0: on vgapci0 agp0: aperture size is 256M, detected 65532k stolen memory agp0: AGP_SNB_GFX_MODE: 00000000 agp0: AGP_SNB_GCC1: 0x0211 agp0: Mappable GTT entries: 65536 agp0: Total GTT entries: 524288 info: [drm] Initialized drm 1.1.0 20060810 [drm:pid1326:drm_probe_helper] drmn0 desc: Intel Valleyview (mobile) drmn0: on vgapci0 [drm:pid1326:drm_get_pci_dev] Now it's *ERROR* eDP powered off while attempting aux channel communication. Working on dev/drm2/i915/intel_dp.c There's lot of code to get from Linux. On 04/02/2016 11:14, Alexander Mishurov wrote: > 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. > > > > > > > > >