Commit c305ae99 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-intel-next-2021-11-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

drm/i915 feature pull for v5.17:

Features and functionality:
- Implement per-lane DP drive settings for ICL+ (Ville)
- Enable runtime pm autosuspend by default (Tilak Tangudu)
- ADL-P DSI support (Vandita)
- Add support for pipe C and D DMC firmware (Anusha)
- Implement (near)atomic gamma LUT updates via vblank workers (Ville)
- Split plane updates to noarm+arm phases (Ville)
- Remove the CCS FB stride restrictions on ADL-P (Imre)
- Add PSR selective fetch support for biplanar formats (Jouni)
- Add support for display audio codec keepalive (Kai)
- VRR platform support for display 11 (Manasi)

Refactoring and cleanups:
- FBC refactoring and cleanups preparing for multiple FBC instances (Ville)
- PCH modeset refactoring, move to its own file (Ville)
- Refactor and simplify handling of modifiers (Imre)
- PXP cleanups (Ville)
- Display header and include refactoring (Jani)
- Some register macro cleanups (Ville)
- Refactor DP HDMI DFP limit code (Ville)

Fixes:
- Disable DSB usage for now due to incorrect gamma LUT updates (Ville)
- Check async flip state of every crtc and plane only once (José)
- Fix DPT FB suspend/resume (Imre)
- Fix black screen on reboot due to disabled DP++ TMDS output buffers (Ville)
- Don't request GMBUS to generate irqs when called while irqs are off (Ville)
- Fix type1 DVI DP dual mode adapter heuristics for modern platforms (Ville)
- Fix fix integer overflow in 128b/132b data rate calculation (Jani)
- Fix bigjoiner state readout (Ville)
- Build fix for non-x86 (Siva)
- PSR fixes (José, Jouni, Ville)
- Disable ADL-P underrun recovery (José)
- Fix DP link parameter usage before valid DPCD (Imre)
- VRR vblank and frame counter fixes (Ville)
- Fix fastsets on TypeC ports following a non-blocking modeset (Imre)
- Compiler warning fixes (Nathan Chancellor)
- Fix DSI HS mode commands (William Tseng)
- Error return fixes (Dan Carpenter)
- Update memory bandwidth calculations (Radhakrishna)
- Implement WM0 cursor WA for DG2 (Stan)
- Fix DSI Double pixelclock on read-back for dual-link panels (Hans de Goede)
- HDMI 2.1 PCON FRL configuration fixes (Ankit)

