From owner-freebsd-current@FreeBSD.ORG Wed Jan 28 06:38:46 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20E51FF8 for ; Wed, 28 Jan 2015 06:38:46 +0000 (UTC) Received: from mail.wilcox-tech.com (mail.foxkit.us [192.99.209.192]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.wilcox-tech.com", Issuer "mail.wilcox-tech.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B84FAFD5 for ; Wed, 28 Jan 2015 06:38:44 +0000 (UTC) Received: (qmail 2396 invoked from network); 28 Jan 2015 06:39:41 -0000 Received: from ip68-13-243-137.ok.ok.cox.net (HELO ?192.168.1.253?) (emyers@wilcox-tech.com@68.13.243.137) by mail.foxkit.us with ESMTPA; 28 Jan 2015 06:39:41 -0000 Message-ID: <54C883E7.4000300@interlinked.me> Date: Wed, 28 Jan 2015 00:38:31 -0600 From: Elizabeth Myers User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Questions on adding backlight support for the i915 driver Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 28 Jan 2015 06:38:46 -0000 Hello, I want to add backlight support to the i915 driver in FreeBSD. It seems that two magic addresses are read and wrote from to change the backlight itself. It supports rather fine-level granularity all the way down to zero. Right now I use a hacked-up userland program that reads from/writes to these addresses, which is far from an ideal solution. I am interested in this because the acpi_video(4) driver does not support my backlight on my Dell Inspiron 15 3521 (not terribly suprising, on Linux I needed a special Dell-specific driver, and I'm not sure even that really used ACPI, I never really checked). My questions are really twofold: 1) How can this be exposed appropriately? I would prefer this be exposed generally so upower could grok it. As far as I can tell upower uses hw.acpi.video.lcd0 to control backlight. I am not sure that upower is doing the "right" thing here, though. 2) Where would the code go for this? The dri2 driver seems the most "logical" place, but maybe it belongs in X and exposed via a program? Or something else entirely that I'm not thinking of? I have experience developing PCI drivers and doing other PCI related doodads, and some kernel development experience, as well as general C experience, but I'm not by any means an expert on the matter. Cheers, Elizabeth Myers