From owner-freebsd-current@FreeBSD.ORG Sat Jan 31 05:20:06 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AA98D83; Sat, 31 Jan 2015 05:20:06 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F764C5B; Sat, 31 Jan 2015 05:20:06 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rp18so7829963iec.12; Fri, 30 Jan 2015 21:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=JPrJWQ12j9qZRQKBY4KL14NZzAMRJAW3G8Kmt1s2cxU=; b=g6vGGKBXCktKrJM3R/1TMnedjrp7qCdg9EujdIbHxiZjiORvLVPps1HWFQ5DTKrXx0 81ys2QyKeWvLI4Yw6uIcnDrN2ArIWAg6GSlg8o7pI9nM23tmUALS4Wd+cEa8oMgcuCoX u8zR4fK5TnvWl/A6KohOJ3XvgDgC4+4Lhniu1OR/R8XBr33+Z3yCtCrUC8j/nXmzzX/7 JdVXbESB1sYHJDHv2DVXMr9iJrjPkcBPnIFRUSxBPX7SKIvSVh7FScQ9zCsARzpO/d0y 5m4sldy9VUv7vjE/Hir8zv9PNmFV4E8EZaG5QWXyiqdTzZ6CAwujdBoHS40efeOqCk8b QZJw== MIME-Version: 1.0 X-Received: by 10.42.62.71 with SMTP id x7mr9368785ich.61.1422681605619; Fri, 30 Jan 2015 21:20:05 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Fri, 30 Jan 2015 21:20:05 -0800 (PST) In-Reply-To: <54CC57CE.2080001@interlinked.me> References: <54C883E7.4000300@interlinked.me> <54CC57CE.2080001@interlinked.me> Date: Fri, 30 Jan 2015 21:20:05 -0800 X-Google-Sender-Auth: ei8Bxej8R-l0PA3dHzJRiwy1qcU Message-ID: Subject: Re: Questions on adding backlight support for the i915 driver From: Adrian Chadd To: Elizabeth Myers , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-current , Justin Hibbits 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: Sat, 31 Jan 2015 05:20:06 -0000 On 30 January 2015 at 20:19, Elizabeth Myers wrote: > On 01/30/15 17:25, Justin Hibbits wrote: >> Would it make sense to have a generic 'backlight' driver framework >> that we plug into? I wrote a backlight driver (well, 2, but both show >> up as dev.backlight in sysctl) for powerpc, but if we want to have >> even more individual backlight drivers, I think it makes sense to make >> them all look the same, with similar configuration properties. >> >> - Justin > > I was thinking the same thing myself. There's a lot of different > backlights out there, and acpi_video(4) obviously can't cover them all, > which seems to define the de facto "standard" MIB for brightness sysctls > (which upower presently uses). > > I hate to bikeshed, but I would humbly suggest adding an MIB hierarchy > such as hw.backlight...brightness (and maybe > brightness_raw for advanced users who want/need more control). Woo! A patch! I'm happy with this, but you'll want to cc: kib at least who looks after the i915 code. Hi kib! I think this is fine for the short term and lets us experiment without committing to a fully public API for this for the short term. Do you have brightness buttons anywhere? What happens when you set it through this API and then you use the backlight buttons? -adrian