From owner-freebsd-current@FreeBSD.ORG Thu Jan 29 10:46:23 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 C95FE8F4; Thu, 29 Jan 2015 10:46:23 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (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 79F43699; Thu, 29 Jan 2015 10:46:23 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id h11so22660898wiw.1; Thu, 29 Jan 2015 02:46:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=y4eorzrFocmXG1mQ0tpp1lkgQluIP6OX2TeByW0uBaY=; b=Iiz8kxQi3ThUWBPBNOb/faPp8NwGreMAcVfcNqCLMf2iEQIhDKpXf0OCTkW2TYhZKm +Fc65uqa9GYNZ+K6b+gqTJA0wHz+LEDnlVttPfDUd5NRMDL1cgo0kwWZRAc1WWRG+wjC rWzv9b6Edg0gnzhQL/1/+9l5HJGIYiYWhSaeFAb5WjY9gM4eisARb3sTDKw95QRfzw+j HtDuT9hg6tBdKJ9SAn8Khkm/nCTs2yr0HABvXlilPwazL7Nuk4+LCgEdzhDDyR0013SW QVq4MyL8iXt3r+wOp/FZItpMtAIghM5R1FUPAJ7U/ebHCXEEwutJE+dF3+eWFXAAcO4a JT+w== MIME-Version: 1.0 X-Received: by 10.194.175.102 with SMTP id bz6mr7751wjc.120.1422528381679; Thu, 29 Jan 2015 02:46:21 -0800 (PST) Received: by 10.217.64.10 with HTTP; Thu, 29 Jan 2015 02:46:21 -0800 (PST) In-Reply-To: References: <000e01d039fb$d5959930$80c0cb90$@Wilcox-Tech.com> <009501d03acb$4f380d70$eda82850$@Wilcox-Tech.com> Date: Thu, 29 Jan 2015 11:46:21 +0100 Message-ID: Subject: Re: drm2 regression: backlight adjustment on ivybridge no longer works From: "Ranjan1018 ." <214748mv@gmail.com> To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Andrew Wilcox , freebsd-current , Konstantin Belousov 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: Thu, 29 Jan 2015 10:46:23 -0000 2015-01-28 10:11 GMT+01:00 Adrian Chadd : > ugh, so because i can't sleep, I read the Linux i915 history for > backlight changes. > > Turns out if I disable bit 30 in ivb_pch_pwm_override() to register > BLC_PWM_PCH_CTL1, the acpi video setting works. The keyboard settings > still don't, but I'll worry about that later. > > Bit 30 in the linux drm code is: > > #define BLM_PCH_OVERRIDE_ENABLE (1 << 30) > > The linux dri code doesn't set that for ivybridge - only for broadwell. > > (also, the linux driver has POSTING_READ() which I'm guessing is to > ensure things made it out to the device and have been flushed before > doing another IO operation.) > > I have my (via sysctl) panel backlight control working again. > > > > -adrian > Thank you guys, the backlight control works again on my laptop with this patch, suggested by Adrian : --- sys/dev/drm2/i915/intel_display.c.orig (revision 277487) +++ sys/dev/drm2/i915/intel_display.c (working copy) @@ -6995,7 +6995,7 @@ */ I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE); I915_WRITE(BLC_PWM_CPU_CTL, 0); - I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (1<<30)); + I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE); } void intel_modeset_init_hw(struct drm_device *dev) but the patch by Andrew does not hurts: http://foxkit.us/FreeBSD/i915-uninitialised-var-fix.diff I am running r277871 with both patches applied. Regards, Maurizio