Message ID | 87bng37azj.fsf@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
···<date: 2015-06-26, Friday>···<from: Jani Nikula>··· > On Thu, 25 Jun 2015, Philipp Gesang <phg@phi-gamma.net> wrote: > > Nice tool. With a vanilla kernel I get a value of 0x80000000 > > before suspend and 0x00000000 after resume. With the patched > > kernel it’s 0x80000000 before and after. > > > > On the vanilla kernel, issuing ``intel_reg write 0x61260 0x80000000`` > > after resume turns the backlight back on. > > Please try this patch: > > From 018c3dab349b9ba82364ea6e7257d1bbad3df2ae Mon Sep 17 00:00:00 2001 > From: Jani Nikula <jani.nikula@intel.com> > Date: Thu, 25 Jun 2015 23:55:06 +0300 > Subject: [PATCH] drm/i915: fix backlight on gen2 > Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo > Cc: Jani Nikula <jani.nikula@intel.com> Tested based on kernel aefbef10e3…. Works great, thanks! Best, Philipp
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index fa9ccb87eb66..bf7c08b94088 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -3507,6 +3507,7 @@ enum skl_disp_power_wells { #define BLM_POLARITY_PNV (1 << 0) /* pnv only */ #define BLC_HIST_CTL (dev_priv->info.display_mmio_offset + 0x61260) +#define BLM_HISTOGRAM_ENABLE (1 << 31) /* New registers for PCH-split platforms. Safe where new bits show up, the * register layout machtes with gen4 BLC_PWM_CTL[12]. */ diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 7d83527f95f7..c4d884d9e223 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -907,6 +907,10 @@ static void i9xx_enable_backlight(struct intel_connector *connector) /* XXX: combine this into above write? */ intel_panel_actually_set_backlight(connector, panel->backlight.level); + + /* Needed to enable backlight. */ + if (IS_GEN2(dev)) + I915_WRITE(BLC_HIST_CTL, BLM_HISTOGRAM_ENABLE); } static void i965_enable_backlight(struct intel_connector *connector)