Merges:
- DP link training delay helpers, via topic branch (Jani)
- Backmerge drm-next (Jani)
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87v909it0t.fsf@intel.com
parents c18c8891 74ba89c0
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/agp_backend.h> #include <linux/agp_backend.h>
#include <linux/intel-iommu.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/smp.h> #include <asm/smp.h>
#include "agp.h" #include "agp.h"
......
...@@ -21,7 +21,7 @@ config DRM_I915 ...@@ -21,7 +21,7 @@ config DRM_I915
select ACPI_VIDEO if ACPI select ACPI_VIDEO if ACPI
select ACPI_BUTTON if ACPI select ACPI_BUTTON if ACPI
select SYNC_FILE select SYNC_FILE
select IOSF_MBI select IOSF_MBI if X86
select CRC32 select CRC32
select SND_HDA_I915 if SND_HDA_CORE select SND_HDA_I915 if SND_HDA_CORE
select CEC_CORE if CEC_NOTIFIER select CEC_CORE if CEC_NOTIFIER
......
...@@ -30,7 +30,7 @@ subdir-ccflags-y += -I$(srctree)/$(src) ...@@ -30,7 +30,7 @@ subdir-ccflags-y += -I$(srctree)/$(src)
# Please keep these build lists sorted! # Please keep these build lists sorted!
# core driver code # core driver code
i915-y += i915_drv.o \ i915-y += i915_driver.o \
i915_config.o \ i915_config.o \
i915_irq.o \ i915_irq.o \
i915_getparam.o \ i915_getparam.o \
...@@ -226,6 +226,8 @@ i915-y += \ ...@@ -226,6 +226,8 @@ i915-y += \
display/intel_hotplug.o \ display/intel_hotplug.o \
display/intel_lpe_audio.o \ display/intel_lpe_audio.o \
display/intel_overlay.o \ display/intel_overlay.o \
display/intel_pch_display.o \
display/intel_pch_refclk.o \
display/intel_plane_initial.o \ display/intel_plane_initial.o \
display/intel_psr.o \ display/intel_psr.o \
display/intel_quirks.o \ display/intel_quirks.o \
......
...@@ -60,22 +60,11 @@ static const u32 vlv_primary_formats[] = { ...@@ -60,22 +60,11 @@ static const u32 vlv_primary_formats[] = {
DRM_FORMAT_XBGR16161616F, DRM_FORMAT_XBGR16161616F,
}; };
static const u64 i9xx_format_modifiers[] = {
I915_FORMAT_MOD_X_TILED,
DRM_FORMAT_MOD_LINEAR,
DRM_FORMAT_MOD_INVALID
};
static bool i8xx_plane_format_mod_supported(struct drm_plane *_plane, static bool i8xx_plane_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier) u32 format, u64 modifier)
{ {
switch (modifier) { if (!intel_fb_plane_supports_modifier(to_intel_plane(_plane), modifier))
case DRM_FORMAT_MOD_LINEAR:
case I915_FORMAT_MOD_X_TILED:
break;
default:
return false; return false;
}
switch (format) { switch (format) {
case DRM_FORMAT_C8: case DRM_FORMAT_C8:
...@@ -92,13 +81,8 @@ static bool i8xx_plane_format_mod_supported(struct drm_plane *_plane, ...@@ -92,13 +81,8 @@ static bool i8xx_plane_format_mod_supported(struct drm_plane *_plane,
static bool i965_plane_format_mod_supported(struct drm_plane *_plane, static bool i965_plane_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier) u32 format, u64 modifier)
{ {
switch (modifier) { if (!intel_fb_plane_supports_modifier(to_intel_plane(_plane), modifier))
case DRM_FORMAT_MOD_LINEAR:
case I915_FORMAT_MOD_X_TILED:
break;
default:
return false; return false;
}
switch (format) { switch (format) {
case DRM_FORMAT_C8: case DRM_FORMAT_C8:
...@@ -272,7 +256,7 @@ int i9xx_check_plane_surface(struct intel_plane_state *plane_state) ...@@ -272,7 +256,7 @@ int i9xx_check_plane_surface(struct intel_plane_state *plane_state)
u32 alignment = intel_surf_alignment(fb, 0); u32 alignment = intel_surf_alignment(fb, 0);
int cpp = fb->format->cpp[0]; int cpp = fb->format->cpp[0];
while ((src_x + src_w) * cpp > plane_state->view.color_plane[0].stride) { while ((src_x + src_w) * cpp > plane_state->view.color_plane[0].mapping_stride) {
if (offset == 0) { if (offset == 0) {
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"Unable to find suitable display surface offset due to X-tiling\n"); "Unable to find suitable display surface offset due to X-tiling\n");
...@@ -418,22 +402,49 @@ static int i9xx_plane_min_cdclk(const struct intel_crtc_state *crtc_state, ...@@ -418,22 +402,49 @@ static int i9xx_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
return DIV_ROUND_UP(pixel_rate * num, den); return DIV_ROUND_UP(pixel_rate * num, den);
} }
static void i9xx_update_plane(struct intel_plane *plane, static void i9xx_plane_update_noarm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state) const struct intel_plane_state *plane_state)
{ {
struct drm_i915_private *dev_priv = to_i915(plane->base.dev); struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum i9xx_plane_id i9xx_plane = plane->i9xx_plane; enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
u32 linear_offset; unsigned long irqflags;
int x = plane_state->view.color_plane[0].x;
int y = plane_state->view.color_plane[0].y; spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
intel_de_write_fw(dev_priv, DSPSTRIDE(i9xx_plane),
plane_state->view.color_plane[0].mapping_stride);
if (DISPLAY_VER(dev_priv) < 4) {
int crtc_x = plane_state->uapi.dst.x1; int crtc_x = plane_state->uapi.dst.x1;
int crtc_y = plane_state->uapi.dst.y1; int crtc_y = plane_state->uapi.dst.y1;
int crtc_w = drm_rect_width(&plane_state->uapi.dst); int crtc_w = drm_rect_width(&plane_state->uapi.dst);
int crtc_h = drm_rect_height(&plane_state->uapi.dst); int crtc_h = drm_rect_height(&plane_state->uapi.dst);
/*
* PLANE_A doesn't actually have a full window
* generator but let's assume we still need to
* program whatever is there.
*/
intel_de_write_fw(dev_priv, DSPPOS(i9xx_plane),
(crtc_y << 16) | crtc_x);
intel_de_write_fw(dev_priv, DSPSIZE(i9xx_plane),
((crtc_h - 1) << 16) | (crtc_w - 1));
}
spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
}
static void i9xx_plane_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
int x = plane_state->view.color_plane[0].x;
int y = plane_state->view.color_plane[0].y;
u32 dspcntr, dspaddr_offset, linear_offset;
unsigned long irqflags; unsigned long irqflags;
u32 dspaddr_offset;
u32 dspcntr;
dspcntr = plane_state->ctl | i9xx_plane_ctl_crtc(crtc_state); dspcntr = plane_state->ctl | i9xx_plane_ctl_crtc(crtc_state);
...@@ -446,20 +457,12 @@ static void i9xx_update_plane(struct intel_plane *plane, ...@@ -446,20 +457,12 @@ static void i9xx_update_plane(struct intel_plane *plane,
spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
intel_de_write_fw(dev_priv, DSPSTRIDE(i9xx_plane), if (IS_CHERRYVIEW(dev_priv) && i9xx_plane == PLANE_B) {
plane_state->view.color_plane[0].stride); int crtc_x = plane_state->uapi.dst.x1;
int crtc_y = plane_state->uapi.dst.y1;
int crtc_w = drm_rect_width(&plane_state->uapi.dst);
int crtc_h = drm_rect_height(&plane_state->uapi.dst);
if (DISPLAY_VER(dev_priv) < 4) {
/*
* PLANE_A doesn't actually have a full window
* generator but let's assume we still need to
* program whatever is there.
*/
intel_de_write_fw(dev_priv, DSPPOS(i9xx_plane),
(crtc_y << 16) | crtc_x);
intel_de_write_fw(dev_priv, DSPSIZE(i9xx_plane),
((crtc_h - 1) << 16) | (crtc_w - 1));
} else if (IS_CHERRYVIEW(dev_priv) && i9xx_plane == PLANE_B) {
intel_de_write_fw(dev_priv, PRIMPOS(i9xx_plane), intel_de_write_fw(dev_priv, PRIMPOS(i9xx_plane),
(crtc_y << 16) | crtc_x); (crtc_y << 16) | crtc_x);
intel_de_write_fw(dev_priv, PRIMSIZE(i9xx_plane), intel_de_write_fw(dev_priv, PRIMSIZE(i9xx_plane),
...@@ -493,7 +496,21 @@ static void i9xx_update_plane(struct intel_plane *plane, ...@@ -493,7 +496,21 @@ static void i9xx_update_plane(struct intel_plane *plane,
spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
} }
static void i9xx_disable_plane(struct intel_plane *plane, static void i830_plane_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{
/*
* On i830/i845 all registers are self-arming [ALM040].
*
* Additional breakage on i830 causes register reads to return
* the last latched value instead of the last written value [ALM026].
*/
i9xx_plane_update_noarm(plane, crtc_state, plane_state);
i9xx_plane_update_arm(plane, crtc_state, plane_state);
}
static void i9xx_plane_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state) const struct intel_crtc_state *crtc_state)
{ {
struct drm_i915_private *dev_priv = to_i915(plane->base.dev); struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
...@@ -768,6 +785,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -768,6 +785,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
struct intel_plane *plane; struct intel_plane *plane;
const struct drm_plane_funcs *plane_funcs; const struct drm_plane_funcs *plane_funcs;
unsigned int supported_rotations; unsigned int supported_rotations;
const u64 *modifiers;
const u32 *formats; const u32 *formats;
int num_formats; int num_formats;
int ret, zpos; int ret, zpos;
...@@ -789,12 +807,10 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -789,12 +807,10 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
plane->id = PLANE_PRIMARY; plane->id = PLANE_PRIMARY;
plane->frontbuffer_bit = INTEL_FRONTBUFFER(pipe, plane->id); plane->frontbuffer_bit = INTEL_FRONTBUFFER(pipe, plane->id);
plane->has_fbc = i9xx_plane_has_fbc(dev_priv, plane->i9xx_plane); if (i9xx_plane_has_fbc(dev_priv, plane->i9xx_plane))
if (plane->has_fbc) { plane->fbc = &dev_priv->fbc;
struct intel_fbc *fbc = &dev_priv->fbc; if (plane->fbc)
plane->fbc->possible_framebuffer_bits |= plane->frontbuffer_bit;
fbc->possible_framebuffer_bits |= plane->frontbuffer_bit;
}
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
formats = vlv_primary_formats; formats = vlv_primary_formats;
...@@ -851,8 +867,13 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -851,8 +867,13 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
plane->max_stride = ilk_primary_max_stride; plane->max_stride = ilk_primary_max_stride;
} }
plane->update_plane = i9xx_update_plane; if (IS_I830(dev_priv) || IS_I845G(dev_priv)) {
plane->disable_plane = i9xx_disable_plane; plane->update_arm = i830_plane_update_arm;
} else {
plane->update_noarm = i9xx_plane_update_noarm;
plane->update_arm = i9xx_plane_update_arm;
}
plane->disable_arm = i9xx_plane_disable_arm;
plane->get_hw_state = i9xx_plane_get_hw_state; plane->get_hw_state = i9xx_plane_get_hw_state;
plane->check_plane = i9xx_plane_check; plane->check_plane = i9xx_plane_check;
...@@ -875,21 +896,26 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -875,21 +896,26 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
plane->disable_flip_done = ilk_primary_disable_flip_done; plane->disable_flip_done = ilk_primary_disable_flip_done;
} }
modifiers = intel_fb_plane_get_modifiers(dev_priv, INTEL_PLANE_CAP_TILING_X);
if (DISPLAY_VER(dev_priv) >= 5 || IS_G4X(dev_priv)) if (DISPLAY_VER(dev_priv) >= 5 || IS_G4X(dev_priv))
ret = drm_universal_plane_init(&dev_priv->drm, &plane->base, ret = drm_universal_plane_init(&dev_priv->drm, &plane->base,
0, plane_funcs, 0, plane_funcs,
formats, num_formats, formats, num_formats,
i9xx_format_modifiers, modifiers,
DRM_PLANE_TYPE_PRIMARY, DRM_PLANE_TYPE_PRIMARY,
"primary %c", pipe_name(pipe)); "primary %c", pipe_name(pipe));
else else
ret = drm_universal_plane_init(&dev_priv->drm, &plane->base, ret = drm_universal_plane_init(&dev_priv->drm, &plane->base,
0, plane_funcs, 0, plane_funcs,
formats, num_formats, formats, num_formats,
i9xx_format_modifiers, modifiers,
DRM_PLANE_TYPE_PRIMARY, DRM_PLANE_TYPE_PRIMARY,
"plane %c", "plane %c",
plane_name(plane->i9xx_plane)); plane_name(plane->i9xx_plane));
kfree(modifiers);
if (ret) if (ret)
goto fail; goto fail;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_mipi_dsi.h> #include <drm/drm_mipi_dsi.h>
#include "icl_dsi.h"
#include "intel_atomic.h" #include "intel_atomic.h"
#include "intel_backlight.h" #include "intel_backlight.h"
#include "intel_combo_phy.h" #include "intel_combo_phy.h"
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
#include "intel_ddi.h" #include "intel_ddi.h"
#include "intel_de.h" #include "intel_de.h"
#include "intel_dsi.h" #include "intel_dsi.h"
#include "intel_dsi_vbt.h"
#include "intel_panel.h" #include "intel_panel.h"
#include "intel_vdsc.h" #include "intel_vdsc.h"
#include "skl_scaler.h" #include "skl_scaler.h"
...@@ -183,6 +185,8 @@ static int dsi_send_pkt_hdr(struct intel_dsi_host *host, ...@@ -183,6 +185,8 @@ static int dsi_send_pkt_hdr(struct intel_dsi_host *host,
if (enable_lpdt) if (enable_lpdt)
tmp |= LP_DATA_TRANSFER; tmp |= LP_DATA_TRANSFER;
else
tmp &= ~LP_DATA_TRANSFER;
tmp &= ~(PARAM_WC_MASK | VC_MASK | DT_MASK); tmp &= ~(PARAM_WC_MASK | VC_MASK | DT_MASK);
tmp |= ((packet->header[0] & VC_MASK) << VC_SHIFT); tmp |= ((packet->header[0] & VC_MASK) << VC_SHIFT);
...@@ -1226,7 +1230,9 @@ static void gen11_dsi_pre_enable(struct intel_atomic_state *state, ...@@ -1226,7 +1230,9 @@ static void gen11_dsi_pre_enable(struct intel_atomic_state *state,
/* step5: program and powerup panel */ /* step5: program and powerup panel */
gen11_dsi_powerup_panel(encoder); gen11_dsi_powerup_panel(encoder);
intel_dsc_enable(encoder, pipe_config); intel_dsc_dsi_pps_write(encoder, pipe_config);
intel_dsc_enable(pipe_config);
/* step6c: configure transcoder timings */ /* step6c: configure transcoder timings */
gen11_dsi_set_transcoder_timings(encoder, pipe_config); gen11_dsi_set_transcoder_timings(encoder, pipe_config);
...@@ -1623,7 +1629,7 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder, ...@@ -1623,7 +1629,7 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
/* FIXME: initialize from VBT */ /* FIXME: initialize from VBT */
vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST; vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
ret = intel_dsc_compute_params(encoder, crtc_state); ret = intel_dsc_compute_params(crtc_state);
if (ret) if (ret)
return ret; return ret;
......
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2021 Intel Corporation
*/
#ifndef __ICL_DSI_H__
#define __ICL_DSI_H__
struct drm_i915_private;
struct intel_crtc_state;
void icl_dsi_init(struct drm_i915_private *i915);
void icl_dsi_frame_update(struct intel_crtc_state *crtc_state);
#endif /* __ICL_DSI_H__ */
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "intel_atomic_plane.h" #include "intel_atomic_plane.h"
#include "intel_cdclk.h" #include "intel_cdclk.h"
#include "intel_display_types.h" #include "intel_display_types.h"
#include "intel_fb.h"
#include "intel_fb_pin.h" #include "intel_fb_pin.h"
#include "intel_pm.h" #include "intel_pm.h"
#include "intel_sprite.h" #include "intel_sprite.h"
...@@ -469,30 +470,71 @@ skl_next_plane_to_commit(struct intel_atomic_state *state, ...@@ -469,30 +470,71 @@ skl_next_plane_to_commit(struct intel_atomic_state *state,
return NULL; return NULL;
} }
void intel_update_plane(struct intel_plane *plane, void intel_plane_update_noarm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state) const struct intel_plane_state *plane_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
trace_intel_update_plane(&plane->base, crtc); trace_intel_plane_update_noarm(&plane->base, crtc);
if (plane->update_noarm)
plane->update_noarm(plane, crtc_state, plane_state);
}
void intel_plane_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
trace_intel_plane_update_arm(&plane->base, crtc);
if (crtc_state->uapi.async_flip && plane->async_flip) if (crtc_state->uapi.async_flip && plane->async_flip)
plane->async_flip(plane, crtc_state, plane_state, true); plane->async_flip(plane, crtc_state, plane_state, true);
else else
plane->update_plane(plane, crtc_state, plane_state); plane->update_arm(plane, crtc_state, plane_state);
} }
void intel_disable_plane(struct intel_plane *plane, void intel_plane_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state) const struct intel_crtc_state *crtc_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
trace_intel_disable_plane(&plane->base, crtc); trace_intel_plane_disable_arm(&plane->base, crtc);
plane->disable_plane(plane, crtc_state); plane->disable_arm(plane, crtc_state);
} }
void skl_update_planes_on_crtc(struct intel_atomic_state *state, void intel_update_planes_on_crtc(struct intel_atomic_state *state,
struct intel_crtc *crtc)
{
struct intel_crtc_state *new_crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
u32 update_mask = new_crtc_state->update_planes;
struct intel_plane_state *new_plane_state;
struct intel_plane *plane;
int i;
if (new_crtc_state->uapi.async_flip)
return;
/*
* Since we only write non-arming registers here,
* the order does not matter even for skl+.
*/
for_each_new_intel_plane_in_state(state, plane, new_plane_state, i) {
if (crtc->pipe != plane->pipe ||
!(update_mask & BIT(plane->id)))
continue;
/* TODO: for mailbox updates this should be skipped */
if (new_plane_state->uapi.visible ||
new_plane_state->planar_slave)
intel_plane_update_noarm(plane, new_crtc_state, new_plane_state);
}
}
void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
struct intel_crtc *crtc) struct intel_crtc *crtc)
{ {
struct intel_crtc_state *old_crtc_state = struct intel_crtc_state *old_crtc_state =
...@@ -515,16 +557,19 @@ void skl_update_planes_on_crtc(struct intel_atomic_state *state, ...@@ -515,16 +557,19 @@ void skl_update_planes_on_crtc(struct intel_atomic_state *state,
struct intel_plane_state *new_plane_state = struct intel_plane_state *new_plane_state =
intel_atomic_get_new_plane_state(state, plane); intel_atomic_get_new_plane_state(state, plane);
/*
* TODO: for mailbox updates intel_plane_update_noarm()
* would have to be called here as well.
*/
if (new_plane_state->uapi.visible || if (new_plane_state->uapi.visible ||
new_plane_state->planar_slave) { new_plane_state->planar_slave)
intel_update_plane(plane, new_crtc_state, new_plane_state); intel_plane_update_arm(plane, new_crtc_state, new_plane_state);
} else { else
intel_disable_plane(plane, new_crtc_state); intel_plane_disable_arm(plane, new_crtc_state);
}
} }
} }
void i9xx_update_planes_on_crtc(struct intel_atomic_state *state, void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
struct intel_crtc *crtc) struct intel_crtc *crtc)
{ {
struct intel_crtc_state *new_crtc_state = struct intel_crtc_state *new_crtc_state =
...@@ -539,10 +584,14 @@ void i9xx_update_planes_on_crtc(struct intel_atomic_state *state, ...@@ -539,10 +584,14 @@ void i9xx_update_planes_on_crtc(struct intel_atomic_state *state,
!(update_mask & BIT(plane->id))) !(update_mask & BIT(plane->id)))
continue; continue;
/*
* TODO: for mailbox updates intel_plane_update_noarm()
* would have to be called here as well.
*/
if (new_plane_state->uapi.visible) if (new_plane_state->uapi.visible)
intel_update_plane(plane, new_crtc_state, new_plane_state); intel_plane_update_arm(plane, new_crtc_state, new_plane_state);
else else
intel_disable_plane(plane, new_crtc_state); intel_plane_disable_arm(plane, new_crtc_state);
} }
} }
......
...@@ -30,19 +30,24 @@ void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_state, ...@@ -30,19 +30,24 @@ void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_state,
struct intel_crtc *crtc); struct intel_crtc *crtc);
void intel_plane_copy_hw_state(struct intel_plane_state *plane_state, void intel_plane_copy_hw_state(struct intel_plane_state *plane_state,
const struct intel_plane_state *from_plane_state); const struct intel_plane_state *from_plane_state);
void intel_update_plane(struct intel_plane *plane, void intel_plane_update_noarm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state); const struct intel_plane_state *plane_state);
void intel_disable_plane(struct intel_plane *plane, void intel_plane_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state);
void intel_plane_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state); const struct intel_crtc_state *crtc_state);
struct intel_plane *intel_plane_alloc(void); struct intel_plane *intel_plane_alloc(void);
void intel_plane_free(struct intel_plane *plane); void intel_plane_free(struct intel_plane *plane);
struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane); struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane);
void intel_plane_destroy_state(struct drm_plane *plane, void intel_plane_destroy_state(struct drm_plane *plane,
struct drm_plane_state *state); struct drm_plane_state *state);
void skl_update_planes_on_crtc(struct intel_atomic_state *state, void intel_update_planes_on_crtc(struct intel_atomic_state *state,
struct intel_crtc *crtc);
void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
struct intel_crtc *crtc); struct intel_crtc *crtc);
void i9xx_update_planes_on_crtc(struct intel_atomic_state *state, void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
struct intel_crtc *crtc); struct intel_crtc *crtc);
int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state, int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
struct intel_crtc_state *crtc_state, struct intel_crtc_state *crtc_state,
......
This diff is collapsed.
...@@ -11,13 +11,15 @@ struct drm_i915_private; ...@@ -11,13 +11,15 @@ struct drm_i915_private;
struct intel_crtc_state; struct intel_crtc_state;
struct intel_encoder; struct intel_encoder;
void intel_init_audio_hooks(struct drm_i915_private *dev_priv); void intel_audio_hooks_init(struct drm_i915_private *dev_priv);
void intel_audio_codec_enable(struct intel_encoder *encoder, void intel_audio_codec_enable(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state); const struct drm_connector_state *conn_state);
void intel_audio_codec_disable(struct intel_encoder *encoder, void intel_audio_codec_disable(struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state, const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state); const struct drm_connector_state *old_conn_state);
void intel_audio_cdclk_change_pre(struct drm_i915_private *dev_priv);
void intel_audio_cdclk_change_post(struct drm_i915_private *dev_priv);
void intel_audio_init(struct drm_i915_private *dev_priv); void intel_audio_init(struct drm_i915_private *dev_priv);
void intel_audio_deinit(struct drm_i915_private *dev_priv); void intel_audio_deinit(struct drm_i915_private *dev_priv);
......
This diff is collapsed.
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/time.h> #include <linux/time.h>
#include "intel_atomic.h" #include "intel_atomic.h"
#include "intel_audio.h"
#include "intel_bw.h" #include "intel_bw.h"
#include "intel_cdclk.h" #include "intel_cdclk.h"
#include "intel_de.h" #include "intel_de.h"
...@@ -1975,6 +1976,8 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, ...@@ -1975,6 +1976,8 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv,
intel_psr_pause(intel_dp); intel_psr_pause(intel_dp);
} }
intel_audio_cdclk_change_pre(dev_priv);
/* /*
* Lock aux/gmbus while we change cdclk in case those * Lock aux/gmbus while we change cdclk in case those
* functions use cdclk. Not all platforms/ports do, * functions use cdclk. Not all platforms/ports do,
...@@ -2003,6 +2006,8 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv, ...@@ -2003,6 +2006,8 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv,
intel_psr_resume(intel_dp); intel_psr_resume(intel_dp);
} }
intel_audio_cdclk_change_post(dev_priv);
if (drm_WARN(&dev_priv->drm, if (drm_WARN(&dev_priv->drm,
intel_cdclk_changed(&dev_priv->cdclk.hw, cdclk_config), intel_cdclk_changed(&dev_priv->cdclk.hw, cdclk_config),
"cdclk state doesn't match!\n")) { "cdclk state doesn't match!\n")) {
......
This diff is collapsed.
...@@ -301,7 +301,7 @@ void intel_combo_phy_power_up_lanes(struct drm_i915_private *dev_priv, ...@@ -301,7 +301,7 @@ void intel_combo_phy_power_up_lanes(struct drm_i915_private *dev_priv,
val = intel_de_read(dev_priv, ICL_PORT_CL_DW10(phy)); val = intel_de_read(dev_priv, ICL_PORT_CL_DW10(phy));
val &= ~PWR_DOWN_LN_MASK; val &= ~PWR_DOWN_LN_MASK;
val |= lane_mask << PWR_DOWN_LN_SHIFT; val |= lane_mask;
intel_de_write(dev_priv, ICL_PORT_CL_DW10(phy), val); intel_de_write(dev_priv, ICL_PORT_CL_DW10(phy), val);
} }
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "intel_fifo_underrun.h" #include "intel_fifo_underrun.h"
#include "intel_gmbus.h" #include "intel_gmbus.h"
#include "intel_hotplug.h" #include "intel_hotplug.h"
#include "intel_pch_display.h"
/* Here's the desired hotplug mode */ /* Here's the desired hotplug mode */
#define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \ #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \
...@@ -143,7 +144,7 @@ static void intel_crt_get_config(struct intel_encoder *encoder, ...@@ -143,7 +144,7 @@ static void intel_crt_get_config(struct intel_encoder *encoder,
static void hsw_crt_get_config(struct intel_encoder *encoder, static void hsw_crt_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config) struct intel_crtc_state *pipe_config)
{ {
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); lpt_pch_get_config(pipe_config);
hsw_ddi_get_config(encoder, pipe_config); hsw_ddi_get_config(encoder, pipe_config);
...@@ -152,8 +153,6 @@ static void hsw_crt_get_config(struct intel_encoder *encoder, ...@@ -152,8 +153,6 @@ static void hsw_crt_get_config(struct intel_encoder *encoder,
DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_PVSYNC |
DRM_MODE_FLAG_NVSYNC); DRM_MODE_FLAG_NVSYNC);
pipe_config->hw.adjusted_mode.flags |= intel_crt_get_flags(encoder); pipe_config->hw.adjusted_mode.flags |= intel_crt_get_flags(encoder);
pipe_config->hw.adjusted_mode.crtc_clock = lpt_get_iclkip(dev_priv);
} }
/* Note: The caller is required to filter out dpms modes not supported by the /* Note: The caller is required to filter out dpms modes not supported by the
...@@ -247,6 +246,7 @@ static void hsw_post_disable_crt(struct intel_atomic_state *state, ...@@ -247,6 +246,7 @@ static void hsw_post_disable_crt(struct intel_atomic_state *state,
const struct intel_crtc_state *old_crtc_state, const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state) const struct drm_connector_state *old_conn_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
intel_crtc_vblank_off(old_crtc_state); intel_crtc_vblank_off(old_crtc_state);
...@@ -261,10 +261,9 @@ static void hsw_post_disable_crt(struct intel_atomic_state *state, ...@@ -261,10 +261,9 @@ static void hsw_post_disable_crt(struct intel_atomic_state *state,
pch_post_disable_crt(state, encoder, old_crtc_state, old_conn_state); pch_post_disable_crt(state, encoder, old_crtc_state, old_conn_state);
lpt_disable_pch_transcoder(dev_priv); lpt_pch_disable(state, crtc);
lpt_disable_iclkip(dev_priv);
intel_ddi_fdi_post_disable(state, encoder, old_crtc_state, old_conn_state); hsw_fdi_disable(encoder);
drm_WARN_ON(&dev_priv->drm, !old_crtc_state->has_pch_encoder); drm_WARN_ON(&dev_priv->drm, !old_crtc_state->has_pch_encoder);
...@@ -316,7 +315,7 @@ static void hsw_enable_crt(struct intel_atomic_state *state, ...@@ -316,7 +315,7 @@ static void hsw_enable_crt(struct intel_atomic_state *state,
intel_enable_transcoder(crtc_state); intel_enable_transcoder(crtc_state);
lpt_pch_enable(crtc_state); lpt_pch_enable(state, crtc);
intel_crtc_vblank_on(crtc_state); intel_crtc_vblank_on(crtc_state);
......
...@@ -3,16 +3,18 @@ ...@@ -3,16 +3,18 @@
* Copyright © 2020 Intel Corporation * Copyright © 2020 Intel Corporation
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pm_qos.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_plane.h> #include <drm/drm_plane.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>
#include <drm/drm_vblank_work.h>
#include "i915_trace.h" #include "i915_trace.h"
#include "i915_vgpu.h" #include "i915_vgpu.h"
#include "icl_dsi.h"
#include "intel_atomic.h" #include "intel_atomic.h"
#include "intel_atomic_plane.h" #include "intel_atomic_plane.h"
#include "intel_color.h" #include "intel_color.h"
...@@ -167,6 +169,8 @@ static void intel_crtc_destroy(struct drm_crtc *_crtc) ...@@ -167,6 +169,8 @@ static void intel_crtc_destroy(struct drm_crtc *_crtc)
{ {
struct intel_crtc *crtc = to_intel_crtc(_crtc); struct intel_crtc *crtc = to_intel_crtc(_crtc);
cpu_latency_qos_remove_request(&crtc->vblank_pm_qos);
drm_crtc_cleanup(&crtc->base); drm_crtc_cleanup(&crtc->base);
kfree(crtc); kfree(crtc);
} }
...@@ -344,6 +348,8 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -344,6 +348,8 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
intel_crtc_crc_init(crtc); intel_crtc_crc_init(crtc);
cpu_latency_qos_add_request(&crtc->vblank_pm_qos, PM_QOS_DEFAULT_VALUE);
drm_WARN_ON(&dev_priv->drm, drm_crtc_index(&crtc->base) != crtc->pipe); drm_WARN_ON(&dev_priv->drm, drm_crtc_index(&crtc->base) != crtc->pipe);
return 0; return 0;
...@@ -354,6 +360,65 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe) ...@@ -354,6 +360,65 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
return ret; return ret;
} }
static bool intel_crtc_needs_vblank_work(const struct intel_crtc_state *crtc_state)
{
return crtc_state->hw.active &&
!intel_crtc_needs_modeset(crtc_state) &&
!crtc_state->preload_luts &&
(crtc_state->uapi.color_mgmt_changed ||
crtc_state->update_pipe);
}
static void intel_crtc_vblank_work(struct kthread_work *base)
{
struct drm_vblank_work *work = to_drm_vblank_work(base);
struct intel_crtc_state *crtc_state =
container_of(work, typeof(*crtc_state), vblank_work);
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
trace_intel_crtc_vblank_work_start(crtc);
intel_color_load_luts(crtc_state);
if (crtc_state->uapi.event) {
spin_lock_irq(&crtc->base.dev->event_lock);
drm_crtc_send_vblank_event(&crtc->base, crtc_state->uapi.event);
crtc_state->uapi.event = NULL;
spin_unlock_irq(&crtc->base.dev->event_lock);
}
trace_intel_crtc_vblank_work_end(crtc);
}
static void intel_crtc_vblank_work_init(struct intel_crtc_state *crtc_state)
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
drm_vblank_work_init(&crtc_state->vblank_work, &crtc->base,
intel_crtc_vblank_work);
/*
* Interrupt latency is critical for getting the vblank
* work executed as early as possible during the vblank.
*/
cpu_latency_qos_update_request(&crtc->vblank_pm_qos, 0);
}
void intel_wait_for_vblank_workers(struct intel_atomic_state *state)
{
struct intel_crtc_state *crtc_state;
struct intel_crtc *crtc;
int i;
for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
if (!intel_crtc_needs_vblank_work(crtc_state))
continue;
drm_vblank_work_flush(&crtc_state->vblank_work);
cpu_latency_qos_update_request(&crtc->vblank_pm_qos,
PM_QOS_DEFAULT_VALUE);
}
}
int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode, int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
int usecs) int usecs)
{ {
...@@ -387,7 +452,7 @@ static int intel_mode_vblank_start(const struct drm_display_mode *mode) ...@@ -387,7 +452,7 @@ static int intel_mode_vblank_start(const struct drm_display_mode *mode)
* until a subsequent call to intel_pipe_update_end(). That is done to * until a subsequent call to intel_pipe_update_end(). That is done to
* avoid random delays. * avoid random delays.
*/ */
void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state) void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
...@@ -402,10 +467,17 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state) ...@@ -402,10 +467,17 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
if (new_crtc_state->uapi.async_flip) if (new_crtc_state->uapi.async_flip)
return; return;
if (new_crtc_state->vrr.enable) if (intel_crtc_needs_vblank_work(new_crtc_state))
vblank_start = intel_vrr_vmax_vblank_start(new_crtc_state); intel_crtc_vblank_work_init(new_crtc_state);
if (new_crtc_state->vrr.enable) {
if (intel_vrr_is_push_sent(new_crtc_state))
vblank_start = intel_vrr_vmin_vblank_start(new_crtc_state);
else else
vblank_start = intel_vrr_vmax_vblank_start(new_crtc_state);
} else {
vblank_start = intel_mode_vblank_start(adjusted_mode); vblank_start = intel_mode_vblank_start(adjusted_mode);
}
/* FIXME needs to be calibrated sensibly */ /* FIXME needs to be calibrated sensibly */
min = vblank_start - intel_usecs_to_scanlines(adjusted_mode, min = vblank_start - intel_usecs_to_scanlines(adjusted_mode,
...@@ -554,7 +626,11 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state) ...@@ -554,7 +626,11 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
* Would be slightly nice to just grab the vblank count and arm the * Would be slightly nice to just grab the vblank count and arm the
* event outside of the critical section - the spinlock might spin for a * event outside of the critical section - the spinlock might spin for a
* while ... */ * while ... */
if (new_crtc_state->uapi.event) { if (intel_crtc_needs_vblank_work(new_crtc_state)) {
drm_vblank_work_schedule(&new_crtc_state->vblank_work,
drm_crtc_accurate_vblank_count(&crtc->base) + 1,
false);
} else if (new_crtc_state->uapi.event) {
drm_WARN_ON(&dev_priv->drm, drm_WARN_ON(&dev_priv->drm,
drm_crtc_vblank_get(&crtc->base) != 0); drm_crtc_vblank_get(&crtc->base) != 0);
...@@ -566,11 +642,24 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state) ...@@ -566,11 +642,24 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
new_crtc_state->uapi.event = NULL; new_crtc_state->uapi.event = NULL;
} }
local_irq_enable(); /*
* Send VRR Push to terminate Vblank. If we are already in vblank
/* Send VRR Push to terminate Vblank */ * this has to be done _after_ sampling the frame counter, as
* otherwise the push would immediately terminate the vblank and
* the sampled frame counter would correspond to the next frame
* instead of the current frame.
*
* There is a tiny race here (iff vblank evasion failed us) where
* we might sample the frame counter just before vmax vblank start
* but the push would be sent just after it. That would cause the
* push to affect the next frame instead of the current frame,
* which would cause the next frame to terminate already at vmin
* vblank start instead of vmax vblank start.
*/
intel_vrr_send_push(new_crtc_state); intel_vrr_send_push(new_crtc_state);
local_irq_enable();
if (intel_vgpu_active(dev_priv)) if (intel_vgpu_active(dev_priv))
return; return;
......
...@@ -9,10 +9,14 @@ ...@@ -9,10 +9,14 @@
#include <linux/types.h> #include <linux/types.h>
enum pipe; enum pipe;
struct drm_display_mode;
struct drm_i915_private; struct drm_i915_private;
struct intel_atomic_state;
struct intel_crtc; struct intel_crtc;
struct intel_crtc_state; struct intel_crtc_state;
int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
int usecs);
u32 intel_crtc_max_vblank_count(const struct intel_crtc_state *crtc_state); u32 intel_crtc_max_vblank_count(const struct intel_crtc_state *crtc_state);
int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe); int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe);
struct intel_crtc_state *intel_crtc_state_alloc(struct intel_crtc *crtc); struct intel_crtc_state *intel_crtc_state_alloc(struct intel_crtc *crtc);
...@@ -21,5 +25,8 @@ void intel_crtc_state_reset(struct intel_crtc_state *crtc_state, ...@@ -21,5 +25,8 @@ void intel_crtc_state_reset(struct intel_crtc_state *crtc_state,
u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc); u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc);
void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state); void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state);
void intel_crtc_vblank_off(const struct intel_crtc_state *crtc_state); void intel_crtc_vblank_off(const struct intel_crtc_state *crtc_state);
void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state);
void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state);
void intel_wait_for_vblank_workers(struct intel_atomic_state *state);
#endif #endif
...@@ -28,11 +28,6 @@ static const u32 intel_cursor_formats[] = { ...@@ -28,11 +28,6 @@ static const u32 intel_cursor_formats[] = {
DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB8888,
}; };
static const u64 cursor_format_modifiers[] = {
DRM_FORMAT_MOD_LINEAR,
DRM_FORMAT_MOD_INVALID
};
static u32 intel_cursor_base(const struct intel_plane_state *plane_state) static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
{ {
struct drm_i915_private *dev_priv = struct drm_i915_private *dev_priv =
...@@ -195,7 +190,7 @@ static u32 i845_cursor_ctl(const struct intel_crtc_state *crtc_state, ...@@ -195,7 +190,7 @@ static u32 i845_cursor_ctl(const struct intel_crtc_state *crtc_state,
{ {
return CURSOR_ENABLE | return CURSOR_ENABLE |
CURSOR_FORMAT_ARGB | CURSOR_FORMAT_ARGB |
CURSOR_STRIDE(plane_state->view.color_plane[0].stride); CURSOR_STRIDE(plane_state->view.color_plane[0].mapping_stride);
} }
static bool i845_cursor_size_ok(const struct intel_plane_state *plane_state) static bool i845_cursor_size_ok(const struct intel_plane_state *plane_state)
...@@ -234,7 +229,7 @@ static int i845_check_cursor(struct intel_crtc_state *crtc_state, ...@@ -234,7 +229,7 @@ static int i845_check_cursor(struct intel_crtc_state *crtc_state,
} }
drm_WARN_ON(&i915->drm, plane_state->uapi.visible && drm_WARN_ON(&i915->drm, plane_state->uapi.visible &&
plane_state->view.color_plane[0].stride != fb->pitches[0]); plane_state->view.color_plane[0].mapping_stride != fb->pitches[0]);
switch (fb->pitches[0]) { switch (fb->pitches[0]) {
case 256: case 256:
...@@ -253,7 +248,8 @@ static int i845_check_cursor(struct intel_crtc_state *crtc_state, ...@@ -253,7 +248,8 @@ static int i845_check_cursor(struct intel_crtc_state *crtc_state,
return 0; return 0;
} }
static void i845_update_cursor(struct intel_plane *plane, /* TODO: split into noarm+arm pair */
static void i845_cursor_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state) const struct intel_plane_state *plane_state)
{ {
...@@ -298,10 +294,10 @@ static void i845_update_cursor(struct intel_plane *plane, ...@@ -298,10 +294,10 @@ static void i845_update_cursor(struct intel_plane *plane,
spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
} }
static void i845_disable_cursor(struct intel_plane *plane, static void i845_cursor_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state) const struct intel_crtc_state *crtc_state)
{ {
i845_update_cursor(plane, crtc_state, NULL); i845_cursor_update_arm(plane, crtc_state, NULL);
} }
static bool i845_cursor_get_hw_state(struct intel_plane *plane, static bool i845_cursor_get_hw_state(struct intel_plane *plane,
...@@ -455,7 +451,7 @@ static int i9xx_check_cursor(struct intel_crtc_state *crtc_state, ...@@ -455,7 +451,7 @@ static int i9xx_check_cursor(struct intel_crtc_state *crtc_state,
} }
drm_WARN_ON(&dev_priv->drm, plane_state->uapi.visible && drm_WARN_ON(&dev_priv->drm, plane_state->uapi.visible &&
plane_state->view.color_plane[0].stride != fb->pitches[0]); plane_state->view.color_plane[0].mapping_stride != fb->pitches[0]);
if (fb->pitches[0] != if (fb->pitches[0] !=
drm_rect_width(&plane_state->uapi.dst) * fb->format->cpp[0]) { drm_rect_width(&plane_state->uapi.dst) * fb->format->cpp[0]) {
...@@ -488,7 +484,8 @@ static int i9xx_check_cursor(struct intel_crtc_state *crtc_state, ...@@ -488,7 +484,8 @@ static int i9xx_check_cursor(struct intel_crtc_state *crtc_state,
return 0; return 0;
} }
static void i9xx_update_cursor(struct intel_plane *plane, /* TODO: split into noarm+arm pair */
static void i9xx_cursor_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state) const struct intel_plane_state *plane_state)
{ {
...@@ -562,10 +559,10 @@ static void i9xx_update_cursor(struct intel_plane *plane, ...@@ -562,10 +559,10 @@ static void i9xx_update_cursor(struct intel_plane *plane,
spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
} }
static void i9xx_disable_cursor(struct intel_plane *plane, static void i9xx_cursor_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state) const struct intel_crtc_state *crtc_state)
{ {
i9xx_update_cursor(plane, crtc_state, NULL); i9xx_cursor_update_arm(plane, crtc_state, NULL);
} }
static bool i9xx_cursor_get_hw_state(struct intel_plane *plane, static bool i9xx_cursor_get_hw_state(struct intel_plane *plane,
...@@ -605,8 +602,10 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane, ...@@ -605,8 +602,10 @@ static bool i9xx_cursor_get_hw_state(struct intel_plane *plane,
static bool intel_cursor_format_mod_supported(struct drm_plane *_plane, static bool intel_cursor_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier) u32 format, u64 modifier)
{ {
return modifier == DRM_FORMAT_MOD_LINEAR && if (!intel_fb_plane_supports_modifier(to_intel_plane(_plane), modifier))
format == DRM_FORMAT_ARGB8888; return false;
return format == DRM_FORMAT_ARGB8888;
} }
static int static int
...@@ -717,10 +716,12 @@ intel_legacy_cursor_update(struct drm_plane *_plane, ...@@ -717,10 +716,12 @@ intel_legacy_cursor_update(struct drm_plane *_plane,
*/ */
crtc_state->active_planes = new_crtc_state->active_planes; crtc_state->active_planes = new_crtc_state->active_planes;
if (new_plane_state->uapi.visible) if (new_plane_state->uapi.visible) {
intel_update_plane(plane, crtc_state, new_plane_state); intel_plane_update_noarm(plane, crtc_state, new_plane_state);
else intel_plane_update_arm(plane, crtc_state, new_plane_state);
intel_disable_plane(plane, crtc_state); } else {
intel_plane_disable_arm(plane, crtc_state);
}
intel_plane_unpin_fb(old_plane_state); intel_plane_unpin_fb(old_plane_state);
...@@ -754,6 +755,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv, ...@@ -754,6 +755,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
{ {
struct intel_plane *cursor; struct intel_plane *cursor;
int ret, zpos; int ret, zpos;
u64 *modifiers;
cursor = intel_plane_alloc(); cursor = intel_plane_alloc();
if (IS_ERR(cursor)) if (IS_ERR(cursor))
...@@ -766,14 +768,14 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv, ...@@ -766,14 +768,14 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
if (IS_I845G(dev_priv) || IS_I865G(dev_priv)) { if (IS_I845G(dev_priv) || IS_I865G(dev_priv)) {
cursor->max_stride = i845_cursor_max_stride; cursor->max_stride = i845_cursor_max_stride;
cursor->update_plane = i845_update_cursor; cursor->update_arm = i845_cursor_update_arm;
cursor->disable_plane = i845_disable_cursor; cursor->disable_arm = i845_cursor_disable_arm;
cursor->get_hw_state = i845_cursor_get_hw_state; cursor->get_hw_state = i845_cursor_get_hw_state;
cursor->check_plane = i845_check_cursor; cursor->check_plane = i845_check_cursor;
} else { } else {
cursor->max_stride = i9xx_cursor_max_stride; cursor->max_stride = i9xx_cursor_max_stride;
cursor->update_plane = i9xx_update_cursor; cursor->update_arm = i9xx_cursor_update_arm;
cursor->disable_plane = i9xx_disable_cursor; cursor->disable_arm = i9xx_cursor_disable_arm;
cursor->get_hw_state = i9xx_cursor_get_hw_state; cursor->get_hw_state = i9xx_cursor_get_hw_state;
cursor->check_plane = i9xx_check_cursor; cursor->check_plane = i9xx_check_cursor;
} }
...@@ -784,13 +786,18 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv, ...@@ -784,13 +786,18 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
if (IS_I845G(dev_priv) || IS_I865G(dev_priv) || HAS_CUR_FBC(dev_priv)) if (IS_I845G(dev_priv) || IS_I865G(dev_priv) || HAS_CUR_FBC(dev_priv))
cursor->cursor.size = ~0; cursor->cursor.size = ~0;
modifiers = intel_fb_plane_get_modifiers(dev_priv, INTEL_PLANE_CAP_NONE);
ret = drm_universal_plane_init(&dev_priv->drm, &cursor->base, ret = drm_universal_plane_init(&dev_priv->drm, &cursor->base,
0, &intel_cursor_plane_funcs, 0, &intel_cursor_plane_funcs,
intel_cursor_formats, intel_cursor_formats,
ARRAY_SIZE(intel_cursor_formats), ARRAY_SIZE(intel_cursor_formats),
cursor_format_modifiers, modifiers,
DRM_PLANE_TYPE_CURSOR, DRM_PLANE_TYPE_CURSOR,
"cursor %c", pipe_name(pipe)); "cursor %c", pipe_name(pipe));
kfree(modifiers);
if (ret) if (ret)
goto fail; goto fail;
......
This diff is collapsed.
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
#ifndef __INTEL_DDI_H__ #ifndef __INTEL_DDI_H__
#define __INTEL_DDI_H__ #define __INTEL_DDI_H__
#include "intel_display.h"
#include "i915_reg.h" #include "i915_reg.h"
struct drm_connector_state; struct drm_connector_state;
struct drm_i915_private; struct drm_i915_private;
struct intel_atomic_state;
struct intel_connector; struct intel_connector;
struct intel_crtc; struct intel_crtc;
struct intel_crtc_state; struct intel_crtc_state;
...@@ -18,6 +18,8 @@ struct intel_dp; ...@@ -18,6 +18,8 @@ struct intel_dp;
struct intel_dpll_hw_state; struct intel_dpll_hw_state;
struct intel_encoder; struct intel_encoder;
struct intel_shared_dpll; struct intel_shared_dpll;
enum pipe;
enum port;
enum transcoder; enum transcoder;
i915_reg_t dp_tp_ctl_reg(struct intel_encoder *encoder, i915_reg_t dp_tp_ctl_reg(struct intel_encoder *encoder,
...@@ -30,6 +32,7 @@ void intel_ddi_fdi_post_disable(struct intel_atomic_state *state, ...@@ -30,6 +32,7 @@ void intel_ddi_fdi_post_disable(struct intel_atomic_state *state,
const struct drm_connector_state *old_conn_state); const struct drm_connector_state *old_conn_state);
void intel_ddi_enable_clock(struct intel_encoder *encoder, void intel_ddi_enable_clock(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state); const struct intel_crtc_state *crtc_state);
void intel_ddi_disable_clock(struct intel_encoder *encoder);
void intel_ddi_get_clock(struct intel_encoder *encoder, void intel_ddi_get_clock(struct intel_encoder *encoder,
struct intel_crtc_state *crtc_state, struct intel_crtc_state *crtc_state,
struct intel_shared_dpll *pll); struct intel_shared_dpll *pll);
......
...@@ -521,7 +521,6 @@ void intel_link_compute_m_n(u16 bpp, int nlanes, ...@@ -521,7 +521,6 @@ void intel_link_compute_m_n(u16 bpp, int nlanes,
int pixel_clock, int link_clock, int pixel_clock, int link_clock,
struct intel_link_m_n *m_n, struct intel_link_m_n *m_n,
bool constant_n, bool fec_enable); bool constant_n, bool fec_enable);
void lpt_disable_clkout_dp(struct drm_i915_private *dev_priv);
u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv, u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv,
u32 pixel_format, u64 modifier); u32 pixel_format, u64 modifier);
enum drm_mode_status enum drm_mode_status
...@@ -542,9 +541,6 @@ int vlv_get_cck_clock(struct drm_i915_private *dev_priv, ...@@ -542,9 +541,6 @@ int vlv_get_cck_clock(struct drm_i915_private *dev_priv,
const char *name, u32 reg, int ref_freq); const char *name, u32 reg, int ref_freq);
int vlv_get_cck_clock_hpll(struct drm_i915_private *dev_priv, int vlv_get_cck_clock_hpll(struct drm_i915_private *dev_priv,
const char *name, u32 reg); const char *name, u32 reg);
void lpt_pch_enable(const struct intel_crtc_state *crtc_state);
void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv);
void lpt_disable_iclkip(struct drm_i915_private *dev_priv);
void intel_init_display_hooks(struct drm_i915_private *dev_priv); void intel_init_display_hooks(struct drm_i915_private *dev_priv);
unsigned int intel_fb_xy_to_linear(int x, int y, unsigned int intel_fb_xy_to_linear(int x, int y,
const struct intel_plane_state *state, const struct intel_plane_state *state,
...@@ -580,10 +576,6 @@ struct drm_framebuffer * ...@@ -580,10 +576,6 @@ struct drm_framebuffer *
intel_framebuffer_create(struct drm_i915_gem_object *obj, intel_framebuffer_create(struct drm_i915_gem_object *obj,
struct drm_mode_fb_cmd2 *mode_cmd); struct drm_mode_fb_cmd2 *mode_cmd);
void assert_pch_transcoder_disabled(struct drm_i915_private *dev_priv,
enum pipe pipe);
int lpt_get_iclkip(struct drm_i915_private *dev_priv);
bool intel_fuzzy_clock_check(int clock1, int clock2); bool intel_fuzzy_clock_check(int clock1, int clock2);
void intel_display_prepare_reset(struct drm_i915_private *dev_priv); void intel_display_prepare_reset(struct drm_i915_private *dev_priv);
...@@ -592,8 +584,11 @@ void intel_dp_get_m_n(struct intel_crtc *crtc, ...@@ -592,8 +584,11 @@ void intel_dp_get_m_n(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config); struct intel_crtc_state *pipe_config);
void intel_dp_set_m_n(const struct intel_crtc_state *crtc_state, void intel_dp_set_m_n(const struct intel_crtc_state *crtc_state,
enum link_m_n_set m_n); enum link_m_n_set m_n);
void ilk_get_fdi_m_n_config(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config);
void i9xx_crtc_clock_get(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config);
int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n); int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n);
bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state); bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state);
void hsw_enable_ips(const struct intel_crtc_state *crtc_state); void hsw_enable_ips(const struct intel_crtc_state *crtc_state);
void hsw_disable_ips(const struct intel_crtc_state *crtc_state); void hsw_disable_ips(const struct intel_crtc_state *crtc_state);
...@@ -610,9 +605,6 @@ int bdw_get_pipemisc_bpp(struct intel_crtc *crtc); ...@@ -610,9 +605,6 @@ int bdw_get_pipemisc_bpp(struct intel_crtc *crtc);
unsigned int intel_plane_fence_y_offset(const struct intel_plane_state *plane_state); unsigned int intel_plane_fence_y_offset(const struct intel_plane_state *plane_state);
bool intel_plane_uses_fence(const struct intel_plane_state *plane_state); bool intel_plane_uses_fence(const struct intel_plane_state *plane_state);
bool
intel_format_info_is_yuv_semiplanar(const struct drm_format_info *info,
u64 modifier);
struct intel_encoder * struct intel_encoder *
intel_get_crtc_new_encoder(const struct intel_atomic_state *state, intel_get_crtc_new_encoder(const struct intel_atomic_state *state,
...@@ -632,7 +624,6 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915); ...@@ -632,7 +624,6 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915);
void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915); void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915);
void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915); void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915);
void intel_display_resume(struct drm_device *dev); void intel_display_resume(struct drm_device *dev);
void intel_init_pch_refclk(struct drm_i915_private *dev_priv);
int intel_modeset_all_pipes(struct intel_atomic_state *state); int intel_modeset_all_pipes(struct intel_atomic_state *state);
/* modesetting asserts */ /* modesetting asserts */
......
...@@ -52,27 +52,12 @@ static int i915_fbc_status(struct seq_file *m, void *unused) ...@@ -52,27 +52,12 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm); wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
mutex_lock(&fbc->lock); mutex_lock(&fbc->lock);
if (intel_fbc_is_active(dev_priv)) if (intel_fbc_is_active(fbc)) {
seq_puts(m, "FBC enabled\n"); seq_puts(m, "FBC enabled\n");
else seq_printf(m, "Compressing: %s\n",
yesno(intel_fbc_is_compressing(fbc)));
} else {
seq_printf(m, "FBC disabled: %s\n", fbc->no_fbc_reason); seq_printf(m, "FBC disabled: %s\n", fbc->no_fbc_reason);
if (intel_fbc_is_active(dev_priv)) {
u32 mask;
if (DISPLAY_VER(dev_priv) >= 8)
mask = intel_de_read(dev_priv, IVB_FBC_STATUS2) & BDW_FBC_COMP_SEG_MASK;
else if (DISPLAY_VER(dev_priv) >= 7)
mask = intel_de_read(dev_priv, IVB_FBC_STATUS2) & IVB_FBC_COMP_SEG_MASK;
else if (DISPLAY_VER(dev_priv) >= 5)
mask = intel_de_read(dev_priv, ILK_DPFC_STATUS) & ILK_DPFC_COMP_SEG_MASK;
else if (IS_G4X(dev_priv))
mask = intel_de_read(dev_priv, DPFC_STATUS) & DPFC_COMP_SEG_MASK;
else
mask = intel_de_read(dev_priv, FBC_STATUS) &
(FBC_STAT_COMPRESSING | FBC_STAT_COMPRESSED);
seq_printf(m, "Compressing: %s\n", yesno(mask));
} }
mutex_unlock(&fbc->lock); mutex_unlock(&fbc->lock);
...@@ -85,9 +70,6 @@ static int i915_fbc_false_color_get(void *data, u64 *val) ...@@ -85,9 +70,6 @@ static int i915_fbc_false_color_get(void *data, u64 *val)
{ {
struct drm_i915_private *dev_priv = data; struct drm_i915_private *dev_priv = data;
if (DISPLAY_VER(dev_priv) < 7 || !HAS_FBC(dev_priv))
return -ENODEV;
*val = dev_priv->fbc.false_color; *val = dev_priv->fbc.false_color;
return 0; return 0;
...@@ -96,21 +78,8 @@ static int i915_fbc_false_color_get(void *data, u64 *val) ...@@ -96,21 +78,8 @@ static int i915_fbc_false_color_get(void *data, u64 *val)
static int i915_fbc_false_color_set(void *data, u64 val) static int i915_fbc_false_color_set(void *data, u64 val)
{ {
struct drm_i915_private *dev_priv = data; struct drm_i915_private *dev_priv = data;
u32 reg;
if (DISPLAY_VER(dev_priv) < 7 || !HAS_FBC(dev_priv))
return -ENODEV;
mutex_lock(&dev_priv->fbc.lock);
reg = intel_de_read(dev_priv, ILK_DPFC_CONTROL); return intel_fbc_set_false_color(&dev_priv->fbc, val);
dev_priv->fbc.false_color = val;
intel_de_write(dev_priv, ILK_DPFC_CONTROL,
val ? (reg | FBC_CTL_FALSE_COLOR) : (reg & ~FBC_CTL_FALSE_COLOR));
mutex_unlock(&dev_priv->fbc.lock);
return 0;
} }
DEFINE_SIMPLE_ATTRIBUTE(i915_fbc_false_color_fops, DEFINE_SIMPLE_ATTRIBUTE(i915_fbc_false_color_fops,
...@@ -303,8 +272,7 @@ psr_source_status(struct intel_dp *intel_dp, struct seq_file *m) ...@@ -303,8 +272,7 @@ psr_source_status(struct intel_dp *intel_dp, struct seq_file *m)
}; };
val = intel_de_read(dev_priv, val = intel_de_read(dev_priv,
EDP_PSR2_STATUS(intel_dp->psr.transcoder)); EDP_PSR2_STATUS(intel_dp->psr.transcoder));
status_val = (val & EDP_PSR2_STATUS_STATE_MASK) >> status_val = REG_FIELD_GET(EDP_PSR2_STATUS_STATE_MASK, val);
EDP_PSR2_STATUS_STATE_SHIFT;
if (status_val < ARRAY_SIZE(live_status)) if (status_val < ARRAY_SIZE(live_status))
status = live_status[status_val]; status = live_status[status_val];
} else { } else {
...@@ -503,28 +471,9 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_edp_psr_debug_fops, ...@@ -503,28 +471,9 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_edp_psr_debug_fops,
static int i915_power_domain_info(struct seq_file *m, void *unused) static int i915_power_domain_info(struct seq_file *m, void *unused)
{ {
struct drm_i915_private *dev_priv = node_to_i915(m->private); struct drm_i915_private *i915 = node_to_i915(m->private);
struct i915_power_domains *power_domains = &dev_priv->power_domains;
int i;
mutex_lock(&power_domains->lock);
seq_printf(m, "%-25s %s\n", "Power well/domain", "Use count");
for (i = 0; i < power_domains->power_well_count; i++) {
struct i915_power_well *power_well;
enum intel_display_power_domain power_domain;
power_well = &power_domains->power_wells[i];
seq_printf(m, "%-25s %d\n", power_well->desc->name,
power_well->count);
for_each_power_domain(power_domain, power_well->desc->domains)
seq_printf(m, " %-23s %d\n",
intel_display_power_domain_str(power_domain),
power_domains->domain_use_count[power_domain]);
}
mutex_unlock(&power_domains->lock); intel_display_power_debug(i915, m);
return 0; return 0;
} }
...@@ -2095,7 +2044,7 @@ i915_fifo_underrun_reset_write(struct file *filp, ...@@ -2095,7 +2044,7 @@ i915_fifo_underrun_reset_write(struct file *filp,
return ret; return ret;
} }
ret = intel_fbc_reset_underrun(dev_priv); ret = intel_fbc_reset_underrun(&dev_priv->fbc);
if (ret) if (ret)
return ret; return ret;
......
...@@ -20,6 +20,8 @@ enum { ...@@ -20,6 +20,8 @@ enum {
DMC_FW_MAIN = 0, DMC_FW_MAIN = 0,
DMC_FW_PIPEA, DMC_FW_PIPEA,
DMC_FW_PIPEB, DMC_FW_PIPEB,
DMC_FW_PIPEC,
DMC_FW_PIPED,
DMC_FW_MAX DMC_FW_MAX
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "intel_dpio_phy.h" #include "intel_dpio_phy.h"
#include "intel_dpll.h" #include "intel_dpll.h"
#include "intel_dpll_mgr.h" #include "intel_dpll_mgr.h"
#include "intel_pch_refclk.h"
#include "intel_tc.h" #include "intel_tc.h"
/** /**
...@@ -3740,7 +3741,7 @@ static void combo_pll_enable(struct drm_i915_private *dev_priv, ...@@ -3740,7 +3741,7 @@ static void combo_pll_enable(struct drm_i915_private *dev_priv,
* domain. * domain.
*/ */
pll->wakeref = intel_display_power_get(dev_priv, pll->wakeref = intel_display_power_get(dev_priv,
POWER_DOMAIN_DPLL_DC_OFF); POWER_DOMAIN_DC_OFF);
} }
icl_pll_power_enable(dev_priv, pll, enable_reg); icl_pll_power_enable(dev_priv, pll, enable_reg);
...@@ -3847,7 +3848,7 @@ static void combo_pll_disable(struct drm_i915_private *dev_priv, ...@@ -3847,7 +3848,7 @@ static void combo_pll_disable(struct drm_i915_private *dev_priv,
if (IS_JSL_EHL(dev_priv) && if (IS_JSL_EHL(dev_priv) &&
pll->info->id == DPLL_ID_EHL_DPLL4) pll->info->id == DPLL_ID_EHL_DPLL4)
intel_display_power_put(dev_priv, POWER_DOMAIN_DPLL_DC_OFF, intel_display_power_put(dev_priv, POWER_DOMAIN_DC_OFF,
pll->wakeref); pll->wakeref);
} }
...@@ -4231,7 +4232,7 @@ static void readout_dpll_hw_state(struct drm_i915_private *i915, ...@@ -4231,7 +4232,7 @@ static void readout_dpll_hw_state(struct drm_i915_private *i915,
if (IS_JSL_EHL(i915) && pll->on && if (IS_JSL_EHL(i915) && pll->on &&
pll->info->id == DPLL_ID_EHL_DPLL4) { pll->info->id == DPLL_ID_EHL_DPLL4) {
pll->wakeref = intel_display_power_get(i915, pll->wakeref = intel_display_power_get(i915,
POWER_DOMAIN_DPLL_DC_OFF); POWER_DOMAIN_DC_OFF);
} }
pll->state.pipe_mask = 0; pll->state.pipe_mask = 0;
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <linux/types.h> #include <linux/types.h>
#include "intel_display.h"
#include "intel_wakeref.h" #include "intel_wakeref.h"
/*FIXME: Move this to a more appropriate place. */ /*FIXME: Move this to a more appropriate place. */
...@@ -37,6 +36,7 @@ ...@@ -37,6 +36,7 @@
(void) (&__a == &__b); \ (void) (&__a == &__b); \
__a > __b ? (__a - __b) : (__b - __a); }) __a > __b ? (__a - __b) : (__b - __a); })
enum tc_port;
struct drm_device; struct drm_device;
struct drm_i915_private; struct drm_i915_private;
struct intel_atomic_state; struct intel_atomic_state;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
#include "i915_drv.h" #include "i915_drv.h"
#include "intel_display_types.h" #include "intel_display_types.h"
#include "intel_dsi.h" #include "intel_dsi.h"
#include "intel_dsi_vbt.h"
#include "vlv_dsi.h"
#include "vlv_sideband.h" #include "vlv_sideband.h"
#define MIPI_TRANSFER_MODE_SHIFT 0 #define MIPI_TRANSFER_MODE_SHIFT 0
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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