Date: Thu, 29 Jan 2015 11:46:21 +0100 From: "Ranjan1018 ." <214748mv@gmail.com> To: Adrian Chadd <adrian@freebsd.org> Cc: Andrew Wilcox <AWilcox@wilcox-tech.com>, freebsd-current <freebsd-current@freebsd.org>, Konstantin Belousov <kib@freebsd.org> Subject: Re: drm2 regression: backlight adjustment on ivybridge no longer works Message-ID: <CACyC=qZJZw0DNWO%2BUd_pq_4V4d4A6yMnDF%2BwVqPgt1mg1txJWg@mail.gmail.com> In-Reply-To: <CAJ-Vmom3gLa_2EoviL0Ck2B36Bpa-3P58%2BUp5rsLFaH-NS4ExQ@mail.gmail.com> References: <CAJ-VmomfBrBN6HVBq5FoRf1nRqvrhiDOw6RHjfs13j-9cqi1vg@mail.gmail.com> <CACyC=qYMT3VFx4GxypJ6F61pKSaxE0JKBK%2BudDMPSh4_ASAi6w@mail.gmail.com> <000e01d039fb$d5959930$80c0cb90$@Wilcox-Tech.com> <CACyC=qZeG8L%2BbZu=RacU_rdNVTFhyCFH2A%2BdNw71%2B09cZ20VgA@mail.gmail.com> <009501d03acb$4f380d70$eda82850$@Wilcox-Tech.com> <CAJ-Vmokph=BHH895uHxQh=dHPfb5_ik4MZrq8sOGrd0AtPzymQ@mail.gmail.com> <CAJ-Vmom3gLa_2EoviL0Ck2B36Bpa-3P58%2BUp5rsLFaH-NS4ExQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2015-01-28 10:11 GMT+01:00 Adrian Chadd <adrian@freebsd.org>: > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACyC=qZJZw0DNWO%2BUd_pq_4V4d4A6yMnDF%2BwVqPgt1mg1txJWg>