Commit 53e8de10 authored by Jani Nikula's avatar Jani Nikula

drm/i915: move vblank_enabled to display substruct

The info is related to display, and should be placed under
i915->display. Start a new irq sub-substruct.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/eb89ed70020ea78396e1fec6f1a97693f2bdb96b.1712599670.git.jani.nikula@intel.com
parent 8219ab6d
...@@ -447,6 +447,11 @@ struct intel_display { ...@@ -447,6 +447,11 @@ struct intel_display {
bool false_color; bool false_color;
} ips; } ips;
struct {
/* For i915gm/i945gm vblank irq workaround */
u8 vblank_enabled;
} irq;
struct { struct {
wait_queue_head_t waitqueue; wait_queue_head_t waitqueue;
......
...@@ -1203,7 +1203,7 @@ int i8xx_enable_vblank(struct drm_crtc *crtc) ...@@ -1203,7 +1203,7 @@ int i8xx_enable_vblank(struct drm_crtc *crtc)
int i915gm_enable_vblank(struct drm_crtc *crtc) int i915gm_enable_vblank(struct drm_crtc *crtc)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc->dev); struct drm_i915_private *i915 = to_i915(crtc->dev);
/* /*
* Vblank interrupts fail to wake the device up from C2+. * Vblank interrupts fail to wake the device up from C2+.
...@@ -1211,8 +1211,8 @@ int i915gm_enable_vblank(struct drm_crtc *crtc) ...@@ -1211,8 +1211,8 @@ int i915gm_enable_vblank(struct drm_crtc *crtc)
* the problem. There is a small power cost so we do this * the problem. There is a small power cost so we do this
* only when vblank interrupts are actually enabled. * only when vblank interrupts are actually enabled.
*/ */
if (dev_priv->vblank_enabled++ == 0) if (i915->display.irq.vblank_enabled++ == 0)
intel_uncore_write(&dev_priv->uncore, SCPD0, _MASKED_BIT_ENABLE(CSTATE_RENDER_CLOCK_GATE_DISABLE)); intel_uncore_write(&i915->uncore, SCPD0, _MASKED_BIT_ENABLE(CSTATE_RENDER_CLOCK_GATE_DISABLE));
return i8xx_enable_vblank(crtc); return i8xx_enable_vblank(crtc);
} }
...@@ -1315,12 +1315,12 @@ void i8xx_disable_vblank(struct drm_crtc *crtc) ...@@ -1315,12 +1315,12 @@ void i8xx_disable_vblank(struct drm_crtc *crtc)
void i915gm_disable_vblank(struct drm_crtc *crtc) void i915gm_disable_vblank(struct drm_crtc *crtc)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc->dev); struct drm_i915_private *i915 = to_i915(crtc->dev);
i8xx_disable_vblank(crtc); i8xx_disable_vblank(crtc);
if (--dev_priv->vblank_enabled == 0) if (--i915->display.irq.vblank_enabled == 0)
intel_uncore_write(&dev_priv->uncore, SCPD0, _MASKED_BIT_DISABLE(CSTATE_RENDER_CLOCK_GATE_DISABLE)); intel_uncore_write(&i915->uncore, SCPD0, _MASKED_BIT_DISABLE(CSTATE_RENDER_CLOCK_GATE_DISABLE));
} }
void i965_disable_vblank(struct drm_crtc *crtc) void i965_disable_vblank(struct drm_crtc *crtc)
......
...@@ -348,9 +348,6 @@ struct drm_i915_private { ...@@ -348,9 +348,6 @@ struct drm_i915_private {
struct intel_pxp *pxp; struct intel_pxp *pxp;
/* For i915gm/i945gm vblank irq workaround */
u8 vblank_enabled;
bool irq_enabled; bool irq_enabled;
struct i915_pmu pmu; struct i915_pmu pmu;
......
...@@ -516,7 +516,6 @@ struct xe_device { ...@@ -516,7 +516,6 @@ struct xe_device {
unsigned int hpll_freq; unsigned int hpll_freq;
unsigned int czclk_freq; unsigned int czclk_freq;
unsigned int fsb_freq, mem_freq, is_ddr3; unsigned int fsb_freq, mem_freq, is_ddr3;
u8 vblank_enabled;
}; };
struct { struct {
const char *dmc_firmware_path; const char *dmc_firmware_path;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment