mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into HEAD
Daniel writes: "Just three revert/disable by default patches, one of them cc: stable (since the offending commit was cc: stable, too)." * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: Revert "drm/i915: write backlight harder" drm/i915: don't disable the power well yet Revert "drm/i915: set TRANSCODER_EDP even earlier"
This commit is contained in:
commit
7ac8833f59
@ -125,6 +125,11 @@ MODULE_PARM_DESC(preliminary_hw_support,
|
|||||||
"Enable Haswell and ValleyView Support. "
|
"Enable Haswell and ValleyView Support. "
|
||||||
"(default: false)");
|
"(default: false)");
|
||||||
|
|
||||||
|
int i915_disable_power_well __read_mostly = 0;
|
||||||
|
module_param_named(disable_power_well, i915_disable_power_well, int, 0600);
|
||||||
|
MODULE_PARM_DESC(disable_power_well,
|
||||||
|
"Disable the power well when possible (default: false)");
|
||||||
|
|
||||||
static struct drm_driver driver;
|
static struct drm_driver driver;
|
||||||
extern int intel_agp_enabled;
|
extern int intel_agp_enabled;
|
||||||
|
|
||||||
|
@ -1398,6 +1398,7 @@ extern int i915_enable_fbc __read_mostly;
|
|||||||
extern bool i915_enable_hangcheck __read_mostly;
|
extern bool i915_enable_hangcheck __read_mostly;
|
||||||
extern int i915_enable_ppgtt __read_mostly;
|
extern int i915_enable_ppgtt __read_mostly;
|
||||||
extern unsigned int i915_preliminary_hw_support __read_mostly;
|
extern unsigned int i915_preliminary_hw_support __read_mostly;
|
||||||
|
extern int i915_disable_power_well __read_mostly;
|
||||||
|
|
||||||
extern int i915_suspend(struct drm_device *dev, pm_message_t state);
|
extern int i915_suspend(struct drm_device *dev, pm_message_t state);
|
||||||
extern int i915_resume(struct drm_device *dev);
|
extern int i915_resume(struct drm_device *dev);
|
||||||
|
@ -5771,6 +5771,11 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
num_connectors++;
|
num_connectors++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_cpu_edp)
|
||||||
|
intel_crtc->cpu_transcoder = TRANSCODER_EDP;
|
||||||
|
else
|
||||||
|
intel_crtc->cpu_transcoder = pipe;
|
||||||
|
|
||||||
/* We are not sure yet this won't happen. */
|
/* We are not sure yet this won't happen. */
|
||||||
WARN(!HAS_PCH_LPT(dev), "Unexpected PCH type %d\n",
|
WARN(!HAS_PCH_LPT(dev), "Unexpected PCH type %d\n",
|
||||||
INTEL_PCH_TYPE(dev));
|
INTEL_PCH_TYPE(dev));
|
||||||
@ -5837,11 +5842,6 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
int pipe = intel_crtc->pipe;
|
int pipe = intel_crtc->pipe;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (IS_HASWELL(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_EDP))
|
|
||||||
intel_crtc->cpu_transcoder = TRANSCODER_EDP;
|
|
||||||
else
|
|
||||||
intel_crtc->cpu_transcoder = pipe;
|
|
||||||
|
|
||||||
drm_vblank_pre_modeset(dev, pipe);
|
drm_vblank_pre_modeset(dev, pipe);
|
||||||
|
|
||||||
ret = dev_priv->display.crtc_mode_set(crtc, mode, adjusted_mode,
|
ret = dev_priv->display.crtc_mode_set(crtc, mode, adjusted_mode,
|
||||||
|
@ -321,9 +321,6 @@ void intel_panel_enable_backlight(struct drm_device *dev,
|
|||||||
if (dev_priv->backlight_level == 0)
|
if (dev_priv->backlight_level == 0)
|
||||||
dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
|
dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
|
||||||
|
|
||||||
dev_priv->backlight_enabled = true;
|
|
||||||
intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
|
|
||||||
|
|
||||||
if (INTEL_INFO(dev)->gen >= 4) {
|
if (INTEL_INFO(dev)->gen >= 4) {
|
||||||
uint32_t reg, tmp;
|
uint32_t reg, tmp;
|
||||||
|
|
||||||
@ -359,12 +356,12 @@ void intel_panel_enable_backlight(struct drm_device *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_level:
|
set_level:
|
||||||
/* Check the current backlight level and try to set again if it's zero.
|
/* Call below after setting BLC_PWM_CPU_CTL2 and BLC_PWM_PCH_CTL1.
|
||||||
* On some machines, BLC_PWM_CPU_CTL is cleared to zero automatically
|
* BLC_PWM_CPU_CTL may be cleared to zero automatically when these
|
||||||
* when BLC_PWM_CPU_CTL2 and BLC_PWM_PCH_CTL1 are written.
|
* registers are set.
|
||||||
*/
|
*/
|
||||||
if (!intel_panel_get_backlight(dev))
|
dev_priv->backlight_enabled = true;
|
||||||
intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
|
intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intel_panel_init_backlight(struct drm_device *dev)
|
static void intel_panel_init_backlight(struct drm_device *dev)
|
||||||
|
@ -4079,6 +4079,9 @@ void intel_set_power_well(struct drm_device *dev, bool enable)
|
|||||||
if (!IS_HASWELL(dev))
|
if (!IS_HASWELL(dev))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!i915_disable_power_well && !enable)
|
||||||
|
return;
|
||||||
|
|
||||||
tmp = I915_READ(HSW_PWR_WELL_DRIVER);
|
tmp = I915_READ(HSW_PWR_WELL_DRIVER);
|
||||||
is_enabled = tmp & HSW_PWR_WELL_STATE;
|
is_enabled = tmp & HSW_PWR_WELL_STATE;
|
||||||
enable_requested = tmp & HSW_PWR_WELL_ENABLE;
|
enable_requested = tmp & HSW_PWR_WELL_ENABLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user